Skip to content

Commit dd4a966

Browse files
committed
Using paket as dependency manager
1 parent 4d85fe0 commit dd4a966

File tree

88 files changed

+2027
-344
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2027
-344
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
# Visual Studio Cache files (starting with VS 2015)
22
.vs/
33

4+
# VSCode local files
5+
.vscode/
6+
47
# Launch Settings
58
launchSettings.json
69

710
#ignore thumbnails created by windows
811
Thumbs.db
12+
13+
# Files of Paket dependency manager
14+
paket-files/
15+
916
#Ignore files build by Visual Studio
1017
*.obj
1118
*.exe

.paket/Paket.Restore.targets

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

.paket/paket.bootstrapper.exe

70.7 KB
Binary file not shown.

.paket/paket.exe

70.7 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>

Confuser.CLI/Confuser.CLI.csproj

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project Sdk="Microsoft.NET.Sdk">
23

34
<PropertyGroup>
45
<OutputType>Exe</OutputType>
@@ -16,13 +17,6 @@
1617
<OutputPath>..\$(Configuration)\bin</OutputPath>
1718
</PropertyGroup>
1819

19-
<ItemGroup Label="Nuget Dependencies">
20-
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" />
21-
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
22-
<PackageReference Include="System.Console" />
23-
<PackageReference Include="System.Runtime" />
24-
</ItemGroup>
25-
2620
<ItemGroup>
2721
<ProjectReference Include="..\Confuser.Core\Confuser.Core.csproj" />
2822
<ProjectReference Include="..\Confuser.DynCipher\Confuser.DynCipher.csproj" />
@@ -54,4 +48,6 @@
5448
</Compile>
5549
</ItemGroup>
5650

57-
</Project>
51+
<Import Project="..\.paket\Paket.Restore.targets" />
52+
53+
</Project>

Confuser.CLI/paket.references

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Microsoft.Extensions.CommandLineUtils
2+
Microsoft.Extensions.Logging.Console
3+
System.Console
4+
System.Runtime
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project Sdk="Microsoft.NET.Sdk">
23

34
<PropertyGroup>
45
<TargetFramework>netstandard2.0</TargetFramework>
56
<RootNamespace>Confuser.Core</RootNamespace>
67
</PropertyGroup>
78

8-
<ItemGroup Label="Nuget Dependencies">
9-
<PackageReference Include="dnlib" />
10-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
11-
<PackageReference Include="System.Buffers" />
12-
<PackageReference Include="System.Collections.Immutable" />
13-
<PackageReference Include="System.Memory" />
14-
</ItemGroup>
9+
<Import Project="..\.paket\Paket.Restore.targets" />
1510

1611
</Project>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dnlib
2+
Microsoft.Extensions.DependencyInjection.Abstractions
3+
System.Buffers
4+
System.Collections.Immutable
5+
System.Memory

Confuser.Core.Runtime/Confuser.Core.Runtime.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project Sdk="Microsoft.NET.Sdk">
23

34
<PropertyGroup Label="Assembly Settings">
45
<TargetFrameworks>net20;net40;netstandard1.0;netstandard2.0</TargetFrameworks>
@@ -16,5 +17,6 @@
1617
</ItemGroup>
1718

1819
<Import Project="..\SevenZip\SevenZip.projitems" Label="Shared" />
20+
<Import Project="..\.paket\Paket.Restore.targets" />
1921

2022
</Project>

0 commit comments

Comments
 (0)