diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets
index 7c6107011d..52f41c608a 100644
--- a/.paket/Paket.Restore.targets
+++ b/.paket/Paket.Restore.targets
@@ -17,23 +17,43 @@
native
/Library/Frameworks/Mono.framework/Commands/mono
mono
-
- $(PaketToolsPath)paket
- $(PaketRootPath)paket.exe
- $(PaketToolsPath)paket.exe
- $(PaketToolsPath)paket.exe
- $(PaketToolsPath)paket
+
+ $(PaketRootPath)paket.bootstrapper.exe
+ $(PaketToolsPath)paket.bootstrapper.exe
+ $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\
+
+
+
+
+ $(PaketRootPath)paket.exe
+ $(PaketToolsPath)paket.exe
+ $(PaketToolsPath)paket.exe
+ $(_PaketBootStrapperExeDir)paket.exe
+ paket.exe
+
+
+ $(PaketRootPath)paket
+ $(PaketToolsPath)paket
+ $(PaketToolsPath)paket
+
+
+ $(PaketRootPath)paket.exe
+ $(PaketToolsPath)paket.exe
+
+
+ $(PaketBootStrapperExeDir)paket.exe
+
+
+ paket
<_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))
dotnet "$(PaketExePath)"
- "$(PaketExePath)"
$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"
- "$(PaketExePath)"
+ "$(PaketExePath)"
+
- $(PaketRootPath)paket.bootstrapper.exe
- $(PaketToolsPath)paket.bootstrapper.exe
"$(PaketBootStrapperExePath)"
$(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)"
@@ -42,6 +62,9 @@
true
true
+
+
+ True
@@ -82,7 +105,11 @@
true
-
+
+
true
@@ -151,16 +178,19 @@
+ $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length)
$([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])
%(PaketReferencesFileLinesInfo.PackageVersion)
All
- runtime
+ runtime
+ runtime
true
+ true
@@ -192,19 +222,27 @@
false
+ $(MSBuildVersion)
+ 15.8.0
<_NuspecFilesNewLocation Include="$(BaseIntermediateOutputPath)$(Configuration)\*.nuspec"/>
+
+
$(MSBuildProjectDirectory)/$(MSBuildProjectFile)
true
- false
- true
+ false
+ true
+ false
+ true
+ false
+ true
$(BaseIntermediateOutputPath)$(Configuration)
$(BaseIntermediateOutputPath)
@@ -219,9 +257,52 @@
-
-
+
+
- version'
"${(f)$(_paket_group_option 'add the dependency to a group (default: Main group)')}"
)
@@ -438,6 +442,7 @@ _paket-clear-cache() {
local -a args
args=(
$global_options
+ '(--clear-local)'--clear-local"[also clear local packages and paket-files directory]"
)
_arguments -C \
@@ -483,8 +488,10 @@ _paket-config() {
(add-credentials)
_arguments -C \
$args \
+ '(--authtype)'--authtype'[authentication type (default: basic)]:authentication type:(basic ntlm)' \
'(--username)'--username'[provide username]:user name: ' \
'(--password)'--password'[provide password]:password: ' \
+ '(--verify)'--verify'[verify credentials]' \
'1: :->source-url-or-credential-key' \
&& ret=0
@@ -567,7 +574,7 @@ _paket-find-refs() {
(package-id)
local group=${(v)opt_args[(i)--group|-g]:-Main}
- _paket_installed_packages $group \
+ _paket_installed_packages $group --all \
&& ret=0
;;
esac
@@ -664,6 +671,25 @@ _paket-init() {
_arguments $global_options
}
+(( $+functions[_paket-info] )) ||
+_paket-info() {
+ local curcontext=$curcontext context state state_descr ret=1
+ typeset -A opt_args
+ local -a line
+
+ local -a args
+ args=(
+ $global_options
+ '(--paket-dependencies-dir)'--paket-dependencies-dir'[shows the absolute path of the directory containing paket.dependencies, if it exists]'
+ )
+
+ _arguments -C \
+ $args \
+ && ret=0
+
+ return ret
+}
+
(( $+functions[_paket-install] )) ||
_paket-install() {
local curcontext=$curcontext context state state_descr line ret=1
@@ -864,6 +890,20 @@ _paket-restore() {
return ret
}
+(( $+functions[_paket-restriction] )) ||
+_paket-restriction() {
+ local curcontext=$curcontext context state state_descr ret=1
+ typeset -A opt_args
+ local -a line
+
+ _arguments -C \
+ $global_options \
+ '1:Paket formula representing a restriction' \
+ && ret=0
+
+ return ret
+}
+
(( $+functions[_paket-show-groups] )) ||
_paket-show-groups() {
_arguments $global_options
@@ -871,7 +911,7 @@ _paket-show-groups() {
(( $+functions[_paket-show-installed-packages] )) ||
_paket-show-installed-packages() {
- local curcontext=$curcontext context state state_descr line ret=1
+ local curcontext=$curcontext context state state_descr line ret=1
typeset -A opt_args
local -a args
@@ -966,7 +1006,7 @@ _paket-why() {
(package-id)
local group=${(v)opt_args[(i)--group|-g]:-Main}
- _paket_installed_packages $group \
+ _paket_installed_packages $group --all \
&& ret=0
;;
esac
@@ -1002,6 +1042,7 @@ _paket_commands() {
find-packages:'search for NuGet packages'
find-package-versions:'search for dependency versions'
find-refs:'find all project files that have a dependency installed'
+ restriction:'resolve a framework restriction and show details'
show-groups:'show groups'
show-installed-packages:'show installed dependencies'
why:'determine why a dependency is required'
@@ -1015,10 +1056,11 @@ _paket_commands() {
misc=(
auto-restore:'manage automatic package restore during the build process inside Visual Studio'
- clear-cache:'clear the NuGet and git cache directories'
+ clear-cache:'clear the global and optionally local NuGet and cache directories'
config:'store global configuration values like NuGet credentials'
generate-load-scripts:'generate F# and C# include scripts that reference installed packages in a interactive environment like F# Interactive or ScriptCS'
init:'create an empty paket.dependencies file in the current working directory'
+ info:'show information about the current project'
)
for type in $types; do
@@ -1189,6 +1231,7 @@ _paket_groups() {
(( $+functions[_paket_installed_packages] )) ||
_paket_installed_packages() {
local group="$1"
+ local args=$*
local cmd=show-installed-packages
local what='NuGet package ID'
@@ -1206,7 +1249,7 @@ _paket_installed_packages() {
local -a output
output=(
${(f)"$(_call_program $cmd \
- "$(_paket_executable) $cmd --silent --all 2> /dev/null")"}
+ "$(_paket_executable) $cmd $args --silent 2> /dev/null")"}
)
_paket_command_successful $? || return 1
diff --git a/docs/content/commands/pack.md b/docs/content/commands/pack.md
index 4c08bf45f3..5979eece77 100644
--- a/docs/content/commands/pack.md
+++ b/docs/content/commands/pack.md
@@ -72,9 +72,12 @@ paket pack nugets --symbols
### Including referenced projects
Paket automatically replaces inter-project dependencies with NuGet dependencies
-if the dependency has it's own [`paket.template`][templatefile]. In addition to
-this the parameter `--include-referenced-projects` instructs Paket to add
-project output to the package for inter-project dependencies that don't have a
+if the dependency has its own [`paket.template`][templatefile]. Version constraints
+for these dependencies can be controlled with the `--interproject-references`
+parameter or the `interproject-references` option in [`paket.template`][templatefile].
+
+In addition to this the parameter `--include-referenced-projects` instructs Paket to
+add project output to the package for inter-project dependencies that don't have a
[`paket.template` file][templatefile].
1. It recursively iterates referenced projects and adds their project output to
diff --git a/docs/content/faq.md b/docs/content/faq.md
index 34d9ab385e..fd33fdc874 100644
--- a/docs/content/faq.md
+++ b/docs/content/faq.md
@@ -264,3 +264,41 @@ set NO_PROXY=.company.com,localhost
Short answer: Yes. For information about Paket with .NET SDK, .NET Core and the
`dotnet` CLI see the
["Paket and the .NET SDK / .NET Core CLI tools" guide](paket-and-dotnet-cli.html).
+
+## The download of packages times out, is there a way to prevent this?
+
+Since version 5.190.0 there are three environment variables you can set to try to prevent this:
+
+* `PAKET_REQUEST_TIMEOUT`: Timeout for the request
+* `PAKET_RESPONSE_STREAM_TIMEOUT`: Timeout for the response of the request
+* `PAKET_STREAMREADWRITE_TIMEOUT`: Timeout for streaming the read and write operations
+
+Note that values should be specified in milliseconds.
+
+The default timeout value for all three settings is 3 minutes (180 seconds).
+
+The following example will set all three values to 10 minutes (600 seconds) on Windows
+
+```sh
+set PAKET_REQUEST_TIMEOUT=600000
+set PAKET_RESPONSE_STREAM_TIMEOUT=600000
+set PAKET_STREAMREADWRITE_TIMEOUT=600000
+```
+
+Use 'export' instead of 'set' for bash and similar shells
+
+```sh
+export PAKET_REQUEST_TIMEOUT=600000
+export PAKET_RESPONSE_STREAM_TIMEOUT=600000
+export PAKET_STREAMREADWRITE_TIMEOUT=600000
+```
+
+If set to -1 the timeout is infinite.
+
+```sh
+set PAKET_REQUEST_TIMEOUT=-1
+set PAKET_RESPONSE_STREAM_TIMEOUT=-1
+set PAKET_STREAMREADWRITE_TIMEOUT=-1
+```
+
+
diff --git a/docs/content/getting-started.md b/docs/content/getting-started.md
index 7aafd59d7f..4e3036689e 100644
--- a/docs/content/getting-started.md
+++ b/docs/content/getting-started.md
@@ -39,7 +39,7 @@ This guide will show you
### Specifying dependencies
-Create a [`paket.dependencies` file](dependencies-file.html) in your project's
+Create a [`paket.dependencies` file](dependencies-file.html) in your solution's
root and specify all your dependencies in it. You can use
[NuGet packages](nuget-dependencies.html),
[Git repos](git-dependencies.html),
diff --git a/docs/content/template-files.md b/docs/content/template-files.md
index 5912f7fb2d..1fea02d826 100644
--- a/docs/content/template-files.md
+++ b/docs/content/template-files.md
@@ -172,6 +172,31 @@ referenced projects into the package.
include-referenced-projects true
```
+If the referenced project has its own template file then it will be added to the package
+as NuGet dependency. You can control the version constraint for such dependencies with
+the `interproject-references` option.
+There are several possible values for this options. Consider them with an example.
+
+`ProjectA` references `ProjectB`. Both projects have template files.
+`ProjectB`'s version is `1.2.3`.
+
+(The first column is a line from `ProjectA`'s template file,
+the second column is a version constraint for the `ProjectB` dependency in `ProjectA.nupkg`.)
+
+|||
+| --- | --- |
+| `interproject-references min` | `1.2.3` |
+| `interproject-references fix` | `[1.2.3]` |
+| `interproject-references keep-major` | `[1.2.3,2.0.0)` |
+| `interproject-references keep-minor` | `[1.2.3,1.3.0)` |
+| `interproject-references keep-patch` | `[1.2.3,1.2.4)` |
+|||
+
+The default value is `interproject-references min`.
+
+You can override the template file option with the CLI parameter
+`--interproject-references` which supports the same values.
+
#### References
A references block looks like this:
diff --git a/global.json b/global.json
index 47b8aebcf1..b380f65c2f 100644
--- a/global.json
+++ b/global.json
@@ -1,5 +1,5 @@
{
"sdk": {
- "version": "2.1.401"
+ "version": "2.1.500"
}
}
diff --git a/integrationtests/Paket.IntegrationTests/LoadingScriptGenerationTests.fs b/integrationtests/Paket.IntegrationTests/LoadingScriptGenerationTests.fs
index 3c4843fcb1..d2c3604bf6 100644
--- a/integrationtests/Paket.IntegrationTests/LoadingScriptGenerationTests.fs
+++ b/integrationtests/Paket.IntegrationTests/LoadingScriptGenerationTests.fs
@@ -287,4 +287,14 @@ let ``ignore assemblies that are not expected by the specified framework`` () =
[
"nlog.csx", ["Java.Interop"; "Mono.Android"; "System.Xml.Linq"; "System.Net"; "System.Windows"; "System.Windows.Browser"; "Xamarin.iOS" ]
"nlog.fsx", ["Java.Interop"; "Mono.Android"; "System.Xml.Linq"; "System.Net"; "System.Windows"; "System.Windows.Browser"; "Xamarin.iOS" ]
- ] |> assertExpectations scenario ExpectationType.ShouldNotContain
\ No newline at end of file
+ ] |> assertExpectations scenario ExpectationType.ShouldNotContain
+
+[]
+let ``scripts should contain the paket namespace`` () =
+ let scenario = "add-namespace"
+ paket "install" scenario |> ignore
+
+ [
+ "nlog.csx", ["namespace PaketLoadScripts" ]
+ "nlog.fsx", ["namespace PaketLoadScripts" ]
+ ] |> assertExpectations scenario ExpectationType.ShouldContain
\ No newline at end of file
diff --git a/integrationtests/Paket.IntegrationTests/PackSpecs.fs b/integrationtests/Paket.IntegrationTests/PackSpecs.fs
index bc0c44ca15..6aae578389 100644
--- a/integrationtests/Paket.IntegrationTests/PackSpecs.fs
+++ b/integrationtests/Paket.IntegrationTests/PackSpecs.fs
@@ -521,6 +521,52 @@ let ``#1848 include-referenced-projects with non-packed project dependencies`` (
CleanDir rootPath
+[]
+let ``#2520 interproject-references parameter overide --pin-project-references`` () =
+ let scenario = "i002520-interproject-references-constraint"
+ let rootPath = scenarioTempPath scenario
+ let outPath = Path.Combine(rootPath, "out")
+ let package = Path.Combine(outPath, "A.1.0.0.nupkg")
+
+ paket ("pack --pin-project-references \"" + outPath + "\"") scenario |> ignore
+ ZipFile.ExtractToDirectory(package, outPath)
+
+ let nuspec = NuGetLocal.getNuSpecFromNupgk package
+ let dependency =
+ match nuspec.Dependencies.Value with
+ | [d] -> d
+ | _ -> failwith "single dependency expected"
+
+ let name, versionRequirement, _ = dependency
+
+ name |> shouldEqual (PackageName "B")
+ versionRequirement |> shouldEqual (VersionRequirement.Parse "[1.2.3,2.0.0)")
+
+ CleanDir rootPath
+
+[]
+let ``#2520 --interproject-references cli parameter overide interproject-references template file option`` () =
+ let scenario = "i002520-interproject-references-constraint"
+ let rootPath = scenarioTempPath scenario
+ let outPath = Path.Combine(rootPath, "out")
+ let package = Path.Combine(outPath, "A.1.0.0.nupkg")
+
+ paket ("pack --interproject-references keep-minor \"" + outPath + "\"") scenario |> ignore
+ ZipFile.ExtractToDirectory(package, outPath)
+
+ let nuspec = NuGetLocal.getNuSpecFromNupgk package
+ let dependency =
+ match nuspec.Dependencies.Value with
+ | [d] -> d
+ | _ -> failwith "single dependency expected"
+
+ let name, versionRequirement, _ = dependency
+
+ name |> shouldEqual (PackageName "B")
+ versionRequirement |> shouldEqual (VersionRequirement.Parse "[1.2.3,1.3.0)")
+
+ CleanDir rootPath
+
[]
let ``#2694 paket fixnuspec should not remove project references``() =
let project = "console"
@@ -699,3 +745,47 @@ let ``#4010-pack-template-only``() =
let outPath = Path.Combine(scenarioTempPath scenario, "out")
let templatePath = Path.Combine(scenarioTempPath scenario, "PaketBug", "paket.template")
paket (sprintf """pack --template "%s" "%s" --version 1.2.3 """ templatePath outPath) scenario |> ignore
+
+[]
+let ``#2776 transitive project references included`` () =
+ let scenario = "i002776-pack-transitive-project-refs"
+ let rootPath = scenarioTempPath scenario
+ let outPath = Path.Combine(rootPath, "out")
+ let package = Path.Combine(outPath, "A.1.0.0.nupkg")
+
+ paket ("pack --include-referenced-projects \"" + outPath + "\"") scenario |> ignore
+ ZipFile.ExtractToDirectory(package, outPath)
+
+ Path.Combine(outPath, "lib", "netstandard2.0", "A.dll") |> checkFileExists
+ Path.Combine(outPath, "lib", "netstandard2.0", "B.dll") |> checkFileExists
+ Path.Combine(outPath, "lib", "netstandard2.0", "C.dll") |> checkFileExists
+ Path.Combine(outPath, "lib", "netstandard2.0", "D.dll") |> checkFileExists
+
+ let nuspec = NuGetLocal.getNuSpecFromNupgk package
+ let dependencies = nuspec.Dependencies.Value |> Seq.map (fun (x,_,_) -> x)
+ dependencies |> shouldContain (PackageName "nlog")
+
+ CleanDir rootPath
+
+[]
+let ``#2776 transitive references stops on project with template`` () =
+ let scenario = "i002776-pack-transitive-with-template"
+ let rootPath = scenarioTempPath scenario
+ let outPath = Path.Combine(rootPath, "out")
+ let package = Path.Combine(outPath, "A.1.0.0.nupkg")
+
+ paket ("pack --include-referenced-projects \"" + outPath + "\"") scenario |> ignore
+ ZipFile.ExtractToDirectory(package, outPath)
+
+ Path.Combine(outPath, "lib", "netstandard2.0", "A.dll") |> checkFileExists
+ Path.Combine(outPath, "lib", "netstandard2.0", "B.dll") |> checkFileExists
+ File.Exists(Path.Combine(outPath, "lib", "netstandard2.0", "C.dll")) |> shouldEqual false
+ File.Exists(Path.Combine(outPath, "lib", "netstandard2.0", "D.dll")) |> shouldEqual false
+
+ let nuspec = NuGetLocal.getNuSpecFromNupgk package
+ let dependencies = nuspec.Dependencies.Value |> Seq.map (fun (x,_,_) -> x)
+
+ dependencies |> shouldContain (PackageName "C")
+ dependencies |> shouldNotContain (PackageName "nlog")
+
+ CleanDir rootPath
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/A.csproj b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/A.csproj
new file mode 100644
index 0000000000..d92840d025
--- /dev/null
+++ b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/A.csproj
@@ -0,0 +1,19 @@
+
+
+
+ netstandard2.0
+
+
+
+ bin\
+
+
+
+ bin\
+
+
+
+
+
+
+
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/ClassA.cs b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/ClassA.cs
new file mode 100644
index 0000000000..654eecc622
--- /dev/null
+++ b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/ClassA.cs
@@ -0,0 +1,12 @@
+using B;
+
+namespace A
+{
+ public class ClassA
+ {
+ public ClassA()
+ {
+ var classB = new ClassB();
+ }
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/bin/netstandard2.0/A.deps.json b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/bin/netstandard2.0/A.deps.json
new file mode 100644
index 0000000000..b84eb8bcbf
--- /dev/null
+++ b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/bin/netstandard2.0/A.deps.json
@@ -0,0 +1,58 @@
+{
+ "runtimeTarget": {
+ "name": ".NETStandard,Version=v2.0/",
+ "signature": "cfe1dc2a80602aef150a12815387068463a61a0d"
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETStandard,Version=v2.0": {},
+ ".NETStandard,Version=v2.0/": {
+ "A/1.0.0": {
+ "dependencies": {
+ "B": "1.0.0",
+ "NETStandard.Library": "2.0.3"
+ },
+ "runtime": {
+ "A.dll": {}
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "NETStandard.Library/2.0.3": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0"
+ }
+ },
+ "B/1.0.0": {
+ "runtime": {
+ "B.dll": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "A/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-WV99Ot6CEKqaIpW+ErjGXmbE3HX6bSoS7tqcOc7k1evmarPPENlLWDPlMx8lHXPltWXot0H45nhmSxtvy577Cg==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "NETStandard.Library/2.0.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-s2Ei89UeBS1EmfipIvE+LAocCvKOWSVk+hMkPu8KXAYun9/5AS8m1u+7OIc9ZnAcM0aPGvNNcLSZpf0gCdaE9Q==",
+ "path": "netstandard.library/2.0.3",
+ "hashPath": "netstandard.library.2.0.3.nupkg.sha512"
+ },
+ "B/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/bin/netstandard2.0/A.dll b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/bin/netstandard2.0/A.dll
new file mode 100644
index 0000000000..1b50b98875
Binary files /dev/null and b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/bin/netstandard2.0/A.dll differ
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/bin/netstandard2.0/A.pdb b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/bin/netstandard2.0/A.pdb
new file mode 100644
index 0000000000..c4ba6b6efb
Binary files /dev/null and b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/bin/netstandard2.0/A.pdb differ
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/bin/netstandard2.0/B.dll b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/bin/netstandard2.0/B.dll
new file mode 100644
index 0000000000..c13802976d
Binary files /dev/null and b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/bin/netstandard2.0/B.dll differ
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/bin/netstandard2.0/B.pdb b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/bin/netstandard2.0/B.pdb
new file mode 100644
index 0000000000..efaf53c861
Binary files /dev/null and b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/bin/netstandard2.0/B.pdb differ
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/paket.templatetemplate b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/paket.templatetemplate
new file mode 100644
index 0000000000..b523ca70fd
--- /dev/null
+++ b/integrationtests/scenarios/i002520-interproject-references-constraint/before/A/paket.templatetemplate
@@ -0,0 +1,5 @@
+type project
+description test
+authors test
+
+interproject-references keep-major
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/B.csproj b/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/B.csproj
new file mode 100644
index 0000000000..5635e02042
--- /dev/null
+++ b/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/B.csproj
@@ -0,0 +1,15 @@
+
+
+
+ netstandard2.0
+
+
+
+ bin\
+
+
+
+ bin\
+
+
+
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/ClassB.cs b/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/ClassB.cs
new file mode 100644
index 0000000000..d254241672
--- /dev/null
+++ b/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/ClassB.cs
@@ -0,0 +1,6 @@
+namespace B
+{
+ public class ClassB
+ {
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/bin/netstandard2.0/B.deps.json b/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/bin/netstandard2.0/B.deps.json
new file mode 100644
index 0000000000..0c8f1b6536
--- /dev/null
+++ b/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/bin/netstandard2.0/B.deps.json
@@ -0,0 +1,47 @@
+{
+ "runtimeTarget": {
+ "name": ".NETStandard,Version=v2.0/",
+ "signature": "cfe1dc2a80602aef150a12815387068463a61a0d"
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETStandard,Version=v2.0": {},
+ ".NETStandard,Version=v2.0/": {
+ "B/1.0.0": {
+ "dependencies": {
+ "NETStandard.Library": "2.0.3"
+ },
+ "runtime": {
+ "B.dll": {}
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "NETStandard.Library/2.0.3": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0"
+ }
+ }
+ }
+ },
+ "libraries": {
+ "B/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-WV99Ot6CEKqaIpW+ErjGXmbE3HX6bSoS7tqcOc7k1evmarPPENlLWDPlMx8lHXPltWXot0H45nhmSxtvy577Cg==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "NETStandard.Library/2.0.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-s2Ei89UeBS1EmfipIvE+LAocCvKOWSVk+hMkPu8KXAYun9/5AS8m1u+7OIc9ZnAcM0aPGvNNcLSZpf0gCdaE9Q==",
+ "path": "netstandard.library/2.0.3",
+ "hashPath": "netstandard.library.2.0.3.nupkg.sha512"
+ }
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/bin/netstandard2.0/B.dll b/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/bin/netstandard2.0/B.dll
new file mode 100644
index 0000000000..c13802976d
Binary files /dev/null and b/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/bin/netstandard2.0/B.dll differ
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/bin/netstandard2.0/B.pdb b/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/bin/netstandard2.0/B.pdb
new file mode 100644
index 0000000000..efaf53c861
Binary files /dev/null and b/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/bin/netstandard2.0/B.pdb differ
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/paket.templatetemplate b/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/paket.templatetemplate
new file mode 100644
index 0000000000..cd7ee2fbae
--- /dev/null
+++ b/integrationtests/scenarios/i002520-interproject-references-constraint/before/B/paket.templatetemplate
@@ -0,0 +1,4 @@
+type project
+version 1.2.3
+description test
+authors test
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/InterprojectVersionConstraints.sln b/integrationtests/scenarios/i002520-interproject-references-constraint/before/InterprojectVersionConstraints.sln
new file mode 100644
index 0000000000..a26959367e
--- /dev/null
+++ b/integrationtests/scenarios/i002520-interproject-references-constraint/before/InterprojectVersionConstraints.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "A", "A\A.csproj", "{77D9C98B-BE20-4F46-96D3-A9813F8E9549}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "B", "B\B.csproj", "{64DD343C-CC8E-4FDF-8776-59E37EAF690D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {77D9C98B-BE20-4F46-96D3-A9813F8E9549}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {77D9C98B-BE20-4F46-96D3-A9813F8E9549}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {77D9C98B-BE20-4F46-96D3-A9813F8E9549}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {77D9C98B-BE20-4F46-96D3-A9813F8E9549}.Release|Any CPU.Build.0 = Release|Any CPU
+ {64DD343C-CC8E-4FDF-8776-59E37EAF690D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {64DD343C-CC8E-4FDF-8776-59E37EAF690D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {64DD343C-CC8E-4FDF-8776-59E37EAF690D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {64DD343C-CC8E-4FDF-8776-59E37EAF690D}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/paket.dependencies b/integrationtests/scenarios/i002520-interproject-references-constraint/before/paket.dependencies
new file mode 100644
index 0000000000..b6891688fc
--- /dev/null
+++ b/integrationtests/scenarios/i002520-interproject-references-constraint/before/paket.dependencies
@@ -0,0 +1 @@
+source https://www.nuget.org/api/v2
diff --git a/integrationtests/scenarios/i002520-interproject-references-constraint/before/paket.lock b/integrationtests/scenarios/i002520-interproject-references-constraint/before/paket.lock
new file mode 100644
index 0000000000..8b13789179
--- /dev/null
+++ b/integrationtests/scenarios/i002520-interproject-references-constraint/before/paket.lock
@@ -0,0 +1 @@
+
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/A.csproj b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/A.csproj
new file mode 100644
index 0000000000..1b7c7c757f
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/A.csproj
@@ -0,0 +1,11 @@
+
+
+
+ netstandard2.0
+
+
+
+
+
+
+
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/ClassA.cs b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/ClassA.cs
new file mode 100644
index 0000000000..7e2dde4d84
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/ClassA.cs
@@ -0,0 +1,12 @@
+using B;
+
+namespace A
+{
+ public class ClassA
+ {
+ public ClassA()
+ {
+ var classB = new ClassB();
+ }
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/bin/Release/netstandard2.0/A.deps.json b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/bin/Release/netstandard2.0/A.deps.json
new file mode 100644
index 0000000000..efd9a1cd50
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/bin/Release/netstandard2.0/A.deps.json
@@ -0,0 +1,102 @@
+{
+ "runtimeTarget": {
+ "name": ".NETStandard,Version=v2.0/",
+ "signature": "78a9741403957ca1c1f920056c349122a77a62e6"
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETStandard,Version=v2.0": {},
+ ".NETStandard,Version=v2.0/": {
+ "A/1.0.0": {
+ "dependencies": {
+ "B": "1.0.0",
+ "NETStandard.Library": "2.0.3"
+ },
+ "runtime": {
+ "A.dll": {}
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "NETStandard.Library/2.0.3": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0"
+ }
+ },
+ "NLog/4.5.11": {
+ "runtime": {
+ "lib/netstandard2.0/NLog.dll": {
+ "assemblyVersion": "4.0.0.0",
+ "fileVersion": "4.5.11.8645"
+ }
+ }
+ },
+ "B/1.0.0": {
+ "dependencies": {
+ "C": "1.0.0"
+ },
+ "runtime": {
+ "B.dll": {}
+ }
+ },
+ "C/1.0.0": {
+ "dependencies": {
+ "D": "1.0.0"
+ },
+ "runtime": {
+ "C.dll": {}
+ }
+ },
+ "D/1.0.0": {
+ "dependencies": {
+ "NLog": "4.5.11"
+ },
+ "runtime": {
+ "D.dll": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "A/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-bLpT1f/SFlO1CzqXG12KnJzpZs6lv24uX2Rzi4Fmm0noJpNlnWRVryuO3yK18Ca04t/YHcO1e1Z0WDfjseqNzw==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "NETStandard.Library/2.0.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-s2Ei89UeBS1EmfipIvE+LAocCvKOWSVk+hMkPu8KXAYun9/5AS8m1u+7OIc9ZnAcM0aPGvNNcLSZpf0gCdaE9Q==",
+ "path": "netstandard.library/2.0.3",
+ "hashPath": "netstandard.library.2.0.3.nupkg.sha512"
+ },
+ "NLog/4.5.11": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Yni/XrDfbEhaCSXJsDkmW/n5AunhOxZ7OKKb+0U1I1/d8ZaKt3Jjzf20g/xPiKljmYuZKYqI5iI34g138kK8UQ==",
+ "path": "nlog/4.5.11",
+ "hashPath": "nlog.4.5.11.nupkg.sha512"
+ },
+ "B/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "C/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "D/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/bin/Release/netstandard2.0/A.dll b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/bin/Release/netstandard2.0/A.dll
new file mode 100644
index 0000000000..a096e60d46
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/bin/Release/netstandard2.0/A.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/bin/Release/netstandard2.0/B.dll b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/bin/Release/netstandard2.0/B.dll
new file mode 100644
index 0000000000..50409d3547
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/bin/Release/netstandard2.0/B.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/bin/Release/netstandard2.0/C.dll b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/bin/Release/netstandard2.0/C.dll
new file mode 100644
index 0000000000..0ed76b86cc
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/bin/Release/netstandard2.0/C.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/bin/Release/netstandard2.0/D.dll b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/bin/Release/netstandard2.0/D.dll
new file mode 100644
index 0000000000..294981701a
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/bin/Release/netstandard2.0/D.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/paket.templatetemplate b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/paket.templatetemplate
new file mode 100644
index 0000000000..25d230b135
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/A/paket.templatetemplate
@@ -0,0 +1,3 @@
+type project
+description test
+authors test
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/B.csproj b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/B.csproj
new file mode 100644
index 0000000000..dbe23bd20a
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/B.csproj
@@ -0,0 +1,11 @@
+
+
+
+ netstandard2.0
+
+
+
+
+
+
+
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/ClassB.cs b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/ClassB.cs
new file mode 100644
index 0000000000..84f2f5ebaa
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/ClassB.cs
@@ -0,0 +1,12 @@
+using C;
+
+namespace B
+{
+ public class ClassB
+ {
+ public ClassB()
+ {
+ var classC = new ClassC();
+ }
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/bin/Release/netstandard2.0/B.deps.json b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/bin/Release/netstandard2.0/B.deps.json
new file mode 100644
index 0000000000..05b1f87d38
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/bin/Release/netstandard2.0/B.deps.json
@@ -0,0 +1,89 @@
+{
+ "runtimeTarget": {
+ "name": ".NETStandard,Version=v2.0/",
+ "signature": "78a9741403957ca1c1f920056c349122a77a62e6"
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETStandard,Version=v2.0": {},
+ ".NETStandard,Version=v2.0/": {
+ "B/1.0.0": {
+ "dependencies": {
+ "C": "1.0.0",
+ "NETStandard.Library": "2.0.3"
+ },
+ "runtime": {
+ "B.dll": {}
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "NETStandard.Library/2.0.3": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0"
+ }
+ },
+ "NLog/4.5.11": {
+ "runtime": {
+ "lib/netstandard2.0/NLog.dll": {
+ "assemblyVersion": "4.0.0.0",
+ "fileVersion": "4.5.11.8645"
+ }
+ }
+ },
+ "C/1.0.0": {
+ "dependencies": {
+ "D": "1.0.0"
+ },
+ "runtime": {
+ "C.dll": {}
+ }
+ },
+ "D/1.0.0": {
+ "dependencies": {
+ "NLog": "4.5.11"
+ },
+ "runtime": {
+ "D.dll": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "B/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-bLpT1f/SFlO1CzqXG12KnJzpZs6lv24uX2Rzi4Fmm0noJpNlnWRVryuO3yK18Ca04t/YHcO1e1Z0WDfjseqNzw==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "NETStandard.Library/2.0.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-s2Ei89UeBS1EmfipIvE+LAocCvKOWSVk+hMkPu8KXAYun9/5AS8m1u+7OIc9ZnAcM0aPGvNNcLSZpf0gCdaE9Q==",
+ "path": "netstandard.library/2.0.3",
+ "hashPath": "netstandard.library.2.0.3.nupkg.sha512"
+ },
+ "NLog/4.5.11": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Yni/XrDfbEhaCSXJsDkmW/n5AunhOxZ7OKKb+0U1I1/d8ZaKt3Jjzf20g/xPiKljmYuZKYqI5iI34g138kK8UQ==",
+ "path": "nlog/4.5.11",
+ "hashPath": "nlog.4.5.11.nupkg.sha512"
+ },
+ "C/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "D/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/bin/Release/netstandard2.0/B.dll b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/bin/Release/netstandard2.0/B.dll
new file mode 100644
index 0000000000..50409d3547
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/bin/Release/netstandard2.0/B.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/bin/Release/netstandard2.0/C.dll b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/bin/Release/netstandard2.0/C.dll
new file mode 100644
index 0000000000..0ed76b86cc
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/bin/Release/netstandard2.0/C.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/bin/Release/netstandard2.0/D.dll b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/bin/Release/netstandard2.0/D.dll
new file mode 100644
index 0000000000..294981701a
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/B/bin/Release/netstandard2.0/D.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/C/C.csproj b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/C/C.csproj
new file mode 100644
index 0000000000..4e749ebaf0
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/C/C.csproj
@@ -0,0 +1,11 @@
+
+
+
+ netstandard2.0
+
+
+
+
+
+
+
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/C/ClassC.cs b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/C/ClassC.cs
new file mode 100644
index 0000000000..838de92136
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/C/ClassC.cs
@@ -0,0 +1,7 @@
+namespace C
+{
+ public class ClassC
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/C/bin/Release/netstandard2.0/C.deps.json b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/C/bin/Release/netstandard2.0/C.deps.json
new file mode 100644
index 0000000000..36586678a1
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/C/bin/Release/netstandard2.0/C.deps.json
@@ -0,0 +1,76 @@
+{
+ "runtimeTarget": {
+ "name": ".NETStandard,Version=v2.0/",
+ "signature": "78a9741403957ca1c1f920056c349122a77a62e6"
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETStandard,Version=v2.0": {},
+ ".NETStandard,Version=v2.0/": {
+ "C/1.0.0": {
+ "dependencies": {
+ "D": "1.0.0",
+ "NETStandard.Library": "2.0.3"
+ },
+ "runtime": {
+ "C.dll": {}
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "NETStandard.Library/2.0.3": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0"
+ }
+ },
+ "NLog/4.5.11": {
+ "runtime": {
+ "lib/netstandard2.0/NLog.dll": {
+ "assemblyVersion": "4.0.0.0",
+ "fileVersion": "4.5.11.8645"
+ }
+ }
+ },
+ "D/1.0.0": {
+ "dependencies": {
+ "NLog": "4.5.11"
+ },
+ "runtime": {
+ "D.dll": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "C/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-bLpT1f/SFlO1CzqXG12KnJzpZs6lv24uX2Rzi4Fmm0noJpNlnWRVryuO3yK18Ca04t/YHcO1e1Z0WDfjseqNzw==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "NETStandard.Library/2.0.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-s2Ei89UeBS1EmfipIvE+LAocCvKOWSVk+hMkPu8KXAYun9/5AS8m1u+7OIc9ZnAcM0aPGvNNcLSZpf0gCdaE9Q==",
+ "path": "netstandard.library/2.0.3",
+ "hashPath": "netstandard.library.2.0.3.nupkg.sha512"
+ },
+ "NLog/4.5.11": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Yni/XrDfbEhaCSXJsDkmW/n5AunhOxZ7OKKb+0U1I1/d8ZaKt3Jjzf20g/xPiKljmYuZKYqI5iI34g138kK8UQ==",
+ "path": "nlog/4.5.11",
+ "hashPath": "nlog.4.5.11.nupkg.sha512"
+ },
+ "D/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/C/bin/Release/netstandard2.0/C.dll b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/C/bin/Release/netstandard2.0/C.dll
new file mode 100644
index 0000000000..0ed76b86cc
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/C/bin/Release/netstandard2.0/C.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/C/bin/Release/netstandard2.0/D.dll b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/C/bin/Release/netstandard2.0/D.dll
new file mode 100644
index 0000000000..294981701a
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/C/bin/Release/netstandard2.0/D.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/D/ClassD.cs b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/D/ClassD.cs
new file mode 100644
index 0000000000..812bcf66d5
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/D/ClassD.cs
@@ -0,0 +1,7 @@
+namespace D
+{
+ public class ClassD
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/D/D.csproj b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/D/D.csproj
new file mode 100644
index 0000000000..3ae75621ce
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/D/D.csproj
@@ -0,0 +1,7 @@
+
+
+
+ netstandard2.0
+
+
+
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/D/bin/Release/netstandard2.0/D.deps.json b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/D/bin/Release/netstandard2.0/D.deps.json
new file mode 100644
index 0000000000..5324d1d859
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/D/bin/Release/netstandard2.0/D.deps.json
@@ -0,0 +1,63 @@
+{
+ "runtimeTarget": {
+ "name": ".NETStandard,Version=v2.0/",
+ "signature": "78a9741403957ca1c1f920056c349122a77a62e6"
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETStandard,Version=v2.0": {},
+ ".NETStandard,Version=v2.0/": {
+ "D/1.0.0": {
+ "dependencies": {
+ "NETStandard.Library": "2.0.3",
+ "NLog": "4.5.11"
+ },
+ "runtime": {
+ "D.dll": {}
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "NETStandard.Library/2.0.3": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0"
+ }
+ },
+ "NLog/4.5.11": {
+ "runtime": {
+ "lib/netstandard2.0/NLog.dll": {
+ "assemblyVersion": "4.0.0.0",
+ "fileVersion": "4.5.11.8645"
+ }
+ }
+ }
+ }
+ },
+ "libraries": {
+ "D/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-bLpT1f/SFlO1CzqXG12KnJzpZs6lv24uX2Rzi4Fmm0noJpNlnWRVryuO3yK18Ca04t/YHcO1e1Z0WDfjseqNzw==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "NETStandard.Library/2.0.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-s2Ei89UeBS1EmfipIvE+LAocCvKOWSVk+hMkPu8KXAYun9/5AS8m1u+7OIc9ZnAcM0aPGvNNcLSZpf0gCdaE9Q==",
+ "path": "netstandard.library/2.0.3",
+ "hashPath": "netstandard.library.2.0.3.nupkg.sha512"
+ },
+ "NLog/4.5.11": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Yni/XrDfbEhaCSXJsDkmW/n5AunhOxZ7OKKb+0U1I1/d8ZaKt3Jjzf20g/xPiKljmYuZKYqI5iI34g138kK8UQ==",
+ "path": "nlog/4.5.11",
+ "hashPath": "nlog.4.5.11.nupkg.sha512"
+ }
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/D/bin/Release/netstandard2.0/D.dll b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/D/bin/Release/netstandard2.0/D.dll
new file mode 100644
index 0000000000..294981701a
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/D/bin/Release/netstandard2.0/D.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/D/paket.references b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/D/paket.references
new file mode 100644
index 0000000000..dcb4cd0aff
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/D/paket.references
@@ -0,0 +1 @@
+nlog
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/i2776.sln b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/i2776.sln
new file mode 100644
index 0000000000..cd4e016c7c
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/i2776.sln
@@ -0,0 +1,34 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "A", "A\A.csproj", "{B9ADBB45-F6D5-4815-8F07-96FB76A3377F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "B", "B\B.csproj", "{7BE2EB0F-1C64-48E9-B83D-08628D4F748E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C", "C\C.csproj", "{82638398-6444-4A3A-9EB5-D2C922BCA8F4}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D", "D\D.csproj", "{8713DFDC-5FB3-4AEC-BEF6-C6B79D5FBB2D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B9ADBB45-F6D5-4815-8F07-96FB76A3377F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B9ADBB45-F6D5-4815-8F07-96FB76A3377F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B9ADBB45-F6D5-4815-8F07-96FB76A3377F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B9ADBB45-F6D5-4815-8F07-96FB76A3377F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7BE2EB0F-1C64-48E9-B83D-08628D4F748E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7BE2EB0F-1C64-48E9-B83D-08628D4F748E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7BE2EB0F-1C64-48E9-B83D-08628D4F748E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7BE2EB0F-1C64-48E9-B83D-08628D4F748E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {82638398-6444-4A3A-9EB5-D2C922BCA8F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {82638398-6444-4A3A-9EB5-D2C922BCA8F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {82638398-6444-4A3A-9EB5-D2C922BCA8F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {82638398-6444-4A3A-9EB5-D2C922BCA8F4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8713DFDC-5FB3-4AEC-BEF6-C6B79D5FBB2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8713DFDC-5FB3-4AEC-BEF6-C6B79D5FBB2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8713DFDC-5FB3-4AEC-BEF6-C6B79D5FBB2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8713DFDC-5FB3-4AEC-BEF6-C6B79D5FBB2D}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/paket.dependencies b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/paket.dependencies
new file mode 100644
index 0000000000..84ba6d35ce
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/paket.dependencies
@@ -0,0 +1,4 @@
+source https://www.nuget.org/api/v2
+framework: netstandard2.0
+
+nuget nlog 4.5.11
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/paket.lock b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/paket.lock
new file mode 100644
index 0000000000..dfd2416544
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-project-refs/before/paket.lock
@@ -0,0 +1,4 @@
+RESTRICTION: == netstandard2.0
+NUGET
+ remote: https://www.nuget.org/api/v2
+ NLog (4.5.11)
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/A.csproj b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/A.csproj
new file mode 100644
index 0000000000..1b7c7c757f
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/A.csproj
@@ -0,0 +1,11 @@
+
+
+
+ netstandard2.0
+
+
+
+
+
+
+
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/ClassA.cs b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/ClassA.cs
new file mode 100644
index 0000000000..7e2dde4d84
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/ClassA.cs
@@ -0,0 +1,12 @@
+using B;
+
+namespace A
+{
+ public class ClassA
+ {
+ public ClassA()
+ {
+ var classB = new ClassB();
+ }
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/bin/Release/netstandard2.0/A.deps.json b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/bin/Release/netstandard2.0/A.deps.json
new file mode 100644
index 0000000000..efd9a1cd50
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/bin/Release/netstandard2.0/A.deps.json
@@ -0,0 +1,102 @@
+{
+ "runtimeTarget": {
+ "name": ".NETStandard,Version=v2.0/",
+ "signature": "78a9741403957ca1c1f920056c349122a77a62e6"
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETStandard,Version=v2.0": {},
+ ".NETStandard,Version=v2.0/": {
+ "A/1.0.0": {
+ "dependencies": {
+ "B": "1.0.0",
+ "NETStandard.Library": "2.0.3"
+ },
+ "runtime": {
+ "A.dll": {}
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "NETStandard.Library/2.0.3": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0"
+ }
+ },
+ "NLog/4.5.11": {
+ "runtime": {
+ "lib/netstandard2.0/NLog.dll": {
+ "assemblyVersion": "4.0.0.0",
+ "fileVersion": "4.5.11.8645"
+ }
+ }
+ },
+ "B/1.0.0": {
+ "dependencies": {
+ "C": "1.0.0"
+ },
+ "runtime": {
+ "B.dll": {}
+ }
+ },
+ "C/1.0.0": {
+ "dependencies": {
+ "D": "1.0.0"
+ },
+ "runtime": {
+ "C.dll": {}
+ }
+ },
+ "D/1.0.0": {
+ "dependencies": {
+ "NLog": "4.5.11"
+ },
+ "runtime": {
+ "D.dll": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "A/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-bLpT1f/SFlO1CzqXG12KnJzpZs6lv24uX2Rzi4Fmm0noJpNlnWRVryuO3yK18Ca04t/YHcO1e1Z0WDfjseqNzw==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "NETStandard.Library/2.0.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-s2Ei89UeBS1EmfipIvE+LAocCvKOWSVk+hMkPu8KXAYun9/5AS8m1u+7OIc9ZnAcM0aPGvNNcLSZpf0gCdaE9Q==",
+ "path": "netstandard.library/2.0.3",
+ "hashPath": "netstandard.library.2.0.3.nupkg.sha512"
+ },
+ "NLog/4.5.11": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Yni/XrDfbEhaCSXJsDkmW/n5AunhOxZ7OKKb+0U1I1/d8ZaKt3Jjzf20g/xPiKljmYuZKYqI5iI34g138kK8UQ==",
+ "path": "nlog/4.5.11",
+ "hashPath": "nlog.4.5.11.nupkg.sha512"
+ },
+ "B/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "C/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "D/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/bin/Release/netstandard2.0/A.dll b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/bin/Release/netstandard2.0/A.dll
new file mode 100644
index 0000000000..a66ce80f09
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/bin/Release/netstandard2.0/A.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/bin/Release/netstandard2.0/B.dll b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/bin/Release/netstandard2.0/B.dll
new file mode 100644
index 0000000000..5ffe070293
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/bin/Release/netstandard2.0/B.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/bin/Release/netstandard2.0/C.dll b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/bin/Release/netstandard2.0/C.dll
new file mode 100644
index 0000000000..3411aad2ba
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/bin/Release/netstandard2.0/C.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/bin/Release/netstandard2.0/D.dll b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/bin/Release/netstandard2.0/D.dll
new file mode 100644
index 0000000000..c477789bba
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/bin/Release/netstandard2.0/D.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/paket.templatetemplate b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/paket.templatetemplate
new file mode 100644
index 0000000000..25d230b135
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/A/paket.templatetemplate
@@ -0,0 +1,3 @@
+type project
+description test
+authors test
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/B.csproj b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/B.csproj
new file mode 100644
index 0000000000..dbe23bd20a
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/B.csproj
@@ -0,0 +1,11 @@
+
+
+
+ netstandard2.0
+
+
+
+
+
+
+
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/ClassB.cs b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/ClassB.cs
new file mode 100644
index 0000000000..84f2f5ebaa
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/ClassB.cs
@@ -0,0 +1,12 @@
+using C;
+
+namespace B
+{
+ public class ClassB
+ {
+ public ClassB()
+ {
+ var classC = new ClassC();
+ }
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/bin/Release/netstandard2.0/B.deps.json b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/bin/Release/netstandard2.0/B.deps.json
new file mode 100644
index 0000000000..05b1f87d38
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/bin/Release/netstandard2.0/B.deps.json
@@ -0,0 +1,89 @@
+{
+ "runtimeTarget": {
+ "name": ".NETStandard,Version=v2.0/",
+ "signature": "78a9741403957ca1c1f920056c349122a77a62e6"
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETStandard,Version=v2.0": {},
+ ".NETStandard,Version=v2.0/": {
+ "B/1.0.0": {
+ "dependencies": {
+ "C": "1.0.0",
+ "NETStandard.Library": "2.0.3"
+ },
+ "runtime": {
+ "B.dll": {}
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "NETStandard.Library/2.0.3": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0"
+ }
+ },
+ "NLog/4.5.11": {
+ "runtime": {
+ "lib/netstandard2.0/NLog.dll": {
+ "assemblyVersion": "4.0.0.0",
+ "fileVersion": "4.5.11.8645"
+ }
+ }
+ },
+ "C/1.0.0": {
+ "dependencies": {
+ "D": "1.0.0"
+ },
+ "runtime": {
+ "C.dll": {}
+ }
+ },
+ "D/1.0.0": {
+ "dependencies": {
+ "NLog": "4.5.11"
+ },
+ "runtime": {
+ "D.dll": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "B/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-bLpT1f/SFlO1CzqXG12KnJzpZs6lv24uX2Rzi4Fmm0noJpNlnWRVryuO3yK18Ca04t/YHcO1e1Z0WDfjseqNzw==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "NETStandard.Library/2.0.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-s2Ei89UeBS1EmfipIvE+LAocCvKOWSVk+hMkPu8KXAYun9/5AS8m1u+7OIc9ZnAcM0aPGvNNcLSZpf0gCdaE9Q==",
+ "path": "netstandard.library/2.0.3",
+ "hashPath": "netstandard.library.2.0.3.nupkg.sha512"
+ },
+ "NLog/4.5.11": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Yni/XrDfbEhaCSXJsDkmW/n5AunhOxZ7OKKb+0U1I1/d8ZaKt3Jjzf20g/xPiKljmYuZKYqI5iI34g138kK8UQ==",
+ "path": "nlog/4.5.11",
+ "hashPath": "nlog.4.5.11.nupkg.sha512"
+ },
+ "C/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "D/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/bin/Release/netstandard2.0/B.dll b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/bin/Release/netstandard2.0/B.dll
new file mode 100644
index 0000000000..5ffe070293
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/bin/Release/netstandard2.0/B.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/bin/Release/netstandard2.0/C.dll b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/bin/Release/netstandard2.0/C.dll
new file mode 100644
index 0000000000..3411aad2ba
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/bin/Release/netstandard2.0/C.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/bin/Release/netstandard2.0/D.dll b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/bin/Release/netstandard2.0/D.dll
new file mode 100644
index 0000000000..c477789bba
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/B/bin/Release/netstandard2.0/D.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/C.csproj b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/C.csproj
new file mode 100644
index 0000000000..b98e0b4ef2
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/C.csproj
@@ -0,0 +1,13 @@
+
+
+
+ netstandard2.0
+
+
+
+
+
+
+
+
+
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/ClassC.cs b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/ClassC.cs
new file mode 100644
index 0000000000..838de92136
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/ClassC.cs
@@ -0,0 +1,7 @@
+namespace C
+{
+ public class ClassC
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/bin/Release/netstandard2.0/C.deps.json b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/bin/Release/netstandard2.0/C.deps.json
new file mode 100644
index 0000000000..36586678a1
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/bin/Release/netstandard2.0/C.deps.json
@@ -0,0 +1,76 @@
+{
+ "runtimeTarget": {
+ "name": ".NETStandard,Version=v2.0/",
+ "signature": "78a9741403957ca1c1f920056c349122a77a62e6"
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETStandard,Version=v2.0": {},
+ ".NETStandard,Version=v2.0/": {
+ "C/1.0.0": {
+ "dependencies": {
+ "D": "1.0.0",
+ "NETStandard.Library": "2.0.3"
+ },
+ "runtime": {
+ "C.dll": {}
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "NETStandard.Library/2.0.3": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0"
+ }
+ },
+ "NLog/4.5.11": {
+ "runtime": {
+ "lib/netstandard2.0/NLog.dll": {
+ "assemblyVersion": "4.0.0.0",
+ "fileVersion": "4.5.11.8645"
+ }
+ }
+ },
+ "D/1.0.0": {
+ "dependencies": {
+ "NLog": "4.5.11"
+ },
+ "runtime": {
+ "D.dll": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "C/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-bLpT1f/SFlO1CzqXG12KnJzpZs6lv24uX2Rzi4Fmm0noJpNlnWRVryuO3yK18Ca04t/YHcO1e1Z0WDfjseqNzw==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "NETStandard.Library/2.0.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-s2Ei89UeBS1EmfipIvE+LAocCvKOWSVk+hMkPu8KXAYun9/5AS8m1u+7OIc9ZnAcM0aPGvNNcLSZpf0gCdaE9Q==",
+ "path": "netstandard.library/2.0.3",
+ "hashPath": "netstandard.library.2.0.3.nupkg.sha512"
+ },
+ "NLog/4.5.11": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Yni/XrDfbEhaCSXJsDkmW/n5AunhOxZ7OKKb+0U1I1/d8ZaKt3Jjzf20g/xPiKljmYuZKYqI5iI34g138kK8UQ==",
+ "path": "nlog/4.5.11",
+ "hashPath": "nlog.4.5.11.nupkg.sha512"
+ },
+ "D/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/bin/Release/netstandard2.0/C.dll b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/bin/Release/netstandard2.0/C.dll
new file mode 100644
index 0000000000..3411aad2ba
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/bin/Release/netstandard2.0/C.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/bin/Release/netstandard2.0/D.dll b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/bin/Release/netstandard2.0/D.dll
new file mode 100644
index 0000000000..c477789bba
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/bin/Release/netstandard2.0/D.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/paket.references b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/paket.references
new file mode 100644
index 0000000000..dcb4cd0aff
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/paket.references
@@ -0,0 +1 @@
+nlog
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/paket.templatetemplate b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/paket.templatetemplate
new file mode 100644
index 0000000000..25d230b135
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/C/paket.templatetemplate
@@ -0,0 +1,3 @@
+type project
+description test
+authors test
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/D/ClassD.cs b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/D/ClassD.cs
new file mode 100644
index 0000000000..812bcf66d5
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/D/ClassD.cs
@@ -0,0 +1,7 @@
+namespace D
+{
+ public class ClassD
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/D/D.csproj b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/D/D.csproj
new file mode 100644
index 0000000000..fb0e627dae
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/D/D.csproj
@@ -0,0 +1,7 @@
+
+
+
+ netstandard2.0
+
+
+
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/D/bin/Release/netstandard2.0/D.deps.json b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/D/bin/Release/netstandard2.0/D.deps.json
new file mode 100644
index 0000000000..5324d1d859
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/D/bin/Release/netstandard2.0/D.deps.json
@@ -0,0 +1,63 @@
+{
+ "runtimeTarget": {
+ "name": ".NETStandard,Version=v2.0/",
+ "signature": "78a9741403957ca1c1f920056c349122a77a62e6"
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETStandard,Version=v2.0": {},
+ ".NETStandard,Version=v2.0/": {
+ "D/1.0.0": {
+ "dependencies": {
+ "NETStandard.Library": "2.0.3",
+ "NLog": "4.5.11"
+ },
+ "runtime": {
+ "D.dll": {}
+ }
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {},
+ "NETStandard.Library/2.0.3": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0"
+ }
+ },
+ "NLog/4.5.11": {
+ "runtime": {
+ "lib/netstandard2.0/NLog.dll": {
+ "assemblyVersion": "4.0.0.0",
+ "fileVersion": "4.5.11.8645"
+ }
+ }
+ }
+ }
+ },
+ "libraries": {
+ "D/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ },
+ "Microsoft.NETCore.Platforms/1.1.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-bLpT1f/SFlO1CzqXG12KnJzpZs6lv24uX2Rzi4Fmm0noJpNlnWRVryuO3yK18Ca04t/YHcO1e1Z0WDfjseqNzw==",
+ "path": "microsoft.netcore.platforms/1.1.0",
+ "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
+ },
+ "NETStandard.Library/2.0.3": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-s2Ei89UeBS1EmfipIvE+LAocCvKOWSVk+hMkPu8KXAYun9/5AS8m1u+7OIc9ZnAcM0aPGvNNcLSZpf0gCdaE9Q==",
+ "path": "netstandard.library/2.0.3",
+ "hashPath": "netstandard.library.2.0.3.nupkg.sha512"
+ },
+ "NLog/4.5.11": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-Yni/XrDfbEhaCSXJsDkmW/n5AunhOxZ7OKKb+0U1I1/d8ZaKt3Jjzf20g/xPiKljmYuZKYqI5iI34g138kK8UQ==",
+ "path": "nlog/4.5.11",
+ "hashPath": "nlog.4.5.11.nupkg.sha512"
+ }
+ }
+}
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/D/bin/Release/netstandard2.0/D.dll b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/D/bin/Release/netstandard2.0/D.dll
new file mode 100644
index 0000000000..c477789bba
Binary files /dev/null and b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/D/bin/Release/netstandard2.0/D.dll differ
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/D/paket.references b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/D/paket.references
new file mode 100644
index 0000000000..dcb4cd0aff
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/D/paket.references
@@ -0,0 +1 @@
+nlog
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/i2776.sln b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/i2776.sln
new file mode 100644
index 0000000000..cd4e016c7c
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/i2776.sln
@@ -0,0 +1,34 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "A", "A\A.csproj", "{B9ADBB45-F6D5-4815-8F07-96FB76A3377F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "B", "B\B.csproj", "{7BE2EB0F-1C64-48E9-B83D-08628D4F748E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C", "C\C.csproj", "{82638398-6444-4A3A-9EB5-D2C922BCA8F4}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D", "D\D.csproj", "{8713DFDC-5FB3-4AEC-BEF6-C6B79D5FBB2D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B9ADBB45-F6D5-4815-8F07-96FB76A3377F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B9ADBB45-F6D5-4815-8F07-96FB76A3377F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B9ADBB45-F6D5-4815-8F07-96FB76A3377F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B9ADBB45-F6D5-4815-8F07-96FB76A3377F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7BE2EB0F-1C64-48E9-B83D-08628D4F748E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7BE2EB0F-1C64-48E9-B83D-08628D4F748E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7BE2EB0F-1C64-48E9-B83D-08628D4F748E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7BE2EB0F-1C64-48E9-B83D-08628D4F748E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {82638398-6444-4A3A-9EB5-D2C922BCA8F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {82638398-6444-4A3A-9EB5-D2C922BCA8F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {82638398-6444-4A3A-9EB5-D2C922BCA8F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {82638398-6444-4A3A-9EB5-D2C922BCA8F4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8713DFDC-5FB3-4AEC-BEF6-C6B79D5FBB2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8713DFDC-5FB3-4AEC-BEF6-C6B79D5FBB2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8713DFDC-5FB3-4AEC-BEF6-C6B79D5FBB2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8713DFDC-5FB3-4AEC-BEF6-C6B79D5FBB2D}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/paket.dependencies b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/paket.dependencies
new file mode 100644
index 0000000000..84ba6d35ce
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/paket.dependencies
@@ -0,0 +1,4 @@
+source https://www.nuget.org/api/v2
+framework: netstandard2.0
+
+nuget nlog 4.5.11
\ No newline at end of file
diff --git a/integrationtests/scenarios/i002776-pack-transitive-with-template/before/paket.lock b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/paket.lock
new file mode 100644
index 0000000000..dfd2416544
--- /dev/null
+++ b/integrationtests/scenarios/i002776-pack-transitive-with-template/before/paket.lock
@@ -0,0 +1,4 @@
+RESTRICTION: == netstandard2.0
+NUGET
+ remote: https://www.nuget.org/api/v2
+ NLog (4.5.11)
diff --git a/integrationtests/scenarios/loading-scripts/add-namespace/before/paket.dependencies b/integrationtests/scenarios/loading-scripts/add-namespace/before/paket.dependencies
new file mode 100644
index 0000000000..051a69ff5a
--- /dev/null
+++ b/integrationtests/scenarios/loading-scripts/add-namespace/before/paket.dependencies
@@ -0,0 +1,4 @@
+generate_load_scripts: true
+source https://www.nuget.org/api/v2
+framework: net45
+nuget NLog 4.5.10
\ No newline at end of file
diff --git a/paket.dependencies b/paket.dependencies
index 5f38957043..6996a046ed 100644
--- a/paket.dependencies
+++ b/paket.dependencies
@@ -1,9 +1,10 @@
+version 5.197.0
source https://nuget.org/api/v2
content: none
nuget Newtonsoft.Json redirects: force
nuget Argu >= 5.1.0
-nuget FSharp.Core < 4.5 redirects: force
+nuget FSharp.Core > 4.3 lowest_matching: true, redirects: force
nuget Chessie >= 0.6
nuget Mono.Cecil prerelease
diff --git a/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs b/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs
index 6b20851e62..7e53595cf9 100644
--- a/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs
+++ b/src/Paket.Bootstrapper/Properties/AssemblyInfo.cs
@@ -4,16 +4,16 @@
[assembly: AssemblyTitleAttribute("Paket.Bootstrapper")]
[assembly: AssemblyProductAttribute("Paket")]
[assembly: AssemblyDescriptionAttribute("A dependency manager for .NET with support for NuGet packages and git repositories.")]
-[assembly: AssemblyVersionAttribute("5.182.0")]
-[assembly: AssemblyFileVersionAttribute("5.182.0")]
-[assembly: AssemblyInformationalVersionAttribute("5.182.0-alpha002")]
+[assembly: AssemblyVersionAttribute("5.198.0")]
+[assembly: AssemblyFileVersionAttribute("5.198.0")]
+[assembly: AssemblyInformationalVersionAttribute("5.198.0")]
namespace System {
internal static class AssemblyVersionInformation {
internal const System.String AssemblyTitle = "Paket.Bootstrapper";
internal const System.String AssemblyProduct = "Paket";
internal const System.String AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories.";
- internal const System.String AssemblyVersion = "5.182.0";
- internal const System.String AssemblyFileVersion = "5.182.0";
- internal const System.String AssemblyInformationalVersion = "5.182.0-alpha002";
+ internal const System.String AssemblyVersion = "5.198.0";
+ internal const System.String AssemblyFileVersion = "5.198.0";
+ internal const System.String AssemblyInformationalVersion = "5.198.0";
}
}
diff --git a/src/Paket.Core.preview3/Paket.Core.fsproj b/src/Paket.Core.preview3/Paket.Core.fsproj
index c9b427fb7e..1e7d9283f7 100644
--- a/src/Paket.Core.preview3/Paket.Core.fsproj
+++ b/src/Paket.Core.preview3/Paket.Core.fsproj
@@ -33,6 +33,7 @@
+
diff --git a/src/Paket.Core/AssemblyInfo.fs b/src/Paket.Core/AssemblyInfo.fs
index 44e856f3a5..1831e53d7e 100644
--- a/src/Paket.Core/AssemblyInfo.fs
+++ b/src/Paket.Core/AssemblyInfo.fs
@@ -6,9 +6,9 @@ open System.Reflection
[]
[]
[]
-[]
-[]
-[]
+[]
+[]
+[]
do ()
module internal AssemblyVersionInformation =
@@ -16,6 +16,6 @@ module internal AssemblyVersionInformation =
let [] AssemblyProduct = "Paket"
let [] AssemblyCompany = "Paket team"
let [] AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories."
- let [] AssemblyVersion = "5.182.0"
- let [] AssemblyFileVersion = "5.182.0"
- let [] AssemblyInformationalVersion = "5.182.0-alpha002"
+ let [] AssemblyVersion = "5.198.0"
+ let [] AssemblyFileVersion = "5.198.0"
+ let [] AssemblyInformationalVersion = "5.198.0"
diff --git a/src/Paket.Core/Common/Domain.fs b/src/Paket.Core/Common/Domain.fs
index 20b26ac68c..671394f224 100644
--- a/src/Paket.Core/Common/Domain.fs
+++ b/src/Paket.Core/Common/Domain.fs
@@ -42,7 +42,7 @@ let PackageName(name:string) =
/// Represents a normalized group name
-[]
+[]
[]
type GroupName =
| GroupName of name:string * compareString:string
diff --git a/src/Paket.Core/Common/NetUtils.fs b/src/Paket.Core/Common/NetUtils.fs
index 863a16f4a3..4aa7f1036c 100644
--- a/src/Paket.Core/Common/NetUtils.fs
+++ b/src/Paket.Core/Common/NetUtils.fs
@@ -322,7 +322,6 @@ type HttpClient with
|> Encoding.UTF8.GetBytes
let newlineBytes = Environment.NewLine |> Encoding.UTF8.GetBytes
let trailerbytes = String.Format(System.Globalization.CultureInfo.InvariantCulture, "--{0}--", boundary) |> Encoding.UTF8.GetBytes
- x.DefaultRequestHeaders.Add("ContentType", "multipart/form-data; boundary=" + boundary)
use stream = new MemoryStream() // x.OpenWrite(url, "PUT")
stream.Write(fileHeaderBytes, 0, fileHeaderBytes.Length)
use fileStream = File.OpenRead fileInfo.FullName
@@ -331,7 +330,9 @@ type HttpClient with
stream.Write(trailerbytes, 0, trailerbytes.Length)
stream.Write(newlineBytes, 0, newlineBytes.Length)
stream.Position <- 0L
- let result = x.PutAsync(url, new StreamContent(stream)).GetAwaiter().GetResult()
+ use content = new StreamContent(stream)
+ content.Headers.Add("Content-Type", "multipart/form-data; boundary=" + boundary)
+ let result = x.PutAsync(url, content).GetAwaiter().GetResult()
failIfNoSuccess result |> Async.RunSynchronously
result
@@ -396,7 +397,7 @@ let createHttpClient (url,auth:Auth option) =
//client.Credentials <- new NetworkCredential(auth.Username,auth.Password)
//so use THIS instead to send credentials RIGHT AWAY
- let credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(username + ":" + password))
+ let credentials = Convert.ToBase64String(Encoding.UTF8.GetBytes(username + ":" + password))
client.DefaultRequestHeaders.Authorization <-
new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", credentials)
| Some(Credentials({Username = username; Password = password; Type = AuthType.NTLM})) ->
@@ -422,8 +423,6 @@ let createWebClient (url,auth:Auth option) =
client.Headers.Add("User-Agent", "Paket")
client.Proxy <- getDefaultProxyFor url
- let githubToken = Environment.GetEnvironmentVariable "PAKET_GITHUB_API_TOKEN"
-
match auth with
| Some (Credentials({Username = username; Password = password; Type = AuthType.Basic})) ->
// htttp://stackoverflow.com/questions/16044313/webclient-httpwebrequest-with-basic-authentication-returns-404-not-found-for-v/26016919#26016919
@@ -433,7 +432,7 @@ let createWebClient (url,auth:Auth option) =
//client.Credentials <- new NetworkCredential(auth.Username,auth.Password)
//so use THIS instead to send credentials RIGHT AWAY
- let credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(username + ":" + password))
+ let credentials = Convert.ToBase64String(Encoding.UTF8.GetBytes(username + ":" + password))
client.Headers.[HttpRequestHeader.Authorization] <- sprintf "Basic %s" credentials
client.Credentials <- new NetworkCredential(username,password)
| Some (Credentials{Username = username; Password = password; Type = AuthType.NTLM}) ->
@@ -441,8 +440,6 @@ let createWebClient (url,auth:Auth option) =
client.Credentials <- cred.GetCredential(new Uri(url), "NTLM")
| Some (Token token) ->
client.Headers.[HttpRequestHeader.Authorization] <- sprintf "token %s" token
- | None when not (isNull githubToken) ->
- client.Headers.[HttpRequestHeader.Authorization] <- sprintf "token %s" githubToken
| None ->
client.UseDefaultCredentials <- true
client
diff --git a/src/Paket.Core/Common/Utils.fs b/src/Paket.Core/Common/Utils.fs
index 3dabf4611f..9a852ba4ff 100644
--- a/src/Paket.Core/Common/Utils.fs
+++ b/src/Paket.Core/Common/Utils.fs
@@ -486,27 +486,33 @@ let RunInLockedAccessMode(lockedFolder,action) =
tracefn "Could not acquire lock to %s.%s%s%sTrials left: %d." fileName Environment.NewLine exn.Message Environment.NewLine trials
acquireLock startTime timeOut trials
else
- raise (Exception(sprintf "Could not acquire lock to '%s'." fileName, exn))
+ failwithf "Could not acquire lock to '%s'. No more trials left" fileName
- let rec releaseLock() =
+ let rec releaseLock trials =
try
if File.Exists fileName then
let content = File.ReadAllText fileName
if content = string p.Id then
File.Delete fileName
with
- | _ -> releaseLock()
+ | exn when trials > 0 ->
+ Thread.Sleep 100
+ let trials = trials - 1
+ tracefn "Could not release lock to %s.%s%s%sTrials left: %d." fileName Environment.NewLine exn.Message Environment.NewLine trials
+ releaseLock trials
+ | _ ->
+ ()
try
acquireLock DateTime.Now (TimeSpan.FromMinutes 10.) 100
let result = action()
- releaseLock()
+ releaseLock 5
result
with
| _ ->
- releaseLock()
+ releaseLock 5
reraise()
diff --git a/src/Paket.Core/Dependencies/NuGet.fs b/src/Paket.Core/Dependencies/NuGet.fs
index 2e39a9cc4e..13d454474f 100644
--- a/src/Paket.Core/Dependencies/NuGet.fs
+++ b/src/Paket.Core/Dependencies/NuGet.fs
@@ -1,4 +1,4 @@
-module Paket.NuGet
+module Paket.NuGet
// Type forwards, this way we only need to open "Paket.NuGet" thoughout paket code (others are implementation detail)
type UnparsedPackageFile = Paket.NuGetCache.UnparsedPackageFile
@@ -19,6 +19,7 @@ open FSharp.Polyfill
open Paket.NuGetCache
open Paket.PackageResolver
open System.Net.Http
+open System.Threading
type NuGetContent =
| NuGetDirectory of name:string * contents:NuGetContent list
@@ -880,6 +881,34 @@ let private downloadAndExtractPackage(alternativeProjectRoot, root, isLocalOverr
ensureDir targetFileName
use _trackDownload = Profile.startCategory Profile.Category.NuGetDownload
+ let! cancellationToken = Async.CancellationToken
+
+ // default of three minute timeout
+ let defaultTimeout = 180000
+ let getTimeoutOrDefaultValue registryEntry defaultValue =
+ match Environment.GetEnvironmentVariable registryEntry with
+ | a when System.String.IsNullOrWhiteSpace a -> defaultValue
+ | a ->
+ match System.Int32.TryParse a with
+ | true, v -> v
+ | _ -> traceWarnfn "%s is not set to an interval in milliseconds, ignoring the value and defaulting to %d" registryEntry defaultValue
+ defaultValue
+
+ // timeout for the request of the package to be downloaded
+ let requestTimeout =
+ getTimeoutOrDefaultValue "PAKET_REQUEST_TIMEOUT" defaultTimeout
+ // timeout for response of the stream for the package to be downloaded
+ let responseStreamTimeout =
+ getTimeoutOrDefaultValue "PAKET_RESPONSE_STREAM_TIMEOUT" defaultTimeout
+ // timeout for the read and write stream operations on the package to be downloaded
+ let streamReadWriteTimeout =
+ getTimeoutOrDefaultValue "PAKET_STREAMREADWRITE_TIMEOUT" defaultTimeout
+
+ let requestTokenSource = System.Threading.CancellationTokenSource.CreateLinkedTokenSource cancellationToken
+ let streamReadWriteTokenSource = System.Threading.CancellationTokenSource.CreateLinkedTokenSource cancellationToken
+
+ streamReadWriteTokenSource.CancelAfter streamReadWriteTimeout
+ requestTokenSource.CancelAfter requestTimeout
let client = NetUtils.createHttpClient(!downloadUrl, source.Auth.Retrieve (attempt <> 0))
@@ -887,12 +916,15 @@ let private downloadAndExtractPackage(alternativeProjectRoot, root, isLocalOverr
let mutable readSinceLastMeasure = 0L
let requestMsg = new HttpRequestMessage(HttpMethod.Get, downloadUri)
- let! responseMsg = client.SendAsync(requestMsg) |> Async.AwaitTask
+ let! responseMsg = client.SendAsync(requestMsg, HttpCompletionOption.ResponseHeadersRead, requestTokenSource.Token) |> Async.AwaitTask
match responseMsg.StatusCode with
| HttpStatusCode.OK -> ()
| statusCode -> failwithf "HTTP status code was %d - %O" (int statusCode) statusCode
let! httpResponseStream = responseMsg.Content.ReadAsStreamAsync() |> Async.AwaitTask
+
+ if httpResponseStream.CanTimeout
+ then httpResponseStream.ReadTimeout <- responseStreamTimeout;
let bufferSize = 1024 * 10
let buffer : byte [] = Array.zeroCreate bufferSize
@@ -903,7 +935,6 @@ let private downloadAndExtractPackage(alternativeProjectRoot, root, isLocalOverr
let mutable pos = 0L
let length = try Some httpResponseStream.Length with :? System.NotSupportedException -> None
- let! tok = Async.CancellationToken
while !bytesRead <> 0 do
if printProgress && lastSpeedMeasure.Elapsed > TimeSpan.FromSeconds(10.) then
// report speed and progress
@@ -915,14 +946,11 @@ let private downloadAndExtractPackage(alternativeProjectRoot, root, isLocalOverr
tracefn "Still downloading from %O to %s (%d kbit/s, %s %%)" !downloadUrl targetFileName speed percent
readSinceLastMeasure <- 0L
lastSpeedMeasure.Restart()
- // if there is no response for a minute -> abort
- let s = System.Threading.CancellationTokenSource.CreateLinkedTokenSource(tok)
- s.CancelAfter (60000)
- let! bytes = httpResponseStream.ReadAsync(buffer, 0, bufferSize, s.Token) |> Async.AwaitTaskWithoutAggregate
- //let! bytes = httpResponseStream.AsyncRead(buffer, 0, bufferSize)
+ // if there is no response for streamReadWriteTimeout milliseconds -> abort
+ let! bytes = httpResponseStream.ReadAsync(buffer, 0, bufferSize, streamReadWriteTokenSource.Token) |> Async.AwaitTaskWithoutAggregate
bytesRead := bytes
- do! fileStream.WriteAsync(buffer, 0, !bytesRead, tok) |> Async.AwaitTaskWithoutAggregate
+ do! fileStream.WriteAsync(buffer, 0, !bytesRead, streamReadWriteTokenSource.Token) |> Async.AwaitTaskWithoutAggregate
readSinceLastMeasure <- readSinceLastMeasure + int64 bytes
pos <- pos + int64 bytes
diff --git a/src/Paket.Core/Installation/BindingRedirects.fs b/src/Paket.Core/Installation/BindingRedirects.fs
index 34bd4eb76f..e9569bc819 100644
--- a/src/Paket.Core/Installation/BindingRedirects.fs
+++ b/src/Paket.Core/Installation/BindingRedirects.fs
@@ -84,23 +84,14 @@ let internal indentAssemblyBindings config =
parent.Remove()
let private configFiles = [ "app"; "web" ] |> Set.ofList
-let private projectFiles = [ ".csproj"; ".vbproj"; ".fsproj"; ".wixproj"; ".nproj"; ".vcxproj"; ".pyproj"; ".sfproj" ] |> Set.ofList
+let private projectFiles = [ ".csproj"; ".vbproj"; ".fsproj"; ".wixproj"; ".nproj"; ".vcxproj"; ".pyproj"; ".sfproj"; ".sqlproj" ] |> Set.ofList
let private toLower (s:string) = s.ToLower()
let private isAppOrWebConfig = configFiles.Contains << (Path.GetFileNameWithoutExtension >> toLower)
-let private isDotNetProject = projectFiles.Contains << (Path.GetExtension >> toLower)
let internal getConfig getFiles directory =
getFiles(directory, "*.config", SearchOption.AllDirectories)
|> Seq.tryFind isAppOrWebConfig
-
-let internal getProjectFilesWithPaketReferences getFiles rootPath =
- getFiles(rootPath, "*.references", SearchOption.AllDirectories)
- |> Seq.choose (fun f ->
- let fi = FileInfo(f)
- if fi.Name.EndsWith Constants.ReferencesFile then Some fi.Directory.FullName else None)
- |> Seq.choose(fun directory -> getFiles(directory, "*proj", SearchOption.TopDirectoryOnly) |> Seq.tryFind (Path.GetExtension >> isDotNetProject))
- |> Seq.toList
-
+
let private baseConfig = """
@@ -167,9 +158,25 @@ let private applyBindingRedirects isFirstGroup cleanBindingRedirects (allKnownLi
use f = File.Open(configFilePath, FileMode.Create)
config.Save(f, SaveOptions.DisableFormatting)
- match projectFile.GetAutoGenerateBindingRedirects() with
- | Some x when x.ToLower() = "true" -> ignore()
- | _ -> projectFile.SetOrCreateAutoGenerateBindingRedirects()
+ match projectFile.OutputType, projectFile.GetAutoGenerateBindingRedirects() with
+ | ProjectOutputType.Exe, _ -> ignore()
+ | _, Some x when x.ToLower() = "true" -> ignore()
+ | _, _ -> projectFile.SetOrCreateAutoGenerateBindingRedirects()
+
+let findAllReferencesFiles root =
+ let findRefFile (p:ProjectFile) =
+ match p.FindReferencesFile() with
+ | Some fileName ->
+ try
+ Some(p)
+ with e ->
+ None
+ | None ->
+ None
+
+ ProjectFile.FindAllProjects root
+ |> Array.choose findRefFile
+
/// Applies a set of binding redirects to all .config files in a specific folder.
let applyBindingRedirectsToFolder isFirstGroup createNewBindingFiles cleanBindingRedirects rootPath allKnownLibNames bindingRedirects =
@@ -187,13 +194,7 @@ let applyBindingRedirectsToFolder isFirstGroup createNewBindingFiles cleanBindin
| _ -> None
|> Option.iter (applyBindingRedirects isFirstGroup cleanBindingRedirects allKnownLibNames bindingRedirects projectFile)
- let projects =
- rootPath
- |> getProjectFilesWithPaketReferences Directory.GetFiles
- |> Seq.map ProjectFile.TryLoad
- |> Seq.choose id
-
- for p in projects do
+ for p in findAllReferencesFiles rootPath do
applyBindingRedirects p
/// Calculates the short form of the public key token for use with binding redirects, if it exists.
diff --git a/src/Paket.Core/Installation/DependencyChangeDetection.fs b/src/Paket.Core/Installation/DependencyChangeDetection.fs
index d63c6764f6..95ed50abf0 100644
--- a/src/Paket.Core/Installation/DependencyChangeDetection.fs
+++ b/src/Paket.Core/Installation/DependencyChangeDetection.fs
@@ -22,7 +22,7 @@ let findNuGetChangesInDependenciesFile(dependenciesFile:DependenciesFile,lockFil
let getChanges groupName transitives (newRequirement:PackageRequirement) (originalPackage:PackageInfo) =
let settingsChanged() =
if newRequirement.Settings <> originalPackage.Settings then
- if newRequirement.Settings = { originalPackage.Resolved.Settings with FrameworkRestrictions = AutoDetectFramework } then
+ if newRequirement.Settings = { originalPackage.Settings with FrameworkRestrictions = AutoDetectFramework } then
[]
else
let isTransitive = transitives |> Seq.contains originalPackage.Name
diff --git a/src/Paket.Core/Installation/InstallProcess.fs b/src/Paket.Core/Installation/InstallProcess.fs
index 35287923fc..66379cd181 100644
--- a/src/Paket.Core/Installation/InstallProcess.fs
+++ b/src/Paket.Core/Installation/InstallProcess.fs
@@ -367,9 +367,10 @@ let InstallIntoProjects(options : InstallerOptions, forceTouch, dependenciesFile
let prefix = dependenciesFile.Directory.Length + 1
let norm (s:string) = (s.Substring prefix).Replace('\\', '/')
-
+
+ tracefn " - Installing for projects"
for project, referenceFile in projectsAndReferences do
- tracefn " - %s -> %s" (norm referenceFile.FileName) (norm project.FileName)
+ tracefn " - %s -> %s" (norm referenceFile.FileName) (norm project.FileName)
let toolsVersion = project.GetToolsVersion()
if verbose then
verbosefn "Installing to %s with ToolsVersion %O" project.FileName toolsVersion
@@ -537,6 +538,8 @@ let InstallIntoProjects(options : InstallerOptions, forceTouch, dependenciesFile
) |> Seq.toList
if toolsVersion >= 15.0 then
+ let resolved = lazy(model |> Map.map (fun k v -> fst v))
+ let _referencesFile = Paket.RestoreProcess.RestoreNewSdkProject lockFile resolved lockFile.Groups project None
processContentFiles root project Map.empty gitRemoteItems options
else
processContentFiles root project usedPackages gitRemoteItems options
@@ -581,6 +584,10 @@ let InstallIntoProjects(options : InstallerOptions, forceTouch, dependenciesFile
projectCache
first := false
+ let restoreCacheFile = Path.Combine(root, Constants.PaketRestoreHashFilePath)
+ Paket.RestoreProcess.saveToFile (lockFile.ToString()) (FileInfo restoreCacheFile) |> ignore
+ Paket.RestoreProcess.WriteGitignore restoreCacheFile
+
/// Installs all packages from the lock file.
let Install(options : InstallerOptions, forceTouch, dependenciesFile, lockFile : LockFile, updatedGroups) =
let root = FileInfo(lockFile.FileName).Directory.FullName
diff --git a/src/Paket.Core/Installation/RestoreProcess.fs b/src/Paket.Core/Installation/RestoreProcess.fs
index 31bf5b4e2c..9a0d6fc387 100644
--- a/src/Paket.Core/Installation/RestoreProcess.fs
+++ b/src/Paket.Core/Installation/RestoreProcess.fs
@@ -193,17 +193,22 @@ let saveToFile newContent (targetFile:FileInfo) =
File.ReadAllText targetFile.FullName
else
""
+
+ let written =
+ if newContent <> oldContent then
+ if verbose then
+ tracefn " - %s created" targetFile.FullName
- if newContent <> oldContent then
- if verbose then
- tracefn " - %s created" targetFile.FullName
-
- File.WriteAllText(targetFile.FullName,newContent)
- else
- if verbose then
- tracefn " - %s already up-to-date" targetFile.FullName
+ if targetFile.Exists then
+ File.SetAttributes(targetFile.FullName,IO.FileAttributes.Normal)
+ File.WriteAllText(targetFile.FullName,newContent)
+ true
+ else
+ if verbose then
+ tracefn " - %s already up-to-date" targetFile.FullName
+ false
- targetFile.FullName
+ written,targetFile.FullName
with
| exn when trials > 0 ->
if verbose then
@@ -235,7 +240,7 @@ let extractRestoreTargets root =
else
let result = extractElement root "Paket.Restore.targets"
copiedElements := true
- result
+ result |> snd
let CreateInstallModel(alternativeProjectRoot, root, groupName, sources, caches, force, package) =
async {
@@ -317,13 +322,14 @@ let createPaketPropsFile (lockFile:LockFile) (cliTools:ResolvedPackage seq) (pac
yield! packageReferences
yield " "])
|> fun xs -> String.Join(Environment.NewLine,xs)
-
+
+ // When updating the PaketPropsVersion be sure to update the Paket.Restore.targets which checks this value
let content =
sprintf """
$(MSBuildAllProjects);$(MSBuildThisFileFullPath)
- 5.174.2
+ 5.185.3
true
%s
@@ -332,7 +338,7 @@ let createPaketPropsFile (lockFile:LockFile) (cliTools:ResolvedPackage seq) (pac
cliParts
packagesParts
- saveToFile content fileInfo |> ignore
+ saveToFile content fileInfo
let createPaketCLIToolsFile (cliTools:ResolvedPackage seq) (fileInfo:FileInfo) =
if Seq.isEmpty cliTools then
@@ -471,7 +477,14 @@ let createProjectReferencesFiles (lockFile:LockFile) (projectFile:ProjectFile) (
createPaketCLIToolsFile cliTools paketCLIToolsFileName
let propsFile = ProjectFile.getPaketPropsFileInfo projectFileInfo
- createPaketPropsFile lockFile cliTools packages propsFile
+ let written,_ = createPaketPropsFile lockFile cliTools packages propsFile
+ if written then
+ try
+ let fi = FileInfo(Path.Combine(projectFileInfo.Directory.FullName,"obj","project.assets.json"))
+ if fi.Exists then
+ fi.Delete()
+ with
+ | _ -> ()
// Write "cached" file, this way msbuild can check if the references file has changed.
let paketCachedReferencesFileName = FileInfo(Path.Combine(projectFileInfo.Directory.FullName,"obj",projectFileInfo.Name + ".paket.references.cached"))
@@ -546,6 +559,20 @@ let private isRestoreUpDoDate (lockFileName:FileInfo) (lockFileContents:string)
oldContents = lockFileContents
else false
+let internal WriteGitignore restoreCacheFile =
+ let folder = FileInfo(restoreCacheFile).Directory
+ let rec isGitManaged (folder:DirectoryInfo) =
+ if File.Exists(Path.Combine(folder.FullName, ".gitignore")) then true else
+ if isNull folder.Parent then false else
+ isGitManaged folder.Parent
+
+ if isGitManaged folder.Parent then
+ let restoreCacheGitIgnoreFile = Path.Combine(folder.FullName, ".gitignore")
+ let contents =
+ ".gitignore\npaket.restore.cached"
+ |> normalizeLineEndings
+ saveToFile contents (FileInfo restoreCacheGitIgnoreFile) |> ignore
+
let IsRestoreUpToDate(lockFileName:FileInfo) =
let newContents = File.ReadAllText(lockFileName.FullName)
isRestoreUpDoDate lockFileName newContents
@@ -688,5 +715,6 @@ let Restore(dependenciesFileName,projectFile,force,group,referencesFileNames,ign
CreateScriptsForGroups lockFile.Value groups
if isFullRestore then
let restoreCacheFile = Path.Combine(root, Constants.PaketRestoreHashFilePath)
- File.WriteAllText(restoreCacheFile, newContents))
+ saveToFile newContents (FileInfo restoreCacheFile) |> ignore
+ WriteGitignore restoreCacheFile)
)
diff --git a/src/Paket.Core/Installation/ScriptGeneration.fs b/src/Paket.Core/Installation/ScriptGeneration.fs
index 9b9d1ced00..d201bc0fb0 100644
--- a/src/Paket.Core/Installation/ScriptGeneration.fs
+++ b/src/Paket.Core/Installation/ScriptGeneration.fs
@@ -114,6 +114,8 @@ module ScriptGeneration =
(Uri scriptFile.FullName).MakeRelativeUri(Uri libFile.FullName).ToString()
else libFile.FullName
+ let paketNamespace = "namespace PaketLoadScripts\n"
+
// create the approiate load string for the target resource
let refString (reference:ReferenceType) =
let escapeString (s:string) =
@@ -126,7 +128,7 @@ module ScriptGeneration =
| Framework name,_ ->
sprintf """#r "%s" """ (escapeString name)
- self.Input |> Seq.map refString |> Seq.distinct |> String.concat "\n"
+ self.Input |> Seq.map refString |> Seq.append [paketNamespace] |> Seq.distinct |> String.concat "\n"
/// use the provided directory to compute the relative paths for the script's contents
/// and construct the
diff --git a/src/Paket.Core/PackageManagement/Releases.fs b/src/Paket.Core/PackageManagement/Releases.fs
index 7307788283..ab04481e9d 100644
--- a/src/Paket.Core/PackageManagement/Releases.fs
+++ b/src/Paket.Core/PackageManagement/Releases.fs
@@ -27,7 +27,10 @@ let private doesNotExistsOrIsNewer (file : FileInfo) latest =
/// Downloads the latest version of the given files to the destination dir
let private downloadLatestVersionOf files destDir =
- use client = createHttpClient(Constants.GitHubUrl, None)
+ let auth = Environment.GetEnvironmentVariable "PAKET_GITHUB_API_TOKEN"
+ |> fun x -> if isNull(x) then None else Some(Token(x))
+
+ use client = createHttpClient(Constants.GitHubUrl, auth)
trial {
let latest = "https://github.com/fsprojects/Paket/releases/latest";
diff --git a/src/Paket.Core/Packaging/PackageMetaData.fs b/src/Paket.Core/Packaging/PackageMetaData.fs
index 8c8515ee70..271873a993 100644
--- a/src/Paket.Core/Packaging/PackageMetaData.fs
+++ b/src/Paket.Core/Packaging/PackageMetaData.fs
@@ -166,9 +166,22 @@ let addFile (source : string) (target : string) (templateFile : TemplateFile) =
| IncompleteTemplate ->
failwith (sprintf "You should only try and add files to template files with complete metadata.%sFile: %s" Environment.NewLine templateFile.FileName)
-let findDependencies (dependenciesFile : DependenciesFile) config platform (template : TemplateFile) (project : ProjectFile) lockDependencies minimumFromLockFile pinProjectReferences (projectWithTemplates : Map) * ProjectFile * bool>) includeReferencedProjects (version :SemVerInfo option) projDeps =
+let findDependencies (dependenciesFile : DependenciesFile) config platform (template : TemplateFile) (project : ProjectFile) lockDependencies minimumFromLockFile pinProjectReferences interprojectReferencesConstraint (projectWithTemplates : Map) * ProjectFile * bool>) includeReferencedProjects (version :SemVerInfo option) cache =
let includeReferencedProjects = template.IncludeReferencedProjects || includeReferencedProjects
- let targetDir =
+
+ let interprojectReferencesConstraint =
+ match interprojectReferencesConstraint with
+ | Some c -> c
+ | None ->
+ match template.InterprojectReferencesConstraint with
+ | Some c -> c
+ | None ->
+ if pinProjectReferences || lockDependencies then
+ InterprojectReferencesConstraint.Fix
+ else
+ InterprojectReferencesConstraint.Min
+
+ let targetDir =
match project.BuildOutputTargetFolder with
| Some x -> x
| None ->
@@ -183,12 +196,12 @@ let findDependencies (dependenciesFile : DependenciesFile) config platform (temp
| None -> PreReleaseStatus.No
| _ -> PreReleaseStatus.All
- let deps, files =
- let interProjectDeps =
- if includeReferencedProjects then
- project.GetAllInterProjectDependenciesWithoutProjectTemplates projDeps
- else
- project.GetAllInterProjectDependenciesWithProjectTemplates projDeps
+ let deps, files =
+ let interProjectDeps =
+ if includeReferencedProjects then
+ project.GetAllInterProjectDependenciesWithoutProjectTemplates cache
+ else
+ project.GetAllInterProjectDependenciesWithProjectTemplates cache
|> Seq.toList
interProjectDeps
@@ -206,11 +219,11 @@ let findDependencies (dependenciesFile : DependenciesFile) config platform (temp
// Add the assembly + {.dll, .pdb, .xml, /*/.resources.dll} from this project
let templateWithOutput =
- let projects =
- if includeReferencedProjects then
- project.GetAllInterProjectDependenciesWithoutProjectTemplates projDeps
- |> Seq.toList
- else
+ let projects =
+ if includeReferencedProjects then
+ project.GetAllInterProjectDependenciesWithoutProjectTemplates cache
+ |> Seq.toList
+ else
[ project ]
let satelliteDlls =
@@ -293,7 +306,7 @@ let findDependencies (dependenciesFile : DependenciesFile) config platform (temp
| CompleteTemplate(core, _) ->
match core.Version with
| Some v ->
- let versionConstraint = if lockDependencies || pinProjectReferences then Specific v else Minimum v
+ let versionConstraint = interprojectReferencesConstraint.CreateVersionRequirements v
PackageName core.Id, VersionRequirement(versionConstraint, getPreReleaseStatus v)
| None -> failwithf "There was no version given for %s." evaluatedTemplate.FileName
| IncompleteTemplate ->
@@ -320,7 +333,7 @@ let findDependencies (dependenciesFile : DependenciesFile) config platform (temp
| None -> []
[if includeReferencedProjects then
- for proj in project.GetAllReferencedProjects(false,projDeps) |> Seq.filter ((<>) project) do
+ for proj in project.GetAllReferencedProjects(false, cache) |> Seq.filter ((<>) project) do
match Map.tryFind proj.FileName projectWithTemplates with
| Some (template, _, _) ->
match template.Force() with
@@ -328,7 +341,7 @@ let findDependencies (dependenciesFile : DependenciesFile) config platform (temp
let versionConstraint =
match core.Version with
| Some v ->
- let vr = if lockDependencies || pinProjectReferences then Specific v else Minimum v
+ let vr = interprojectReferencesConstraint.CreateVersionRequirements v
VersionRequirement(vr, getPreReleaseStatus v)
| None -> VersionRequirement.AllReleases
@@ -393,7 +406,7 @@ let findDependencies (dependenciesFile : DependenciesFile) config platform (temp
| None ->
match version with
| Some v ->
- let vr = if lockDependencies || pinProjectReferences then Specific v else Minimum v
+ let vr = interprojectReferencesConstraint.CreateVersionRequirements v
np.Name,VersionRequirement(vr, getPreReleaseStatus v)
| None ->
if minimumFromLockFile then
diff --git a/src/Paket.Core/Packaging/PackageProcess.fs b/src/Paket.Core/Packaging/PackageProcess.fs
index 1987a10893..5b3931b48f 100644
--- a/src/Paket.Core/Packaging/PackageProcess.fs
+++ b/src/Paket.Core/Packaging/PackageProcess.fs
@@ -93,13 +93,13 @@ let private convertToNormal (symbols : bool) templateFile =
let includePdbs = optional.IncludePdbs
{ templateFile with Contents = ProjectInfo(core, { optional with IncludePdbs = (if symbols then false else includePdbs) }) }
-let private convertToSymbols (projectFile : ProjectFile) (includeReferencedProjects : bool) (projDeps) (templateFile:TemplateFile) =
+let private convertToSymbols (projectFile:ProjectFile) includeReferencedProjects cache (templateFile:TemplateFile) =
let sourceFiles =
let getTarget compileItem =
let projectName = Path.GetFileName(compileItem.BaseDir)
Path.Combine("src", projectName, compileItem.DestinationPath)
- projectFile.GetCompileItems (includeReferencedProjects || templateFile.IncludeReferencedProjects) projDeps
+ projectFile.GetCompileItems (includeReferencedProjects || templateFile.IncludeReferencedProjects) cache
|> Seq.map (fun c -> c.SourceFile, getTarget c)
|> Seq.toList
@@ -111,7 +111,7 @@ let private convertToSymbols (projectFile : ProjectFile) (includeReferencedProje
let augmentedFiles = optional.Files |> List.append sourceFiles
{ templateFile with Contents = ProjectInfo({ core with Symbols = true }, { optional with Files = augmentedFiles }) }
-let Pack(workingDir,dependenciesFile : DependenciesFile, packageOutputPath, buildConfig, buildPlatform, version, specificVersions, releaseNotes, templateFile, excludedTemplates, lockDependencies, minimumFromLockFile, pinProjectReferences, symbols, includeReferencedProjects, projectUrl) =
+let Pack(workingDir,dependenciesFile : DependenciesFile, packageOutputPath, buildConfig, buildPlatform, version, specificVersions, releaseNotes, templateFile, excludedTemplates, lockDependencies, minimumFromLockFile, pinProjectReferences, interprojectReferencesConstraint, symbols, includeReferencedProjects, projectUrl) =
let buildConfig = defaultArg buildConfig "Release"
let buildPlatform = defaultArg buildPlatform ""
let packageOutputPath = if Path.IsPathRooted(packageOutputPath) then packageOutputPath else Path.Combine(workingDir,packageOutputPath)
@@ -142,7 +142,7 @@ let Pack(workingDir,dependenciesFile : DependenciesFile, packageOutputPath, buil
hashSet
- let projDeps = (Dictionary(),Dictionary())
+ let cache = PackProcessCache.empty
// load up project files and grab meta data
let projectTemplates =
@@ -186,8 +186,8 @@ let Pack(workingDir,dependenciesFile : DependenciesFile, packageOutputPath, buil
let optWithSymbols (projectFile:ProjectFile) templateFile =
seq {
yield (templateFile |> convertToNormal symbols)
- if symbols then
- yield templateFile |> convertToSymbols projectFile includeReferencedProjects projDeps }
+ if symbols then
+ yield templateFile |> convertToSymbols projectFile includeReferencedProjects cache }
let convertRemainingTemplate fileName =
let templateFile = TemplateFile.Load(fileName,lockFile,version,specificVersions)
@@ -214,7 +214,7 @@ let Pack(workingDir,dependenciesFile : DependenciesFile, packageOutputPath, buil
yield template, p
}
)
- |> Seq.map (fun (t, p) -> findDependencies dependenciesFile buildConfig buildPlatform t p lockDependencies minimumFromLockFile pinProjectReferences projectTemplates includeReferencedProjects version projDeps)
+ |> Seq.map (fun (t, p) -> findDependencies dependenciesFile buildConfig buildPlatform t p lockDependencies minimumFromLockFile pinProjectReferences interprojectReferencesConstraint projectTemplates includeReferencedProjects version cache)
|> Seq.append remaining
|> Seq.toList
diff --git a/src/Paket.Core/Paket.Core.fsproj b/src/Paket.Core/Paket.Core.fsproj
index aebab0a04c..9205832527 100644
--- a/src/Paket.Core/Paket.Core.fsproj
+++ b/src/Paket.Core/Paket.Core.fsproj
@@ -93,6 +93,7 @@
+
diff --git a/src/Paket.Core/PaketConfigFiles/DependenciesFile.fs b/src/Paket.Core/PaketConfigFiles/DependenciesFile.fs
index c464e9d431..ae0377e98b 100644
--- a/src/Paket.Core/PaketConfigFiles/DependenciesFile.fs
+++ b/src/Paket.Core/PaketConfigFiles/DependenciesFile.fs
@@ -254,8 +254,12 @@ type DependenciesFile(fileName,groups:Map, textRepr
let externalLockDependencies =
group.ExternalLocks
|> List.map (fun x ->
- if x.StartsWith("http://") || x.StartsWith("https://") then
- use client = createHttpClient(x, None)
+ if x.ToLower().StartsWith("http://") || x.ToLower().StartsWith("https://") then
+ let auth = if x.ToLower().Contains("://github.com") then
+ Environment.GetEnvironmentVariable "PAKET_GITHUB_API_TOKEN" |> fun x -> if isNull(x) then None else Some(Token(x))
+ else
+ None
+ use client = createHttpClient(x, auth)
let folder = DirectoryInfo(Path.Combine(Path.GetTempPath(),"external_paket",(hash x).ToString()))
if not folder.Exists then
folder.Create()
diff --git a/src/Paket.Core/PaketConfigFiles/LockFile.fs b/src/Paket.Core/PaketConfigFiles/LockFile.fs
index 6ce7cc3f59..1eb642852b 100644
--- a/src/Paket.Core/PaketConfigFiles/LockFile.fs
+++ b/src/Paket.Core/PaketConfigFiles/LockFile.fs
@@ -878,7 +878,6 @@ type LockFile (fileName:string, groups: Map) =
member this.GetOrderedPackageHull(groupName,referencesFile:ReferencesFile,targetProfileOpt) =
let usedPackageKeys = HashSet<_>()
let toVisit = ref Set.empty
- let visited = ref Set.empty
let cliTools = ref Set.empty
let resolution =
match this.Groups |> Map.tryFind groupName with
@@ -918,29 +917,45 @@ type LockFile (fileName:string, groups: Map) =
toVisit := Set.add (k,p,deps) !toVisit
| None -> ()
+ let visited = Dictionary<_,_>()
+
while !toVisit <> Set.empty do
let current = Set.minElement !toVisit
toVisit := Set.remove current !toVisit
- if Set.contains current !visited then () else
- visited := Set.add current !visited
- let (groupName,_),p,deps = current
+
+ let visitKey,p,deps = current
+ if visited.ContainsKey(visitKey) then ()
+ else
+ visited.Add(visitKey,(p,HashSet(deps)))
+
+ let (groupName,_packageName) = visitKey
for dep in deps do
let deps = this.GetDirectDependenciesOfSafe(groupName,dep,referencesFile.FileName)
toVisit := Set.add ((groupName,dep),p,deps) !toVisit
let emitted = HashSet<_>()
- [while !visited <> Set.empty do
- let ((groupName,packageName),p,deps) =
- !visited
- |> Seq.minBy (fun ((groupName,packageName),_,c) -> Set.count c,groupName,packageName)
-
- if emitted.Add (groupName,packageName) then
- yield ((groupName,packageName),p,deps)
+ [while visited.Count > 0 do
+ let current =
+ visited |> Seq.minBy (fun item ->
+ let (_,deps) = item.Value;
+ (deps.Count,item.Key))
+
+ let (groupName,packageName) = current.Key
+
+ visited.Remove(current.Key) |> ignore
+
+ for item in visited do
+ let (itemGroup, _) = item.Key
+ if itemGroup = groupName then
+ let (_, itemDeps) = item.Value
+ itemDeps.Remove(packageName) |> ignore
+ else ()
- visited :=
- !visited
- |> Set.remove ((groupName,packageName),p,deps)
- |> Set.map (fun ((g,p),b,c) -> if g = groupName then (g,p),b,Set.filter ((<>) packageName) c else (g,p),b,c)],!cliTools
+ if emitted.Add (current.Key) then
+ let (settings,dependencies) = current.Value
+ let deps = Set.ofSeq dependencies
+ yield (current.Key,settings,deps)
+ ], !cliTools
member this.GetOrderedPackageHull(groupName,referencesFile:ReferencesFile) =
this.GetOrderedPackageHull(groupName,referencesFile,None)
diff --git a/src/Paket.Core/PaketConfigFiles/ProjectFile.fs b/src/Paket.Core/PaketConfigFiles/ProjectFile.fs
index 1ab5500150..c9c54f767e 100644
--- a/src/Paket.Core/PaketConfigFiles/ProjectFile.fs
+++ b/src/Paket.Core/PaketConfigFiles/ProjectFile.fs
@@ -3,7 +3,9 @@ namespace Paket
open Paket
open Paket.Domain
open Paket.Logging
+open Paket.InterprojectReferencesConstraint
open System
+open System.Collections.Concurrent
open System.Collections.Generic
open System.IO
open System.Text
@@ -60,7 +62,7 @@ type ProjectOutputType =
| Library
[]
-type ProjectLanguage = Unknown | CSharp | FSharp | VisualBasic | WiX | Nemerle | CPP | IronPython | ServiceFabric
+type ProjectLanguage = Unknown | CSharp | FSharp | VisualBasic | WiX | Nemerle | CPP | IronPython | ServiceFabric | Sql
module LanguageEvaluation =
let private extractProjectTypeGuids (projectDocument:XmlDocument) =
@@ -141,6 +143,7 @@ module LanguageEvaluation =
| ".nproj" -> Some ProjectLanguage.Nemerle
| ".pyproj" -> Some ProjectLanguage.IronPython
| ".sfproj" -> Some ProjectLanguage.ServiceFabric
+ | ".sqlproj" -> Some ProjectLanguage.Sql
| _ -> None
let private getLanguageFromFileName (fileName : string) =
@@ -176,10 +179,9 @@ type ProjectFile =
// CalculatedMaps for optimizations
mutable CalculatedProperties : System.Collections.Concurrent.ConcurrentDictionary
@@ -82,7 +105,11 @@
true
-
+
+
true
@@ -151,16 +178,19 @@
+ $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length)
$([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])
%(PaketReferencesFileLinesInfo.PackageVersion)
All
- runtime
+ runtime
+ runtime
true
+ true
@@ -192,19 +222,27 @@
false
+ $(MSBuildVersion)
+ 15.8.0
<_NuspecFilesNewLocation Include="$(BaseIntermediateOutputPath)$(Configuration)\*.nuspec"/>
+
+
$(MSBuildProjectDirectory)/$(MSBuildProjectFile)
true
- false
- true
+ false
+ true
+ false
+ true
+ false
+ true
$(BaseIntermediateOutputPath)$(Configuration)
$(BaseIntermediateOutputPath)
@@ -219,9 +257,52 @@
-
-
+
+
- ]
[]
[]
-[]
-[]
-[]
+[]
+[]
+[]
do ()
module internal AssemblyVersionInformation =
@@ -16,6 +16,6 @@ module internal AssemblyVersionInformation =
let [] AssemblyProduct = "Paket"
let [] AssemblyCompany = "Paket team"
let [] AssemblyDescription = "A dependency manager for .NET with support for NuGet packages and git repositories."
- let [] AssemblyVersion = "5.182.0"
- let [] AssemblyFileVersion = "5.182.0"
- let [] AssemblyInformationalVersion = "5.182.0-alpha002"
+ let [] AssemblyVersion = "5.198.0"
+ let [] AssemblyFileVersion = "5.198.0"
+ let [] AssemblyInformationalVersion = "5.198.0"
diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs
index bc9486bf18..747e91183a 100644
--- a/src/Paket/Commands.fs
+++ b/src/Paket/Commands.fs
@@ -272,12 +272,12 @@ with
| No_Install -> "do not modify projects"
type ClearCacheArgs =
- | [] ClearLocal
+ | [] ClearLocal
with
interface IArgParserTemplate with
member this.Usage =
match this with
- | ClearLocal -> "Clears local packages folder and paket-files."
+ | ClearLocal -> "also clear local packages and paket-files directory"
type RestoreArgs =
| [] Force
@@ -416,7 +416,7 @@ with
match this with
| Files _ -> ".nuspec files to fix transitive dependencies within"
| ReferencesFile _ -> "paket.references to use"
- | ProjectFile _ -> "the proejct file to use"
+ | ProjectFile _ -> "the project file to use"
type GenerateNuspecArgs =
| [] Project of project:string
@@ -479,6 +479,13 @@ with
match this with
| Paket_Dependencies_Dir -> "absolute path of paket.dependencies directory, if exists"
+type InterprojectReferencesConstraintArgs =
+ | Min
+ | Fix
+ | Keep_Major
+ | Keep_Minor
+ | Keep_Patch
+
type PackArgs =
| [] Output of path:string
| [] Output_Legacy of path:string
@@ -513,6 +520,8 @@ type PackArgs =
| [] Pin_Project_References
| [] Pin_Project_References_Legacy
+ | [] Interproject_References of InterprojectReferencesConstraintArgs
+
| [] Symbols
| [] Symbols_Legacy
@@ -558,6 +567,8 @@ with
| Pin_Project_References -> "pin dependencies generated from project references to exact versions (=) instead of using minimum versions (>=); with --lock-dependencies project references will be pinned even if this option is not specified"
| Pin_Project_References_Legacy(_) -> "[obsolete]"
+ | Interproject_References(_) -> "set constraints for referenced project versions"
+
| Symbols -> "create symbol and source packages in addition to library and content packages"
| Symbols_Legacy(_) -> "[obsolete]"
@@ -689,7 +700,7 @@ with
| Add _ -> "add a new dependency"
| Github _ -> "commands to manipulate GitHub repository references"
| Git _ -> "commands to manipulate git repository references"
- | ClearCache _ -> "clear the NuGet and git cache directories"
+ | ClearCache _ -> "clear the global and optionally local NuGet and cache directories"
| Config _ -> "store global configuration values like NuGet credentials"
| ConvertFromNuget _ -> "convert projects from NuGet to Paket"
| FindRefs _ -> "find all project files that have a dependency installed"
diff --git a/src/Paket/Program.fs b/src/Paket/Program.fs
index 7e3bc771d1..b04c6f8b74 100644
--- a/src/Paket/Program.fs
+++ b/src/Paket/Program.fs
@@ -529,9 +529,22 @@ let pack (results : ParseResults<_>) =
results.Contains <@ PackArgs.Lock_Dependencies_To_Minimum_Legacy @>)
|> legacyBool results (ReplaceArgument("--minimum-from-lock-file", "minimum-from-lock-file"))
let pinProjectReferences =
- (results.Contains <@ PackArgs.Pin_Project_References @>,
- results.Contains <@ PackArgs.Pin_Project_References_Legacy @>)
- |> legacyBool results (ReplaceArgument("--pin-project-references", "pin-project-references"))
+ let (newSyntax, oldSyntax) =
+ (results.Contains <@ PackArgs.Pin_Project_References @>,
+ results.Contains <@ PackArgs.Pin_Project_References_Legacy @>)
+
+ if newSyntax || oldSyntax then
+ warnObsolete (ReplaceArgument("--interproject-references", "--pin-project-references"))
+
+ newSyntax || oldSyntax
+ let interprojectReferencesConstraint =
+ match results.TryGetResult <@ PackArgs.Interproject_References @> with
+ | Some Min -> Some InterprojectReferencesConstraint.Min
+ | Some Fix -> Some InterprojectReferencesConstraint.Fix
+ | Some Keep_Major -> Some InterprojectReferencesConstraint.KeepMajor
+ | Some Keep_Minor -> Some InterprojectReferencesConstraint.KeepMinor
+ | Some Keep_Patch -> Some InterprojectReferencesConstraint.KeepPatch
+ | None -> None
let symbols =
(results.Contains <@ PackArgs.Symbols @>,
results.Contains <@ PackArgs.Symbols_Legacy @>)
@@ -558,6 +571,7 @@ let pack (results : ParseResults<_>) =
lockDependencies = lockDependencies,
minimumFromLockFile = minimumFromLockFile,
pinProjectReferences = pinProjectReferences,
+ interprojectReferencesConstraint = interprojectReferencesConstraint,
symbols = symbols,
includeReferencedProjects = includeReferencedProjects,
?projectUrl = projectUrl)
diff --git a/tests/Paket.Tests.preview3/Paket.Tests.fsproj b/tests/Paket.Tests.preview3/Paket.Tests.fsproj
index cbcf9e2b4d..3311191bb8 100644
--- a/tests/Paket.Tests.preview3/Paket.Tests.fsproj
+++ b/tests/Paket.Tests.preview3/Paket.Tests.fsproj
@@ -41,6 +41,7 @@
+
diff --git a/tests/Paket.Tests/DependenciesFile/DependencyChangesSpecs.fs b/tests/Paket.Tests/DependenciesFile/DependencyChangesSpecs.fs
index ca566de8d4..400756de85 100644
--- a/tests/Paket.Tests/DependenciesFile/DependencyChangesSpecs.fs
+++ b/tests/Paket.Tests/DependenciesFile/DependencyChangesSpecs.fs
@@ -8,7 +8,7 @@ open Paket.Domain
[]
-let ``should detect no changes with global framework``() =
+let ``should detect no changes with global framework``() =
let before = """framework: >= net40
source https://www.nuget.org/api/v2
@@ -33,7 +33,7 @@ NUGET
changedDependencies.IsEmpty |> shouldEqual true
[]
-let ``should detect remove of single nuget package``() =
+let ``should detect remove of single nuget package``() =
let before = """source http://www.nuget.org/api/v2
nuget Castle.Windsor-log4net"""
@@ -60,7 +60,7 @@ nuget Castle.Windsor-log4net"""
let cfg = DependenciesFile.FromSource(after)
let lockFile = LockFile.Parse("",toLines lockFileData)
-
+
let changedDependencies = DependencyChangeDetection.findNuGetChangesInDependenciesFile(cfg,lockFile,true) |> Set.map (fun (g,p,_) -> g, p)
let newDependencies = DependencyChangeDetection.GetPreferredNuGetVersions(cfg,lockFile)
newDependencies
@@ -68,7 +68,7 @@ nuget Castle.Windsor-log4net"""
|> shouldEqual Map.empty
[]
-let ``should detect addition of single nuget package``() =
+let ``should detect addition of single nuget package``() =
let before = """source http://www.nuget.org/api/v2
nuget Castle.Windsor-log4net"""
@@ -99,7 +99,7 @@ nuget NUnit"""
let cfg = DependenciesFile.FromSource(after)
let lockFile = LockFile.Parse("",toLines lockFileData)
let changedDependencies = DependencyChangeDetection.findNuGetChangesInDependenciesFile(cfg,lockFile,true) |> Set.map (fun (g,p,_) -> g, p)
-
+
let newDependencies = DependencyChangeDetection.GetPreferredNuGetVersions (cfg,lockFile)
let expected =
Map.ofList
@@ -110,14 +110,14 @@ nuget NUnit"""
(Constants.MainDependencyGroup,PackageName "Castle.Windsor-log4net"), (SemVer.Parse "3.3.0");
(Constants.MainDependencyGroup,PackageName "log4net"), (SemVer.Parse "1.2.10")]
-
+
newDependencies
|> Map.filter (fun k v -> not <| changedDependencies.Contains(k))
|> Map.map (fun k (v,_) -> v)
|> shouldEqual expected
[]
-let ``should ignore compatible version requirement change for nuget package``() =
+let ``should ignore compatible version requirement change for nuget package``() =
let before = """source http://www.nuget.org/api/v2
nuget Castle.Windsor-log4net >= 3.2.0"""
@@ -147,7 +147,7 @@ nuget Castle.Windsor-log4net >= 3.3.0"""
let cfg = DependenciesFile.FromSource(after)
let lockFile = LockFile.Parse("",toLines lockFileData)
let changedDependencies = DependencyChangeDetection.findNuGetChangesInDependenciesFile(cfg,lockFile,true) |> Set.map (fun (g,p,_) -> g, p)
-
+
let newDependencies = DependencyChangeDetection.GetPreferredNuGetVersions (cfg,lockFile)
let expected =
Map.ofList
@@ -157,14 +157,14 @@ nuget Castle.Windsor-log4net >= 3.3.0"""
(Constants.MainDependencyGroup,PackageName "Castle.Windsor"), (SemVer.Parse "3.3.0");
(Constants.MainDependencyGroup,PackageName "Castle.Windsor-log4net"), (SemVer.Parse "3.3.0");
(Constants.MainDependencyGroup,PackageName "log4net"), (SemVer.Parse "1.2.10")])
-
+
newDependencies
|> Map.filter (fun k v -> not <| changedDependencies.Contains(k))
|> Map.map (fun k (v,_) -> v)
|> shouldEqual expected
[]
-let ``should detect incompatible version requirement change for nuget package``() =
+let ``should detect incompatible version requirement change for nuget package``() =
let before = """source http://www.nuget.org/api/v2
nuget Castle.Windsor-log4net >= 3.2.0"""
@@ -194,14 +194,14 @@ nuget Castle.Windsor-log4net >= 3.4.0"""
let cfg = DependenciesFile.FromSource(after)
let lockFile = LockFile.Parse("",toLines lockFileData)
let changedDependencies = DependencyChangeDetection.findNuGetChangesInDependenciesFile(cfg,lockFile,true) |> Set.map (fun (g,p,_) -> g, p)
-
+
let newDependencies = DependencyChangeDetection.GetPreferredNuGetVersions (cfg,lockFile)
newDependencies
|> Map.filter (fun k v -> not <| changedDependencies.Contains(k))
|> shouldEqual Map.empty
[]
-let ``should detect addition content:none of single nuget package``() =
+let ``should detect addition content:none of single nuget package``() =
let before = """source http://www.nuget.org/api/v2
nuget Castle.Windsor-log4net"""
@@ -234,7 +234,7 @@ nuget Castle.Windsor-log4net content:none"""
changedDependencies.IsEmpty |> shouldEqual false
[]
-let ``should repase detailed lock file``() =
+let ``should repase detailed lock file``() =
let before = """source https://www.nuget.org/api/v2
nuget AutoMapper ~> 3.2
@@ -300,7 +300,7 @@ nuget Caliburn.Micro !~> 2.0.2"""
(changedDependencies |> Seq.head) |> shouldEqual (Constants.MainDependencyGroup, PackageName "Caliburn.Micro",[Paket.DependencyChangeDetection.DependencyChangeType.PackageNotFoundInLockFile])
[]
-let ``should detect if nothing changes in github dependency``() =
+let ``should detect if nothing changes in github dependency``() =
let before = """source https://www.nuget.org/api/v2
nuget FAKE
@@ -332,7 +332,7 @@ github zurb/bower-foundation js/foundation.min.js"""
changedDependencies.Count |> shouldEqual 0
[]
-let ``should detect no changes if nothing changes in git dependency``() =
+let ``should detect no changes if nothing changes in git dependency``() =
let before = """source https://www.nuget.org/api/v2
nuget FAKE
@@ -364,7 +364,7 @@ git https://github.com/zurb/tribute.git 2.1.0"""
changedDependencies.Count |> shouldEqual 0
[]
-let ``should detect new git dependency``() =
+let ``should detect new git dependency``() =
let before = """source https://www.nuget.org/api/v2
nuget FAKE
@@ -393,7 +393,7 @@ git https://github.com/zurb/tribute.git 2.1.0"""
changedDependencies.Count |> shouldEqual 1
[]
-let ``should detect new github dependency``() =
+let ``should detect new github dependency``() =
let before = """source https://www.nuget.org/api/v2
nuget FAKE
@@ -426,7 +426,7 @@ github SignalR/bower-signalr jquery.signalR.js"""
changedDependencies.Count |> shouldEqual 1
[]
-let ``should detect new github dependency in new group``() =
+let ``should detect new github dependency in new group``() =
let before = """source https://www.nuget.org/api/v2
nuget FAKE
@@ -462,7 +462,7 @@ github SignalR/bower-signalr jquery.signalR.js"""
changedDependencies |> Set.filter (fun (g,_) -> g = GroupName "Build") |> Set.count |> shouldEqual 1
[]
-let ``should detect removal of group``() =
+let ``should detect removal of group``() =
let before = """source https://www.nuget.org/api/v2
nuget FAKE
@@ -501,4 +501,27 @@ github zurb/bower-foundation js/foundation.min.js"""
let lockFile = LockFile.Parse("",toLines lockFileData)
let changedDependencies = DependencyChangeDetection.findRemoteFileChangesInDependenciesFile(cfg,lockFile)
changedDependencies.Count |> shouldEqual 1
- changedDependencies |> Set.filter (fun (g,_) -> g = GroupName "Build") |> Set.count |> shouldEqual 1
\ No newline at end of file
+ changedDependencies |> Set.filter (fun (g,_) -> g = GroupName "Build") |> Set.count |> shouldEqual 1
+
+[]
+let ``should detect no changes with storage: none and auto-detect``() =
+ let dependencyFileData = """
+source https://api.nuget.org/v3/index.json
+storage: none
+framework: auto-detect
+
+nuget FSharp.Core
+"""
+
+ let lockFileData = """
+STORAGE: NONE
+RESTRICTION: == netcoreapp2.1
+NUGET
+ remote: https://api.nuget.org/v3/index.json
+ FSharp.Core (4.5.4)
+"""
+
+ let dependencyFile = DependenciesFile.FromSource(dependencyFileData)
+ let lockFile = LockFile.Parse("",toLines lockFileData)
+ let changedDependencies = DependencyChangeDetection.findNuGetChangesInDependenciesFile(dependencyFile,lockFile,false)
+ changedDependencies.IsEmpty |> shouldEqual true
diff --git a/tests/Paket.Tests/InstallModel/BindingRedirect.fs b/tests/Paket.Tests/InstallModel/BindingRedirect.fs
index 9a83952384..1247496712 100644
--- a/tests/Paket.Tests/InstallModel/BindingRedirect.fs
+++ b/tests/Paket.Tests/InstallModel/BindingRedirect.fs
@@ -254,27 +254,6 @@ let buildMockGetFiles outcomes =
|> List.toArray
let rootPath = @"C:/rootpath/" |> toSafePath
-[]
-let ``project file containing paket.references is marked for binding redirect``() =
- let mockGetFiles =
- buildMockGetFiles
- [ (@"C:/rootpath/", "*.references"), [ @"C:/rootpath/source/paket.references" ]
- (@"C:/rootpath/source", "*proj"), [ @"C:/rootpath/source/Project.fsproj" ]
- ]
-
- getProjectFilesWithPaketReferences mockGetFiles rootPath
- |> shouldEqual [ @"C:/rootpath/source/Project.fsproj" |> toSafePath ]
-
-[]
-let ``project file not containing paket.references is not marked for binding redirect``() =
- let mockGetFiles =
- buildMockGetFiles
- [ (@"C:/rootpath/", "paket.references"), []
- (@"C:/rootpath/source", "*proj"), [ @"C:/rootpath/source/Project.fsproj" ]
- ]
- getProjectFilesWithPaketReferences mockGetFiles rootPath
- |> shouldEqual []
-
[]
let ``adds paket's node if one does not exist``() =
let doc = emptySampleDoc()
diff --git a/tests/Paket.Tests/Packaging/TemplateFileParsing.fs b/tests/Paket.Tests/Packaging/TemplateFileParsing.fs
index f2d6600b47..079b54dc41 100644
--- a/tests/Paket.Tests/Packaging/TemplateFileParsing.fs
+++ b/tests/Paket.Tests/Packaging/TemplateFileParsing.fs
@@ -997,6 +997,8 @@ files
!../../build/bin/Angebot.Contracts.xml
# another comment here
+interproject-references keep-minor
+
"""
let sut =
TemplateFile.Parse("file1.template", LockFile.Parse("",[||]), None, Map.empty, strToStream text)
@@ -1016,6 +1018,7 @@ files
sut.RequireLicenseAcceptance |> shouldEqual false
sut.DevelopmentDependency |> shouldEqual false
sut.Language |> shouldEqual None
+ sut.InterprojectReferencesConstraint |> shouldEqual (Some InterprojectReferencesConstraint.KeepMinor)
match sut.Files with
| [from1,to1;from2,to2] ->
diff --git a/tests/Paket.Tests/Paket.Tests.fsproj b/tests/Paket.Tests/Paket.Tests.fsproj
index c04b5caecc..245a4510fa 100644
--- a/tests/Paket.Tests/Paket.Tests.fsproj
+++ b/tests/Paket.Tests/Paket.Tests.fsproj
@@ -93,6 +93,7 @@
+
@@ -319,6 +320,7 @@
+
diff --git a/tests/Paket.Tests/ProjectFile/ProjectLanguageSpecs.fs b/tests/Paket.Tests/ProjectFile/ProjectLanguageSpecs.fs
index 4283f5b544..6a8c938202 100644
--- a/tests/Paket.Tests/ProjectFile/ProjectLanguageSpecs.fs
+++ b/tests/Paket.Tests/ProjectFile/ProjectLanguageSpecs.fs
@@ -19,6 +19,7 @@ let ``Language is detected from filename``() =
evaluate ".vbproj" |> shouldEqual ProjectLanguage.VisualBasic
evaluate ".sfproj" |> shouldEqual ProjectLanguage.ServiceFabric
evaluate ".nproj" |> shouldEqual ProjectLanguage.Nemerle
+ evaluate ".sqlproj" |> shouldEqual ProjectLanguage.Sql
let createProjectXml (projectTypeGuids : string option) : XmlDocument =
let ns = XNamespace.Get "http://schemas.microsoft.com/developer/msbuild/2003"
diff --git a/tests/Paket.Tests/ProjectFile/ReadPropertySpecs.fs b/tests/Paket.Tests/ProjectFile/ReadPropertySpecs.fs
new file mode 100644
index 0000000000..ede5523956
--- /dev/null
+++ b/tests/Paket.Tests/ProjectFile/ReadPropertySpecs.fs
@@ -0,0 +1,48 @@
+module Paket.ProjectFile.ReadPropertySpecs
+
+open Paket
+open NUnit.Framework
+open FsUnit
+
+[]
+let ``should process conditions`` () =
+ let testWithCondition = """
+
+ Correct value
+ Incorrect value
+
+
+"""
+ testWithCondition
+ |> ProjectFile.loadFromString "test"
+ |> ProjectFile.getProperty "PropertyWithCondition"
+ |> shouldEqual (Some "Correct value")
+
+
+[]
+let ``should process placeholders`` () =
+ let testWithPlaceholder = """
+
+ Placeholder value
+ Value $(Property1)
+
+
+"""
+ testWithPlaceholder
+ |> ProjectFile.loadFromString "test"
+ |> ProjectFile.getProperty "PropertyWithPlaceholder"
+ |> shouldEqual (Some "Value Placeholder value")
+
+[]
+let ``should process espaced characters`` () =
+ let testWithEscapedCahrs = """
+
+ Value %28in parens%29
+
+
+"""
+ testWithEscapedCahrs
+ |> ProjectFile.loadFromString "test"
+ |> ProjectFile.getProperty "PropertyWithEscapedCaharacter"
+ |> shouldEqual (Some "Value (in parens)")
+
diff --git a/tests/Paket.Tests/Versioning/InterprojectReferencesConstraintSpecs.fs b/tests/Paket.Tests/Versioning/InterprojectReferencesConstraintSpecs.fs
new file mode 100644
index 0000000000..d1391a8b74
--- /dev/null
+++ b/tests/Paket.Tests/Versioning/InterprojectReferencesConstraintSpecs.fs
@@ -0,0 +1,21 @@
+module Paket.InterprojectReferencesConstraintSpecs
+
+open Paket
+open Paket.InterprojectReferencesConstraint
+open NUnit.Framework
+open FsUnit
+
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+[]
+let ``constraint creates correct version range`` constraintOptionValue version expectedRange =
+ let irc = (InterprojectReferencesConstraint.Parse constraintOptionValue).Value
+ let v = SemVer.Parse version
+ let expectedConstraint = VersionRequirement.Parse expectedRange
+ irc.CreateVersionRequirements v |> shouldEqual expectedConstraint.Range