build.ps1 'projects' variable resolution issues
Repro steps:
-
Given a repo with a solution at
./src/Proxy/Proxy.sln(or some other relative path below the repo root) -
Run the following command
./eng/common/build.ps1 -build -projects "./src/Proxy/Proxy.sln"
Expected behavior: Arcade builds the ./src/Proxy/Proxy.sln project
Actual behavior: The following error:
C:\Users\anurse\.nuget\packages\microsoft.dotnet.arcade.sdk\1.0.0-beta.18526.8\tools\Build.proj(193,5): error MSB3202: The project file "./src/Proxy/Proxy.sln" was not found.
As far as I can tell, this is because nothing actually resolves the relative path before passing it to the <MSBuild> task in the Arcade SDK's Build.proj. MSBuild resolves relative paths relative to the initial project file by default, so this means it is looking for these projects in the Arcade SDK.
I can work around this by always passing in a fully-qualified glob, but this is awkward.
On a related note, it's very difficult to pass a semicolon-delimited property value to MSBuild from the command line: https://github.com/Microsoft/msbuild/issues/471
As an update, I tried this to make sure this is still an issue and it still fails. Keeping this issue around.
@anurse I'm curious why do you need to use build.ps1 for building the solution/project? Does running dotnet build ./src/Proxy/Proxy.sln or msbuild ./src/Proxy/Proxy.sln not work?