Skip to content

Commit d51f84f

Browse files
committed
migrate to paket for dependency management
1 parent 271afae commit d51f84f

File tree

9 files changed

+874
-10
lines changed

9 files changed

+874
-10
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ FakesAssemblies/
243243
_Pvt_Extensions
244244

245245
# Paket dependency manager
246-
.paket/paket.exe
247246
paket-files/
248247

249248
# FAKE - F# Make

.paket/Paket.Restore.targets

Lines changed: 276 additions & 0 deletions
Large diffs are not rendered by default.

.paket/paket.exe

62.8 KB
Binary file not shown.

.paket/paket.targets

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<PropertyGroup>
5+
<!-- Enable the restore command to run before builds -->
6+
<RestorePackages Condition=" '$(RestorePackages)' == '' ">true</RestorePackages>
7+
<PaketToolsPath>$(MSBuildThisFileDirectory)</PaketToolsPath>
8+
<PaketRootPath>$(MSBuildThisFileDirectory)..\</PaketRootPath>
9+
<PaketLockFilePath>$(PaketRootPath)paket.lock</PaketLockFilePath>
10+
<PaketRestoreCacheFile>$(PaketRootPath)paket-files\paket.restore.cached</PaketRestoreCacheFile>
11+
<MonoPath Condition="'$(MonoPath)' == '' And Exists('/Library/Frameworks/Mono.framework/Commands/mono')">/Library/Frameworks/Mono.framework/Commands/mono</MonoPath>
12+
<MonoPath Condition="'$(MonoPath)' == ''">mono</MonoPath>
13+
</PropertyGroup>
14+
15+
<PropertyGroup>
16+
<!-- Paket command -->
17+
<PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketRootPath)paket.exe')">$(PaketRootPath)paket.exe</PaketExePath>
18+
<PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath>
19+
<PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand>
20+
<PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</PaketCommand>
21+
</PropertyGroup>
22+
23+
<Choose> <!-- MyProject.fsproj.paket.references has the highest precedence -->
24+
<When Condition="Exists('$(MSBuildProjectFullPath).paket.references')">
25+
<PropertyGroup>
26+
<PaketReferences>$(MSBuildProjectFullPath).paket.references</PaketReferences>
27+
</PropertyGroup>
28+
</When> <!-- MyProject.paket.references -->
29+
<When Condition="Exists('$(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references')">
30+
<PropertyGroup>
31+
<PaketReferences>$(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references</PaketReferences>
32+
</PropertyGroup>
33+
</When> <!-- paket.references -->
34+
<When Condition="Exists('$(MSBuildProjectDirectory)\paket.references')">
35+
<PropertyGroup>
36+
<PaketReferences>$(MSBuildProjectDirectory)\paket.references</PaketReferences>
37+
</PropertyGroup>
38+
</When> <!-- Set to empty if a reference file isn't found matching one of the 3 format options -->
39+
<Otherwise>
40+
<PropertyGroup>
41+
<PaketReferences></PaketReferences>
42+
</PropertyGroup>
43+
</Otherwise>
44+
</Choose>
45+
46+
<PropertyGroup>
47+
<!-- Commands -->
48+
<RestoreCommand>$(PaketCommand) restore --references-file "$(PaketReferences)"</RestoreCommand>
49+
<!-- We need to ensure packages are restored prior to assembly resolve -->
50+
<BuildDependsOn Condition="$(RestorePackages) == 'true'">RestorePackages; $(BuildDependsOn);</BuildDependsOn>
51+
</PropertyGroup>
52+
<Target Name="RestorePackages">
53+
<PropertyGroup>
54+
<PaketRestoreRequired>true</PaketRestoreRequired>
55+
</PropertyGroup>
56+
57+
<PropertyGroup Condition="Exists('$(PaketRestoreCacheFile)') ">
58+
<PaketRestoreCachedHash>$([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)'))</PaketRestoreCachedHash>
59+
<PaketRestoreLockFileHash>$([System.IO.File]::ReadAllText('$(PaketLockFilePath)'))</PaketRestoreLockFileHash>
60+
<PaketRestoreRequired>true</PaketRestoreRequired>
61+
<PaketRestoreRequired Condition=" '$(PaketRestoreLockFileHash)' == '$(PaketRestoreCachedHash)' ">false</PaketRestoreRequired>
62+
<PaketRestoreRequired Condition=" '$(PaketRestoreLockFileHash)' == '' ">true</PaketRestoreRequired>
63+
</PropertyGroup>
64+
65+
<Exec Command="$(RestoreCommand)"
66+
IgnoreStandardErrorWarningFormat="true"
67+
WorkingDirectory="$(PaketRootPath)"
68+
ContinueOnError="false"
69+
Condition=" '$(PaketRestoreRequired)' == 'true' AND Exists('$(PaketReferences)') AND '$(PaketReferences)' != '' "
70+
/>
71+
</Target>
72+
</Project>

Mocking.Helpers.sln

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,16 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
44
VisualStudioVersion = 15.0.27130.2027
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mocking.Helpers", "Mocking.Helpers\Mocking.Helpers\Mocking.Helpers.csproj", "{49B470A9-EFE4-4470-A1B3-154947BC7453}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mocking.Helpers", "Mocking.Helpers\Mocking.Helpers\Mocking.Helpers.csproj", "{49B470A9-EFE4-4470-A1B3-154947BC7453}"
77
EndProject
88
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mocking.Helpers.Vsix", "Mocking.Helpers\Mocking.Helpers.Vsix\Mocking.Helpers.Vsix.csproj", "{BB53B565-6B97-4B6E-806A-DD072023AE6F}"
99
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{C7A83F62-91BD-4A9B-AF0D-DAE64BE55B4A}"
11+
ProjectSection(SolutionItems) = preProject
12+
paket.dependencies = paket.dependencies
13+
paket.lock = paket.lock
14+
EndProjectSection
15+
EndProject
1016
Global
1117
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1218
Debug|Any CPU = Debug|Any CPU
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<Project Sdk="Microsoft.NET.Sdk">
2-
33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
55
</PropertyGroup>
6-
76
<ItemGroup>
8-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.6.1" />
9-
<PackageReference Include="Microsoft.CodeAnalysis.EditorFeatures" Version="2.6.1" />
10-
<PackageReference Include="Microsoft.CodeAnalysis.EditorFeatures.Text" Version="2.6.1" />
11-
<PackageReference Include="Microsoft.CodeAnalysis.Features" Version="2.6.1" />
127
<PackageReference Update="NETStandard.Library" PrivateAssets="all" />
138
</ItemGroup>
14-
15-
</Project>
9+
<Import Project="..\..\.paket\Paket.Restore.targets" />
10+
</Project>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Microsoft.CodeAnalysis.CSharp
2+
Microsoft.CodeAnalysis.EditorFeatures
3+
Microsoft.CodeAnalysis.EditorFeatures.Text
4+
Microsoft.CodeAnalysis.Features

paket.dependencies

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version 5.137.2
2+
storage: none
3+
framework: netstandard20
4+
source https://www.nuget.org/api/v2
5+
6+
nuget Microsoft.CodeAnalysis.CSharp 2.6.1
7+
nuget Microsoft.CodeAnalysis.EditorFeatures 2.6.1
8+
nuget Microsoft.CodeAnalysis.EditorFeatures.Text 2.6.1
9+
nuget Microsoft.CodeAnalysis.Features 2.6.1

0 commit comments

Comments
 (0)