dotnet/msbuild

Build fails when using a path using colon character

Open

#4.216 geöffnet am 7. März 2019

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)C# (1.364 Forks)batch import
help wantedtriaged

Repository-Metriken

Stars
 (5.062 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 11T 7h) (125 gemergte PRs in 30 T)

Beschreibung

Steps to reproduce

Originally reported against Visual Studio for Mac - https://devdiv.visualstudio.com/DevDiv/_workitems/edit/807811

Wondering if it is valid to use a directory with ':' on the Mac and for msbuild to support this. Using dotnet sdk as an example:

  1. mkdir test:abc
  2. cd test:abc
  3. dotnet new console
  4. dotnet build

Expected behavior

Build should work?

Actual behavior

Build fails:

dotnet build
Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 30.61 ms for ~/Projects/Tests/test:abc/test:abc.csproj.
/usr/local/share/dotnet/sdk/2.1.503/15.0/Microsoft.Common.props(66,3): error MSB4019: The imported project "~/Projects/Tests/test:abc/obj/test:abc.csproj.*.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [~/Tests/test:abc/test:abc.csproj]

Build FAILED.

/usr/local/share/dotnet/sdk/2.1.503/15.0/Microsoft.Common.props(66,3): error MSB4019: The imported project "~/Projects/Tests/test:abc/obj/test:abc.csproj.*.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [/Users/matt/Projects/Tests/test:abc/test:abc.csproj]
    0 Warning(s)
    1 Error(s)

The obj directory contains:

project.assets.json test:abc.csproj.nuget.cache test:abc.csproj.nuget.g.props test:abc.csproj.nuget.g.targets

Environment data

msbuild /version output:

Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core

OS info:

Mac OS 10.13.6

Contributor Guide