diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets index 0ec281627..e230bb215 100644 --- a/.paket/Paket.Restore.targets +++ b/.paket/Paket.Restore.targets @@ -159,7 +159,7 @@ This value should match the version in the props generated by paket If they differ, this means we need to do a restore in order to ensure correct dependencies --> - + true @@ -236,13 +236,16 @@ $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7]) %(PaketReferencesFileLinesInfo.PackageVersion) All - runtime - runtime + runtime + $(ExcludeAssets);contentFiles + $(ExcludeAssets);build;buildMultitargeting;buildTransitive true true @@ -289,14 +292,16 @@ $(MSBuildProjectDirectory)/$(MSBuildProjectFile) true + false + true false - true + true false true false - true + true false - true + true $(PaketIntermediateOutputPath)\$(Configuration) $(PaketIntermediateOutputPath) @@ -314,6 +319,55 @@ + + + PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)" + NoDefaultExcludes="$(NoDefaultExcludes)" /> ): string s' +/// Some sourcelink urls (even after normalization?) have a leading slash, which we don't want. +/// keeping the slash results in temporary file paths with two slashes being created, which +/// results in invalid paths being generated (.NET treats a // in the path as a re-root of the path). +/// The shortest solution is to strip the leading slash as part of normalization, which works on Windows, +/// but I'm unsure of the effect on Linux and MacOS. +let stripLeadingSlash (repo: string) = + (UMX.untag repo).TrimStart('/') |> UMX.tag + type SourceLinkJson = { documents: System.Collections.Generic.Dictionary, string> } @@ -134,7 +142,7 @@ let private tryGetUrlWithWildcard (pathPattern: string) (urlP logger.info (Log.setMessage "document {doc} did not match pattern {pattern}" >> Log.addContext "doc" document.Name >> Log.addContext "pattern" pattern) None | m -> - let replacement = normalizeRepoPath (UMX.tag m.Groups.[1].Value) + let replacement = UMX.tag m.Groups.[1].Value |> normalizeRepoPath |> stripLeadingSlash logger.info (Log.setMessage "document {doc} did match pattern {pattern} with value {replacement}" >> Log.addContext "doc" document.Name >> Log.addContext "pattern" pattern >> Log.addContext "replacement" replacement) Some (replace urlPattern replacement, replacement, document)