diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 4a1f230f73..2179d353da 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,4 +1,4 @@ -#### 5.0.0-rc009 - 13.06.2017 +#### 5.0.0-rc009 - 14.06.2017 * New command `paket generate-nuspec` * New Command: `FixNuspecs` - Can fix a list of nuspec files now * BREAKING CHANGE: Paket simplify no longer support simplifying restrictions (https://github.com/fsprojects/Paket/pull/2336) @@ -24,6 +24,7 @@ * BUGFIX: Treat runtime dependencies as transitive deps - https://github.com/fsprojects/Paket/issues/2334 * BUGFIX: Sort dependencies on obj/references files - https://github.com/fsprojects/Paket/issues/2310 * BUGFIX: Support .NET moniker ">= monoandroid" - https://github.com/fsprojects/Paket/issues/2246 +* BUGFIX: Paket pack was placing two copies of the project binary to the package - https://github.com/fsprojects/Paket/issues/2421 * BUGFIX: Better dependencies file parser errors * BUGFIX: "Dotnet restore" failed on .netstandard projects under 1.6 - https://github.com/fsprojects/Paket/issues/2243 * BUGFIX: Paket now accepts multiple nuspec files in fix-nuspec - https://github.com/fsprojects/Paket/pull/2296 diff --git a/src/Paket.Core/Packaging/NupkgWriter.fs b/src/Paket.Core/Packaging/NupkgWriter.fs index 249b738d00..2d34941274 100644 --- a/src/Paket.Core/Packaging/NupkgWriter.fs +++ b/src/Paket.Core/Packaging/NupkgWriter.fs @@ -205,6 +205,7 @@ module internal NupkgWriter = use zipFile = new ZipArchive(zipToCreate,ZipArchiveMode.Create) let entries = System.Collections.Generic.List<_>() + let fileNameEntries = System.Collections.Generic.List<_>() let fixRelativePath (p:string) = let isWinDrive = Regex(@"^\w:\\.*", RegexOptions.Compiled).IsMatch @@ -274,17 +275,19 @@ module internal NupkgWriter = |> toUri let addEntry path writerF = - if entries.Contains(path) then () else + if entries.Contains path then () else entries.Add path |> ignore let entry = zipFile.CreateEntry(path) use stream = entry.Open() writerF stream let addEntryFromFile path source = - if entries.Contains(path) then () else + let fullName = Path.GetFullPath source + if entries.Contains path || fileNameEntries.Contains fullName then () else entries.Add path |> ignore + fileNameEntries.Add fullName |> ignore - zipFile.CreateEntryFromFile(source,path) |> ignore + zipFile.CreateEntryFromFile(fullName,path) |> ignore let ensureValidTargetName (target:string) = let target = ensureValidName target diff --git a/src/Paket/Paket.fsproj b/src/Paket/Paket.fsproj index be803c0f6a..20e7c2c801 100644 --- a/src/Paket/Paket.fsproj +++ b/src/Paket/Paket.fsproj @@ -31,8 +31,8 @@ Project paket.exe Project - pack output NuGet include-referenced-projects - C:\temp\PaketPackRepro + pack output NuGet + C:\temp\PaketPackRepro3 true