CSPROJ -Postbuild -Befehl zur Ausführung eines Skripts im Stammverzeichnis des Repository -Roots
Posted: 07 Feb 2025, 11:42
Ich habe einen Monorepo mit mehreren Lösungen, wir können sie so vereinfacht sehen: < /p>
Es wird nicht beklagt, dass sich über $ root beschwert wird, wird nicht als Befehl oder ausführbares Programm erkannt, aber ich weiß nicht, wie dieser Befehl debuggen:
error MSB3073: The command "pwsh -NoProfile -ExecutionPolicy RemoteSigned -Command "
error MSB3073: $root = ;
error MSB3073: $scriptPath = [System.IO.Path]::Combine($root, 'scripts', 'writemanifest.ps1');
error MSB3073: & $scriptPath
exited with code 255.
< /code>
Ich verstehe, dass Variablen nicht ordnungsgemäß zugeordnet sind, oder es führt nicht den richtigen Befehl aus, aber ich habe keine Ahnung, wie man es behebt. Jede Hilfe wäre geschätzt.
Code: Select all
- monorepo
|- scripts
| |- script1.ps
|- src
|- projA
| |- projA.csproj
|- projB
< /code>
In der CSProj -Datei definiere ich ein Post -Build -Ziel, um einen Befehl aus einem Skript auszuführen
im Skriptverzeichnis am Stamm />
error MSB3073: The command "pwsh -NoProfile -ExecutionPolicy RemoteSigned -Command "
error MSB3073: $root = ;
error MSB3073: $scriptPath = [System.IO.Path]::Combine($root, 'scripts', 'writemanifest.ps1');
error MSB3073: & $scriptPath
exited with code 255.
< /code>
Ich verstehe, dass Variablen nicht ordnungsgemäß zugeordnet sind, oder es führt nicht den richtigen Befehl aus, aber ich habe keine Ahnung, wie man es behebt. Jede Hilfe wäre geschätzt.