Open natemcmaster opened 6 years ago
When PackagePath has a trailing backslash, the nupkg produced contains an incorrect zip with // in the entry name.
//
dotnet.exe --version: 2.1.300 OS: macOS Worked before?: not sure
./build.sh /p:SkipTests=true
The problem is here: https://github.com/aspnet/Mvc/blob/379345b530697ef11d86cc778c28e660696d8b77/src/Microsoft.AspNetCore.Mvc.Analyzers.Experimental/Microsoft.AspNetCore.Mvc.Analyzers.Experimental.csproj#L26
<None Include="$(OutputPath)$(AssemblyName).dll" Pack="true" PackagePath="analyzers\dotnet\cs\" />
When packing on macOS/Linux, this leads to a zip like this:
$ unzip -l ./artifacts/build/Microsoft.AspNetCore.Mvc.Analyzers.Experimental.0.2.0-preview1-t000.nupkg Archive: ./artifacts/build/Microsoft.AspNetCore.Mvc.Analyzers.Experimental.0.2.0-preview1-t000.nupkg Length Date Time Name --------- ---------- ----- ---- 537 06-07-2018 12:12 _rels/.rels 1318 06-07-2018 12:12 Microsoft.AspNetCore.Mvc.Analyzers.Experimental.nuspec 34816 06-07-2018 19:10 analyzers/dotnet/cs//Microsoft.AspNetCore.Mvc.Analyzers.Experimental.dll 459 06-07-2018 12:12 [Content_Types].xml 819 06-07-2018 12:12 package/services/metadata/core-properties/0016e2a84d834decb9a38be2bc6cb6cd.psmdcp --------- ------- 37949 5 files
Notice the double slash in analyzers/dotnet/cs//Microsoft.AspNetCore.Mvc.Analyzers.Experimental.dll
analyzers/dotnet/cs//Microsoft.AspNetCore.Mvc.Analyzers.Experimental.dll
@natemcmaster this only happens when you use backslash in PackagePath on non-windows systems? or does it happen on windows too?
This only happens on non-Windows.
When PackagePath has a trailing backslash, the nupkg produced contains an incorrect zip with
//
in the entry name.Details about Problem
dotnet.exe --version: 2.1.300 OS: macOS Worked before?: not sure
Repro
./build.sh /p:SkipTests=true
Sample Project
The problem is here: https://github.com/aspnet/Mvc/blob/379345b530697ef11d86cc778c28e660696d8b77/src/Microsoft.AspNetCore.Mvc.Analyzers.Experimental/Microsoft.AspNetCore.Mvc.Analyzers.Experimental.csproj#L26
When packing on macOS/Linux, this leads to a zip like this:
Notice the double slash in
analyzers/dotnet/cs//Microsoft.AspNetCore.Mvc.Analyzers.Experimental.dll