Quantcast
Channel: WE MOVED to github.com/nuget. This site is not monitored!
Viewing all articles
Browse latest Browse all 7612

Commented Issue: Minor NuGet Visual Studio extension issues [2195]

$
0
0
The NuGet Visual Studio extension has two small issues that cause compatibility issues when trying to use NuGet on linux via Mono with a project created in Visual Studio.

1. Inconsistent naming:
* By default NuGet names the files in the .nuget folder: "NuGet.Config", "NuGet.exe", and "NuGet.targets".
* Inside of NuGet.targets, however, we see "<NuGetExePath>$(NuGetToolsPath)\nuget.exe</NuGetExePath>" where the exe is listed in all lower case.
* This causes xbuild to be unable to locate the exe in order to execute it as Linux is case sensitive.

2. Bad path (and casing) when NuGet adds the import project declaration to project files:
* NuGet currently adds: "<Import Project="$(SolutionDir)\.nuget\nuget.targets" />"
* The casing of the targets file is incorrect. Additionally, the $(SolutionDir) alias *includes* the trailing slash which causes two slashes to be inserted into the path. Windows ignores this, but it causes a problem on Linux.

It would seem that basically all of the NuGet text (targets + project changes) reference the file names in all lower-case while the files themselves are of mixed case. The easiest solution is to rename "NuGet.Config", "NuGet.exe", and "NuGet.targets" to all lower-case and to remove the additional slash in import project declaration.

Right now these steps have to be done by hand to enable a solution created with NuGet in Visual Studio to build on Linux, but they are simple changes.

Thanks!
Comments: We also ran into #2 with the extra slash, and removed it by hand. Now whenever we open the project in VS it adds a redundant line "<Import Project="$(SolutionDir)\.nuget\nuget.targets" />", and we get build warnings because nuget.targets is imported twice.

Viewing all articles
Browse latest Browse all 7612

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>