Make nuget packages path use forward slashes. - #977
Conversation
Need to use forward slashes to be compatible with Unix-like platforms.
|
👍 |
|
|
|
Why is NuGet special here? Nowhere else are we using forward slashes, the expectation is the tools on top need to be smart about slashes when crossing platforms. |
|
My view on this is that indeed, the tools on the top that perform path resolution and pass paths to other tools downlevel (like MSBuild) must be smart with slashes. However in this case there is no top level tool. The path is simply stored in a config file and NuGet does not do any resolution, just simply passes it to the file system. From this view it seems that we just need to fix the path in the config. |
Make nuget packages path use forward slashes.
|
@VSadov how is this not broken for Windows? |
|
You're saying there is no top level tool but we're also making a change to un-break something. So what's broken? And why is that item not dealing with the path like every other .Net tool. |
|
The path in the config file is is not correct on Unix-like platforms. If the path was created by an automated tool/process we would need to fix that, but the path is simply directly editable data. Essentially the top level tool that controls this path is us and we should just fix the path. |
|
I'm still not understanding what broke? What prompted this change? |
|
Without this change, "NuGet.exe restore src/Roslyn.sln " restores packages literally into ./....\packages |
|
Why don't we think this is a bug in NuGet? We are expecting all of our other tools like MSBuild to do path normalization on Linux. I don't see how NuGet is special here. |
|
I actually expect that most tools do not need to get involved with paths. MSBuild is special here since it is already heavily involved in the business of path resolution/canonization. |
Handle case of null packageStream
Need to use forward slashes to be compatible with Unix-like platforms.