Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ready] Fix/refactor/improve framework restriction system, add performance metrics and pre-load requests #2336

Merged
merged 49 commits into from
May 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
80e94ed
start fixing #2317 because #2333 shows that its relevant.
matthid May 13, 2017
624c71e
initial (probably broken) compiling version.
matthid May 14, 2017
1e187c8
we need to find all platforms supporting us in restriction logic.
matthid May 14, 2017
a97805b
parsing nuspec is a bit more complicated than expected. We properly n…
matthid May 20, 2017
b246942
generating a generic description is not as easy as it should be :/
matthid May 20, 2017
127a175
proper handling in addFrameworkRestrictionsToDependencies.
matthid May 20, 2017
98d3ab8
refactor
matthid May 20, 2017
7f86897
make sure formulars are always in dnf (which makes writing the simpli…
matthid May 21, 2017
7f27225
refactor FrameworkIdentifier, remove V4_Client (if still needed we ne…
matthid May 21, 2017
c91e856
refactor handling of portable profiles
matthid May 21, 2017
4623d5d
properly implement SupportedPlatforms for PCL and start to fix test s…
matthid May 21, 2017
d1646af
fix several bugs and tests
matthid May 22, 2017
e4c0f89
cleanup and more test fixes
matthid May 22, 2017
6951693
increase cache version
matthid May 22, 2017
8d15286
more cleanup and more test fixes.
matthid May 22, 2017
281b221
cleanup and support for unknown portable profiles.
matthid May 22, 2017
d02e5a0
cleanup and fix almost everything but the parser.
matthid May 22, 2017
9318160
unit tests green again
matthid May 22, 2017
8245a16
Cleanup and some code-simplifications.
matthid May 22, 2017
9d3831f
use sets for targetprofiles.
matthid May 23, 2017
20c1ae6
add some very basic profiling capabilites.
matthid May 23, 2017
4dd7398
performance improvements by using sets and caches
matthid May 23, 2017
4d2adeb
Merge remote-tracking branch 'origin/master' into fix_restrictions
matthid May 23, 2017
c37374c
add profile to netcore
matthid May 23, 2017
70a268c
no more verbose for you
matthid May 23, 2017
c9ed5c5
another round of performance by improving the equals implementation
matthid May 23, 2017
1390a07
more performance by using sets and removing some conversations
matthid May 23, 2017
613b750
REVIEW: select another conflict
matthid May 23, 2017
1d6088d
REVIEW: compare restrictions at least (because it is slowest)
matthid May 23, 2017
2fff14b
Change Profile-Code to work in parallel and thread changing environme…
matthid May 23, 2017
e6a7cf6
preload dependency information, such that the resolver doesn't need t…
matthid May 23, 2017
7373ae6
change the keys for the cache and delete an old cache.
matthid May 23, 2017
a4e4d77
bugfix in new stats
matthid May 23, 2017
a481dea
add getPreferredVersionF to properly handle caching and preloading in…
matthid May 23, 2017
d7d39f8
let the user overwrite restriction globally
matthid May 24, 2017
e5fe351
fix some tests and a bug in the simplifier.
matthid May 24, 2017
4a4090c
improve performance output
matthid May 24, 2017
306e06d
more performance data & fix test
matthid May 24, 2017
9dd5336
another test fixed
matthid May 24, 2017
09220ea
fix a parser bug and another test
matthid May 24, 2017
dfbd104
another test
matthid May 24, 2017
364a5f4
Fix Stackoverflows in DEBUG mode by increasing the Stack-Size (in a n…
matthid May 24, 2017
cb2f0ee
fix tests
matthid May 24, 2017
ea40687
add warning when something is not working as it should and fix caching.
matthid May 24, 2017
0ffa1d6
fix test code
matthid May 24, 2017
3874a3b
fix test code
matthid May 24, 2017
bba0419
Cleanup stuff
matthid May 24, 2017
cf5c947
Merge pull request #2356 from fsprojects/parallel_requests
matthid May 24, 2017
148d73b
update documentation and RELEASE_NOTES.
matthid May 24, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Paket.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26403.7
VisualStudioVersion = 15.0.26430.6
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}"
EndProject
Expand Down Expand Up @@ -102,6 +102,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{62D18A
EndProjectSection
EndProject
Global
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Expand Down Expand Up @@ -143,4 +146,7 @@ Global
{7C622582-E281-4EAB-AADA-B5893BB89B45} = {ED8079DD-2B06-4030-9F0F-DC548F98E1C4}
{7234B9B4-8CF5-4E68-AA29-050C087B9246} = {ED8079DD-2B06-4030-9F0F-DC548F98E1C4}
EndGlobalSection
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
EndGlobal
10 changes: 9 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
#### 5.0.0-beta005 - 23.05.2017
#### 5.0.0-beta006 - 24.05.2017
* BUGFIX: Fixed dotnetcore integration:
* Paket now properly understands runtime and reference assemblies
* Paket now understands the runtime graph and restores runtime dependencies
* New API `InstallModel.GetRuntimeAssemblies` and `InstallModel.GetRuntimeLibraries` can be used to retrieve the correct assets for a particular RID and TFM
* New command `paket generate-nuspec`
* New Command: `FixNuspecs` - Can fix a list of nuspec files now
* New restriction system (https://github.com/fsprojects/Paket/pull/2336):
* Paket is now more accurate in calculating restrictions and referencing libraries
* Paket will convert (lock-)files to a new syntax (but still understands the old syntax), we might revert this within the beta phase
* This should fix a bunch of edge cases and invalid behavior in combination with portable profiles and netstandard
* Add support for net403 (required for some portable profiles)
* PERFORMANCE: Improved performance by pre-loading requests (https://github.com/fsprojects/Paket/pull/2336)
* PERFORMANCE: Report performance in a more detailed way (https://github.com/fsprojects/Paket/pull/2336)
* BREAKING CHANGE: Paket simplify no longer support simplifying restrictions (https://github.com/fsprojects/Paket/pull/2336)
* BREAKING CHANGE: Paket.PowerShell is no longer supported
* BREAKING CHANGE: `InstallModel` API changed and Paket.Core.dll users might need to adapt
* DEPRECATED: `FixNuspec` function is now obsolete, use `FixNuspecs` instead
Expand Down
4 changes: 3 additions & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ let mergePaketTool () =
let result =
ExecProcess (fun info ->
info.FileName <- currentDirectory </> "packages" </> "build" </> "ILRepack" </> "tools" </> "ILRepack.exe"
info.Arguments <- sprintf "/verbose /lib:%s /ver:%s /out:%s %s" buildDir release.AssemblyVersion paketFile toPack
info.Arguments <- sprintf "/lib:%s /ver:%s /out:%s %s" buildDir release.AssemblyVersion paketFile toPack
) (TimeSpan.FromMinutes 5.)

if result <> 0 then failwithf "Error during ILRepack execution."
Expand All @@ -305,6 +305,8 @@ Target "MergePaketTool" (fun _ ->

Target "RunIntegrationTests" (fun _ ->
mergePaketTool ()
// improves the speed of the test-suite by disabling the runtime resolution.
System.Environment.SetEnvironmentVariable("PAKET_DISABLE_RUNTIME_RESOLUTION", "true")
!! integrationTestAssemblies
|> NUnit3 (fun p ->
{ p with
Expand Down
4 changes: 4 additions & 0 deletions docs/content/dependencies-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ Sometimes you don't want to generate dependencies for older framework versions.

nuget Example >= 2.0 // only .NET 3.5 and .NET 4.0

It means

> Paket, I only compile for 'net35' and 'net40', please leave out all other stuff I don't need to compile for this set of frameworks.

#### Automatic framework detection

Paket can detect the target frameworks from your project and then limit the installation to these target frameworks. You can control this in the [`paket.dependencies` file](dependencies-file.html):
Expand Down
10 changes: 10 additions & 0 deletions docs/content/nuget-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,16 @@ Sometimes you don't want to generate dependencies for older framework versions.
nuget Example >= 2.0 framework: net35, net40 // .NET 3.5 and .NET 4.0
nuget Example >= 2.0 framework: >= net45 // .NET 4.5 and above

> Note: This feature is deprecated and can be seen as an expert feature.
> Using framework restrictions on single packages might make you projects uncompilable.
> The recommended way is to globally (on a group) specifiy the frameworks you want to compile for.

This feature basically tells paket to only consider the specified frameworks for this package.
It means

> Paket I use 'Example' only to compile against 'net35' and 'net40'.
> I never need this package to compile for another framework like 'net45'."

### Putting the version no. into the path

If you need to be NuGet compatible and want to have the version no. in the package path you can do the following:
Expand Down
12 changes: 12 additions & 0 deletions docs/content/references-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ Sometimes you don't want to generate dependencies for older framework versions.
Newtonsoft.Json framework: net35, net40
DotNetZip framework: >= net45

> Note: This feature is deprecated and can be seen as an expert feature.
> Using framework restrictions on single packages might make you projects uncompilable.
> The recommended way is to globally (on a group) specifiy the frameworks you want to compile for.

This feature basically tells paket to only consider the specified frameworks for this package on this particular project.
The resolution will not be modified when restrictions are specified in the reference file.
It means

> In this project 'Newtonsoft.Json' is only required when compiling against 'net35' or 'net40'.
> I never need this package to compile for another framework like 'net45', therefore don't add references for other frameworks.


## Redirects settings

You can instruct Paket to create assembly binding redirects for NuGet packages:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ let ``#1225 should convert simple C# project with non-matching framework restric
requirement.Name |> shouldEqual (PackageName "Castle.Core")
requirement.VersionRequirement.ToString() |> shouldEqual "3.3.3"
requirement.ResolverStrategyForTransitives |> shouldEqual None
requirement.Settings.FrameworkRestrictions |> getRestrictionList |> shouldEqual [FrameworkRestriction.AtLeast(FrameworkIdentifier.DotNetFramework(FrameworkVersion.V3_5))]
requirement.Settings.FrameworkRestrictions |> getExplicitRestriction |> shouldEqual (FrameworkRestriction.AtLeast(FrameworkIdentifier.DotNetFramework(FrameworkVersion.V3_5)))

let requirement2 = depsFile.GetGroup(Constants.MainDependencyGroup).Packages.Tail.Head
requirement2.Name |> shouldEqual (PackageName "Newtonsoft.Json")
requirement2.VersionRequirement.ToString() |> shouldEqual "7.0.1"
requirement2.ResolverStrategyForTransitives |> shouldEqual None
requirement2.Settings.FrameworkRestrictions |> getRestrictionList |> shouldEqual [FrameworkRestriction.AtLeast(FrameworkIdentifier.DotNetFramework(FrameworkVersion.V4_Client))]
requirement2.Settings.FrameworkRestrictions |> getExplicitRestriction |> shouldEqual (FrameworkRestriction.AtLeast(FrameworkIdentifier.DotNetFramework(FrameworkVersion.V4)))

[<Test>]
let ``#1217 should replace packages.config files in project``() =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module Paket.IntegrationTests.FrameworkRestrictionsSpecs

open Fake
open Paket
open System
Expand All @@ -13,8 +14,8 @@ open Paket.Requirements
let ``#140 windsor should resolve framework dependent dependencies``() =
let lockFile = update "i000140-resolve-framework-restrictions"
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "TaskParallelLibrary"].Settings.FrameworkRestrictions
|> getRestrictionList
|> shouldEqual [FrameworkRestriction.Exactly(DotNetFramework(FrameworkVersion.V3_5))]
|> getExplicitRestriction
|> shouldEqual (FrameworkRestriction.Between(DotNetFramework(FrameworkVersion.V3_5), DotNetFramework(FrameworkVersion.V4)))

[<Test>]
let ``#1182 framework restrictions overwrite each other``() =
Expand All @@ -27,20 +28,19 @@ let ``#1182 framework restrictions overwrite each other``() =
[<Platform("Mono")>] // PATH TOO LONG on Windows...
let ``#1190 paket add nuget should handle transitive dependencies``() =
paket "add nuget xunit version 2.1.0" "i001190-transitive-dependencies-with-restr" |> ignore

let lockFile = LockFile.LoadFrom(Path.Combine(scenarioTempPath "i001190-transitive-dependencies-with-restr","paket.lock"))
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "xunit.abstractions"].Settings.FrameworkRestrictions
|> getRestrictionList
|> shouldContain (FrameworkRestriction.AtLeast(DotNetFramework(FrameworkVersion.V4_5)))
|> getExplicitRestriction
|> fun res -> res.ToString() |> shouldEqual "|| (>= dnx451) (>= dnxcore50) (>= portable-net45+win8+wp8+wpa81)"

[<Test>]
let ``#1190 paket add nuget should handle transitive dependencies with restrictions``() =
paket "add nuget xunit version 2.1.0" "i001190-transitive-deps" |> ignore

let lockFile = LockFile.LoadFrom(Path.Combine(scenarioTempPath "i001190-transitive-deps","paket.lock"))
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "xunit.abstractions"].Settings.FrameworkRestrictions
|> getRestrictionList
|> shouldEqual []
|> getExplicitRestriction
|> shouldEqual FrameworkRestriction.NoRestriction


[<Test>]
Expand All @@ -56,24 +56,29 @@ let ``#1213 framework dependencies propagate``() =
let lockFile = update "i001213-framework-propagation"

lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Newtonsoft.Json"].Settings.FrameworkRestrictions
|> getRestrictionList
|> shouldEqual []
|> getExplicitRestriction
|> shouldEqual FrameworkRestriction.NoRestriction

[<Test>]
let ``#1215 framework dependencies propagate``() =
let lockFile = update "i001215-framework-propagation-no-restriction"

lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Microsoft.Bcl.Async"].Settings.FrameworkRestrictions
|> getRestrictionList
|> shouldEqual []
|> getExplicitRestriction
|> shouldEqual FrameworkRestriction.NoRestriction

[<Test>]
let ``#1232 framework dependencies propagate``() =
let lockFile = update "i001232-sql-lite"

lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "System.Data.SQLite.Core"].Settings.FrameworkRestrictions
|> getRestrictionList
|> shouldContain (FrameworkRestriction.Exactly(DotNetFramework(FrameworkVersion.V4_Client)))
let restriction =
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "System.Data.SQLite.Core"].Settings.FrameworkRestrictions
|> getExplicitRestriction
(FrameworkRestriction.Between(DotNetFramework(FrameworkVersion.V4), DotNetFramework(FrameworkVersion.V4_5))).IsSubsetOf restriction
|> shouldEqual true
(FrameworkRestriction.Between(DotNetFramework(FrameworkVersion.V4_5), DotNetFramework(FrameworkVersion.V4_5_1))).IsSubsetOf restriction
|> shouldEqual true
(FrameworkRestriction.AtLeast(DotNetFramework(FrameworkVersion.V4_6))).IsSubsetOf restriction
|> shouldEqual true

[<Test>]
let ``#1494 detect platform 5.0``() =
Expand Down
30 changes: 16 additions & 14 deletions integrationtests/Paket.IntegrationTests/PackSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ open System.IO.Compression
open Paket.Domain
open Paket

let getDependencies = Paket.NuGet.NuGetPackageCache.getDependencies

[<Test>]
let ``#1234 empty assembly name``() =
let outPath = Path.Combine(scenarioTempPath "i001234-missing-assemblyname","out")
Expand Down Expand Up @@ -96,9 +98,9 @@ let ``#1429 pack deps from template``() =
NuGetV2.getDetailsFromLocalNuGetPackage false None outPath "" (PackageName "PaketBug") (SemVer.Parse "1.0.0.0")
|> Async.RunSynchronously

details.Dependencies |> List.map (fun (x,_,_) -> x) |> shouldContain (PackageName "MySql.Data")
details.Dependencies |> List.map (fun (x,_,_) -> x) |> shouldNotContain (PackageName "PaketBug2") // it's not packed in same round
details.Dependencies |> List.map (fun (x,_,_) -> x) |> shouldNotContain (PackageName "PaketBug")
details |> getDependencies |> List.map (fun (x,_,_) -> x) |> shouldContain (PackageName "MySql.Data")
details |> getDependencies |> List.map (fun (x,_,_) -> x) |> shouldNotContain (PackageName "PaketBug2") // it's not packed in same round
details |> getDependencies |> List.map (fun (x,_,_) -> x) |> shouldNotContain (PackageName "PaketBug")

File.Delete(Path.Combine(scenarioTempPath "i001429-pack-deps","PaketBug","paket.template"))

Expand All @@ -112,9 +114,9 @@ let ``#1429 pack deps``() =
NuGetV2.getDetailsFromLocalNuGetPackage false None outPath "" (PackageName "PaketBug") (SemVer.Parse "1.0.0.0")
|> Async.RunSynchronously

details.Dependencies |> List.map (fun (x,_,_) -> x) |> shouldContain (PackageName "MySql.Data")
details.Dependencies |> List.map (fun (x,_,_) -> x) |> shouldContain (PackageName "PaketBug2")
details.Dependencies |> List.map (fun (x,_,_) -> x) |> shouldNotContain (PackageName "PaketBug")
details |> getDependencies |> List.map (fun (x,_,_) -> x) |> shouldContain (PackageName "MySql.Data")
details |> getDependencies |> List.map (fun (x,_,_) -> x) |> shouldContain (PackageName "PaketBug2")
details |> getDependencies |> List.map (fun (x,_,_) -> x) |> shouldNotContain (PackageName "PaketBug")

File.Delete(Path.Combine(scenarioTempPath "i001429-pack-deps","PaketBug","paket.template"))

Expand All @@ -128,8 +130,8 @@ let ``#1429 pack deps using minimum-from-lock-file``() =
NuGetV2.getDetailsFromLocalNuGetPackage false None outPath "" (PackageName "PaketBug") (SemVer.Parse "1.0.0.0")
|> Async.RunSynchronously

details.Dependencies |> List.map (fun (x,_,_) -> x) |> shouldContain (PackageName "MySql.Data")
let packageName, versionRequirement, restrictions = details.Dependencies |> List.filter (fun (x,_,_) -> x = PackageName "MySql.Data") |> List.head
details |> getDependencies |> List.map (fun (x,_,_) -> x) |> shouldContain (PackageName "MySql.Data")
let packageName, versionRequirement, restrictions = details |> getDependencies |> List.filter (fun (x,_,_) -> x = PackageName "MySql.Data") |> List.head
versionRequirement |> shouldNotEqual (VersionRequirement.AllReleases)

File.Delete(Path.Combine(scenarioTempPath "i001429-pack-deps-minimum-from-lock","PaketBug","paket.template"))
Expand All @@ -144,8 +146,8 @@ let ``#1429 pack deps without minimum-from-lock-file uses dependencies file rang
NuGetV2.getDetailsFromLocalNuGetPackage false None outPath "" (PackageName "PaketBug") (SemVer.Parse "1.0.0.0")
|> Async.RunSynchronously

details.Dependencies |> List.map (fun (x,_,_) -> x) |> shouldContain (PackageName "MySql.Data")
let packageName, versionRequirement, restrictions = details.Dependencies |> List.filter (fun (x,_,_) -> x = PackageName "MySql.Data") |> List.head
details |> getDependencies |> List.map (fun (x,_,_) -> x) |> shouldContain (PackageName "MySql.Data")
let packageName, versionRequirement, restrictions = details |> getDependencies |> List.filter (fun (x,_,_) -> x = PackageName "MySql.Data") |> List.head
versionRequirement |> shouldEqual (VersionRequirement.Parse "1.2.3")

File.Delete(Path.Combine(scenarioTempPath "i001429-pack-deps-minimum-from-lock","PaketBug","paket.template"))
Expand All @@ -160,8 +162,8 @@ let ``#1429 pack deps without minimum-from-lock-file uses specifc dependencies f
NuGetV2.getDetailsFromLocalNuGetPackage false None outPath "" (PackageName "PaketBug") (SemVer.Parse "1.0.0.0")
|> Async.RunSynchronously

details.Dependencies |> List.map (fun (x,_,_) -> x) |> shouldContain (PackageName "MySql.Data")
let packageName, versionRequirement, restrictions = details.Dependencies |> List.filter (fun (x,_,_) -> x = PackageName "MySql.Data") |> List.head
details |> getDependencies |> List.map (fun (x,_,_) -> x) |> shouldContain (PackageName "MySql.Data")
let packageName, versionRequirement, restrictions = details |> getDependencies |> List.filter (fun (x,_,_) -> x = PackageName "MySql.Data") |> List.head
versionRequirement |> shouldEqual (VersionRequirement.Parse "[2.3.4]")

File.Delete(Path.Combine(scenarioTempPath "i001429-pack-deps-specific","PaketBug","paket.template"))
Expand All @@ -176,8 +178,8 @@ let ``#1429 pack deps with minimum-from-lock-file uses specifc dependencies file
NuGetV2.getDetailsFromLocalNuGetPackage false None outPath "" (PackageName "PaketBug") (SemVer.Parse "1.0.0.0")
|> Async.RunSynchronously

details.Dependencies |> List.map (fun (x,_,_) -> x) |> shouldContain (PackageName "MySql.Data")
let packageName, versionRequirement, restrictions = details.Dependencies |> List.filter (fun (x,_,_) -> x = PackageName "MySql.Data") |> List.head
details |> getDependencies |> List.map (fun (x,_,_) -> x) |> shouldContain (PackageName "MySql.Data")
let packageName, versionRequirement, restrictions = details |> getDependencies |> List.filter (fun (x,_,_) -> x = PackageName "MySql.Data") |> List.head
versionRequirement |> shouldEqual (VersionRequirement.Parse "[2.3.4]")

File.Delete(Path.Combine(scenarioTempPath "i001429-pack-deps-specific","PaketBug","paket.template"))
Expand Down
2 changes: 2 additions & 0 deletions integrationtests/Paket.IntegrationTests/TestHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ open System
open System.IO

let scenarios = System.Collections.Generic.List<_>()
let isLiveUnitTesting = AppDomain.CurrentDomain.GetAssemblies() |> Seq.exists (fun a -> a.GetName().Name = "Microsoft.CodeAnalysis.LiveUnitTesting.Runtime")

let paketToolPath = FullName(__SOURCE_DIRECTORY__ + "../../../bin/paket.exe")
let integrationTestPath = FullName(__SOURCE_DIRECTORY__ + "../../../integrationtests/scenarios")
Expand All @@ -26,6 +27,7 @@ let cleanupAllScenarios() =
scenarios.Clear()

let prepare scenario =
if isLiveUnitTesting then Assert.Inconclusive("Integration tests are disabled when in a Live-Unit-Session")
if scenarios.Count > 10 then
cleanupAllScenarios()

Expand Down
4 changes: 2 additions & 2 deletions integrationtests/Paket.IntegrationTests/UpdatePackageSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ let ``#1117 can understand portable``() =
let lockFile = LockFile.LoadFrom(Path.Combine(scenarioTempPath "i001117-aws","paket.lock"))
let restrictions = lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "PCLStorage"].Settings.FrameworkRestrictions
match restrictions with
| FrameworkRestrictionList l -> l.ToString() |> shouldEqual ("[portable-net45+win8+wp8+wpa81]")
| ExplicitRestriction l -> l.ToString() |> shouldEqual ("&& (< net45) (>= portable-net45+win8+wp8+wpa81)")
| _ -> failwith "wrong"

let restrictions = lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Microsoft.Bcl.Async"].Settings.FrameworkRestrictions
match restrictions with
| FrameworkRestrictionList l -> l.ToString() |> shouldEqual ("[portable-net45+win8+wp8+wpa81]")
| ExplicitRestriction l -> l.ToString() |> shouldEqual ("&& (< portable-net45+monoandroid+monotouch+xamarinios+xamarinmac+win8+wp8+wpa81) (>= portable-net45+win8+wp8+wpa81)")
| _ -> failwith "wrong"

[<Test>]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.0'">
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0' Or $(TargetFrameworkVersion) == 'v4.0.3')">
<ItemGroup>
<Reference Include="Dapper">
<HintPath>..\..\packages\Dapper\lib\net40\Dapper.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</Reference>
</ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.0'">
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0' Or $(TargetFrameworkVersion) == 'v4.0.3')">
<ItemGroup>
<Reference Include="Dapper">
<HintPath>..\..\packages\Dapper\lib\net40\Dapper.dll</HintPath>
Expand Down
Loading