Skip to content

build.ps1 'projects' variable resolution issues #1255

@analogrelay

Description

@analogrelay

Repro steps:

  1. Given a repo with a solution at ./src/Proxy/Proxy.sln (or some other relative path below the repo root)

  2. 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: dotnet/msbuild#471

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions