Steps to reproduce
Install NuLink
$ dotnet tool install -g NuLink --version 0.1.0-beta2
Run the commands to link a package on MacOS
$ dotnet restore
$ dotnet build
$ nulink link -p NuLink.TestCase.FirstPackage -l “\PATH…\demos\NuLink.TestCase.FirstPackage\NuLink.TestCase.FirstPackage\NuLink.TestCase.FirstPackage.csproj"
Expected result
The NuLink.TestCase.FirstPackage package linked to a local folder.
Actual result
It throws a "File does not exist" error. ParsedPath::ParsedPath(string path) in OldProjectStyle.cs uses Path.AltDirectorySeparatorChar to split paths on Windows style separarators, but it doesn't work on macOS (see this issue https://github.com/dotnet/corefx/issues/11529)
NuLink command line and output
$ nulink link -p NuLink.TestCase.FirstPackage -l "\Users\user\Projects\NuLink Test\NuLink-master\demos\NuLink.TestCase.FirstPackage\NuLink.TestCase.FirstPackage\NuLink.TestCase.FirstPackage.csproj"
Error: File does not exist: \Users\user\Projects\NuLink Test\NuLink-master\demos\NuLink.TestCase.FirstPackage\NuLink.TestCase.FirstPackage\NuLink.TestCase.FirstPackage.csproj
Output of dotnet --info command
$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.0.100
Commit: 04339c3a26
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.14
OS Platform: Darwin
RID: osx.10.14-x64
Base Path: /usr/local/share/dotnet/sdk/3.0.100/
Host (useful for support):
Version: 3.0.0
Commit: 7d57652f33
.NET Core SDKs installed:
2.1.701 [/usr/local/share/dotnet/sdk]
3.0.100 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.12 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.12 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.12 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Proposed solution
Hardcoding ‘\’ as an additional separator character for the path.Split call in ParsedPath::ParsedPath(string path).
Steps to reproduce
Install NuLink
Run the commands to link a package on MacOS
Expected result
The NuLink.TestCase.FirstPackage package linked to a local folder.
Actual result
It throws a "File does not exist" error. ParsedPath::ParsedPath(string path) in OldProjectStyle.cs uses Path.AltDirectorySeparatorChar to split paths on Windows style separarators, but it doesn't work on macOS (see this issue https://github.com/dotnet/corefx/issues/11529)
NuLink command line and output
Error: File does not exist: \Users\user\Projects\NuLink Test\NuLink-master\demos\NuLink.TestCase.FirstPackage\NuLink.TestCase.FirstPackage\NuLink.TestCase.FirstPackage.csprojOutput of dotnet --info command
Proposed solution
Hardcoding ‘\’ as an additional separator character for the path.Split call in ParsedPath::ParsedPath(string path).