Skip to content

Commit 8260d81

Browse files
committed
Switched all projects to target net standard 2.0, net46 and/or net452 where appropriate. This raises the bar from net45 which is no longer supported.
1 parent 9ab2f40 commit 8260d81

File tree

198 files changed

+1263
-427
lines changed

Some content is hidden

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

198 files changed

+1263
-427
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ nunit_output.xml
1717
Projac.FSharp.csproj
1818
Projac.Tests.FSharp.csproj
1919
.paket/paket.exe
20+
paket-files
21+
packages
2022

2123
# Build results
2224
[Dd]ebug/

.paket/Paket.Restore.targets

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
1+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<!-- Prevent dotnet template engine to parse this file -->
3+
<!--/-:cnd:noEmit-->
4+
<PropertyGroup>
5+
<!-- make MSBuild track this file for incremental builds. -->
6+
<!-- ref https://blogs.msdn.microsoft.com/msbuild/2005/09/26/how-to-ensure-changes-to-a-custom-target-file-prompt-a-rebuild/ -->
7+
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
8+
<!-- Mark that this target file has been loaded. -->
9+
<IsPaketRestoreTargetsFileLoaded>true</IsPaketRestoreTargetsFileLoaded>
10+
<PaketToolsPath>$(MSBuildThisFileDirectory)</PaketToolsPath>
11+
<PaketRootPath>$(MSBuildThisFileDirectory)..\</PaketRootPath>
12+
<PaketRestoreCacheFile>$(PaketRootPath)paket-files\paket.restore.cached</PaketRestoreCacheFile>
13+
<PaketLockFilePath>$(PaketRootPath)paket.lock</PaketLockFilePath>
14+
<MonoPath Condition="'$(MonoPath)' == '' And Exists('/Library/Frameworks/Mono.framework/Commands/mono')">/Library/Frameworks/Mono.framework/Commands/mono</MonoPath>
15+
<MonoPath Condition="'$(MonoPath)' == ''">mono</MonoPath>
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+
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' AND Exists('$(PaketRootPath)paket.bootstrapper.exe')">$(PaketRootPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
22+
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
23+
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
24+
<PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
25+
26+
<!-- Disable automagic references for F# dotnet sdk -->
27+
<!-- This will not do anything for other project types -->
28+
<!-- see https://github.com/fsharp/fslang-design/blob/master/RFCs/FS-1032-fsharp-in-dotnet-sdk.md -->
29+
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
30+
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
31+
</PropertyGroup>
32+
33+
<Target Name="PaketRestore" BeforeTargets="_GenerateDotnetCliToolReferenceSpecs;_GenerateProjectRestoreGraphPerFramework;_GenerateRestoreGraphWalkPerFramework;CollectPackageReferences" >
34+
35+
<!-- Step 1 Check if lockfile is properly restored -->
36+
<PropertyGroup>
37+
<PaketRestoreRequired>true</PaketRestoreRequired>
38+
<NoWarn>$(NoWarn);NU1603</NoWarn>
39+
</PropertyGroup>
40+
41+
<PropertyGroup Condition="Exists('$(PaketRestoreCacheFile)') ">
42+
<PaketRestoreCachedHash>$([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)'))</PaketRestoreCachedHash>
43+
<PaketRestoreLockFileHash>$([System.IO.File]::ReadAllText('$(PaketLockFilePath)'))</PaketRestoreLockFileHash>
44+
<PaketRestoreRequired>true</PaketRestoreRequired>
45+
<PaketRestoreRequired Condition=" '$(PaketRestoreLockFileHash)' == '$(PaketRestoreCachedHash)' ">false</PaketRestoreRequired>
46+
<PaketRestoreRequired Condition=" '$(PaketRestoreLockFileHash)' == '' ">true</PaketRestoreRequired>
47+
</PropertyGroup>
48+
49+
<!-- Do a global restore if required -->
50+
<Exec Command='$(PaketBootStrapperCommand)' Condition="Exists('$(PaketBootStrapperExePath)') AND !(Exists('$(PaketExePath)'))" ContinueOnError="false" />
51+
<Exec Command='$(PaketCommand) restore' Condition=" '$(PaketRestoreRequired)' == 'true' " ContinueOnError="false" />
52+
53+
<!-- Step 2 Detect project specific changes -->
54+
<PropertyGroup>
55+
<PaketReferencesCachedFilePath>$(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).paket.references.cached</PaketReferencesCachedFilePath>
56+
<!-- MyProject.fsproj.paket.references has the highest precedence -->
57+
<PaketOriginalReferencesFilePath>$(MSBuildProjectFullPath).paket.references</PaketOriginalReferencesFilePath>
58+
<!-- MyProject.paket.references -->
59+
<PaketOriginalReferencesFilePath Condition=" !Exists('$(PaketOriginalReferencesFilePath)')">$(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references</PaketOriginalReferencesFilePath>
60+
<!-- paket.references -->
61+
<PaketOriginalReferencesFilePath Condition=" !Exists('$(PaketOriginalReferencesFilePath)')">$(MSBuildProjectDirectory)\paket.references</PaketOriginalReferencesFilePath>
62+
<PaketResolvedFilePath>$(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).$(TargetFramework).paket.resolved</PaketResolvedFilePath>
63+
<PaketRestoreRequired>true</PaketRestoreRequired>
64+
<PaketRestoreRequiredReason>references-file-or-cache-not-found</PaketRestoreRequiredReason>
65+
</PropertyGroup>
66+
67+
<!-- Step 2 a Detect changes in references file -->
68+
<PropertyGroup Condition="Exists('$(PaketOriginalReferencesFilePath)') AND Exists('$(PaketReferencesCachedFilePath)') ">
69+
<PaketRestoreCachedHash>$([System.IO.File]::ReadAllText('$(PaketReferencesCachedFilePath)'))</PaketRestoreCachedHash>
70+
<PaketRestoreReferencesFileHash>$([System.IO.File]::ReadAllText('$(PaketOriginalReferencesFilePath)'))</PaketRestoreReferencesFileHash>
71+
<PaketRestoreRequiredReason>references-file</PaketRestoreRequiredReason>
72+
<PaketRestoreRequired Condition=" '$(PaketRestoreReferencesFileHash)' == '$(PaketRestoreCachedHash)' ">false</PaketRestoreRequired>
73+
</PropertyGroup>
74+
75+
<PropertyGroup Condition="!Exists('$(PaketOriginalReferencesFilePath)') AND !Exists('$(PaketReferencesCachedFilePath)') ">
76+
<!-- If both don't exist there is nothing to do. -->
77+
<PaketRestoreRequired>false</PaketRestoreRequired>
78+
</PropertyGroup>
79+
80+
<!-- Step 2 b detect relevant changes in project file (new targetframework) -->
81+
<PropertyGroup Condition=" !Exists('$(PaketResolvedFilePath)') AND '$(TargetFramework)' != '' ">
82+
<PaketRestoreRequired>true</PaketRestoreRequired>
83+
<PaketRestoreRequiredReason>target-framework '$(TargetFramework)'</PaketRestoreRequiredReason>
84+
</PropertyGroup>
85+
86+
<!-- Step 3 Restore project specific stuff if required -->
87+
<Message Condition=" '$(PaketRestoreRequired)' == 'true' " Importance="low" Text="Detected a change ('$(PaketRestoreRequiredReason)') in the project file '$(MSBuildProjectFullPath)', calling paket restore" />
88+
<Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)"' Condition=" '$(PaketRestoreRequired)' == 'true' " ContinueOnError="false" />
89+
90+
<!-- This shouldn't actually happen, but just to be sure. -->
91+
<Error Condition=" !Exists('$(PaketResolvedFilePath)') AND '$(TargetFramework)' != '' " Text="A paket file for the framework '$(TargetFramework)' is missing. Please delete 'paket-files/paket.restore.cached' and call 'paket restore'." />
92+
93+
<!-- Step 4 forward all msbuild properties (PackageReference, DotNetCliToolReference) to msbuild -->
94+
<ReadLinesFromFile Condition="Exists('$(PaketResolvedFilePath)')" File="$(PaketResolvedFilePath)" >
95+
<Output TaskParameter="Lines" ItemName="PaketReferencesFileLines"/>
96+
</ReadLinesFromFile>
97+
98+
<ItemGroup Condition=" Exists('$(PaketResolvedFilePath)') AND '@(PaketReferencesFileLines)' != '' " >
99+
<PaketReferencesFileLinesInfo Include="@(PaketReferencesFileLines)" >
100+
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
101+
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
102+
</PaketReferencesFileLinesInfo>
103+
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
104+
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
105+
</PackageReference>
106+
</ItemGroup>
107+
108+
<PropertyGroup>
109+
<PaketCliToolFilePath>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).paket.clitools</PaketCliToolFilePath>
110+
</PropertyGroup>
111+
112+
<ReadLinesFromFile File="$(PaketCliToolFilePath)" >
113+
<Output TaskParameter="Lines" ItemName="PaketCliToolFileLines"/>
114+
</ReadLinesFromFile>
115+
116+
<ItemGroup Condition=" '@(PaketCliToolFileLines)' != '' " >
117+
<PaketCliToolFileLinesInfo Include="@(PaketCliToolFileLines)" >
118+
<PackageName>$([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[0])</PackageName>
119+
<PackageVersion>$([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[1])</PackageVersion>
120+
</PaketCliToolFileLinesInfo>
121+
<DotNetCliToolReference Include="%(PaketCliToolFileLinesInfo.PackageName)">
122+
<Version>%(PaketCliToolFileLinesInfo.PackageVersion)</Version>
123+
</DotNetCliToolReference>
124+
</ItemGroup>
125+
126+
<PropertyGroup>
127+
<RestoreConfigFile>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).NuGet.Config</RestoreConfigFile>
128+
</PropertyGroup>
129+
130+
</Target>
131+
132+
<Target Name="PaketDisableDirectPack" AfterTargets="_IntermediatePack" BeforeTargets="GenerateNuspec" Condition="('$(IsPackable)' == '' Or '$(IsPackable)' == 'true') And Exists('$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references')" >
133+
<PropertyGroup>
134+
<ContinuePackingAfterGeneratingNuspec>false</ContinuePackingAfterGeneratingNuspec>
135+
</PropertyGroup>
136+
</Target>
137+
138+
<Target Name="PaketOverrideNuspec" AfterTargets="GenerateNuspec" Condition="('$(IsPackable)' == '' Or '$(IsPackable)' == 'true') And Exists('$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references')" >
139+
<PropertyGroup>
140+
<PaketProjectFile>$(MSBuildProjectDirectory)/$(MSBuildProjectFile)</PaketProjectFile>
141+
<ContinuePackingAfterGeneratingNuspec>true</ContinuePackingAfterGeneratingNuspec>
142+
<UseNewPack>false</UseNewPack>
143+
<UseNewPack Condition=" '$(NuGetToolVersion)' != '4.0.0' ">true</UseNewPack>
144+
</PropertyGroup>
145+
146+
<ItemGroup>
147+
<_NuspecFiles Include="$(BaseIntermediateOutputPath)*.nuspec"/>
148+
</ItemGroup>
149+
150+
<Exec Command='$(PaketCommand) fix-nuspecs files "@(_NuspecFiles)" project-file "$(PaketProjectFile)" ' Condition="@(_NuspecFiles) != ''" />
151+
152+
<ConvertToAbsolutePath Condition="@(_NuspecFiles) != ''" Paths="@(_NuspecFiles)">
153+
<Output TaskParameter="AbsolutePaths" PropertyName="NuspecFileAbsolutePath" />
154+
</ConvertToAbsolutePath>
155+
156+
<!-- Call Pack -->
157+
<PackTask Condition="$(UseNewPack)"
158+
PackItem="$(PackProjectInputFile)"
159+
PackageFiles="@(_PackageFiles)"
160+
PackageFilesToExclude="@(_PackageFilesToExclude)"
161+
PackageVersion="$(PackageVersion)"
162+
PackageId="$(PackageId)"
163+
Title="$(Title)"
164+
Authors="$(Authors)"
165+
Description="$(Description)"
166+
Copyright="$(Copyright)"
167+
RequireLicenseAcceptance="$(PackageRequireLicenseAcceptance)"
168+
LicenseUrl="$(PackageLicenseUrl)"
169+
ProjectUrl="$(PackageProjectUrl)"
170+
IconUrl="$(PackageIconUrl)"
171+
ReleaseNotes="$(PackageReleaseNotes)"
172+
Tags="$(PackageTags)"
173+
DevelopmentDependency="$(DevelopmentDependency)"
174+
BuildOutputInPackage="@(_BuildOutputInPackage)"
175+
TargetPathsToSymbols="@(_TargetPathsToSymbols)"
176+
TargetFrameworks="@(_TargetFrameworks)"
177+
AssemblyName="$(AssemblyName)"
178+
PackageOutputPath="$(PackageOutputAbsolutePath)"
179+
IncludeSymbols="$(IncludeSymbols)"
180+
IncludeSource="$(IncludeSource)"
181+
PackageTypes="$(PackageType)"
182+
IsTool="$(IsTool)"
183+
RepositoryUrl="$(RepositoryUrl)"
184+
RepositoryType="$(RepositoryType)"
185+
SourceFiles="@(_SourceFiles->Distinct())"
186+
NoPackageAnalysis="$(NoPackageAnalysis)"
187+
MinClientVersion="$(MinClientVersion)"
188+
Serviceable="$(Serviceable)"
189+
FrameworkAssemblyReferences="@(_FrameworkAssemblyReferences)"
190+
ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)"
191+
NuspecOutputPath="$(BaseIntermediateOutputPath)"
192+
IncludeBuildOutput="$(IncludeBuildOutput)"
193+
BuildOutputFolder="$(BuildOutputTargetFolder)"
194+
ContentTargetFolders="$(ContentTargetFolders)"
195+
RestoreOutputPath="$(RestoreOutputAbsolutePath)"
196+
NuspecFile="$(NuspecFileAbsolutePath)"
197+
NuspecBasePath="$(NuspecBasePath)"
198+
NuspecProperties="$(NuspecProperties)"/>
199+
200+
<PackTask Condition="! $(UseNewPack)"
201+
PackItem="$(PackProjectInputFile)"
202+
PackageFiles="@(_PackageFiles)"
203+
PackageFilesToExclude="@(_PackageFilesToExclude)"
204+
PackageVersion="$(PackageVersion)"
205+
PackageId="$(PackageId)"
206+
Title="$(Title)"
207+
Authors="$(Authors)"
208+
Description="$(Description)"
209+
Copyright="$(Copyright)"
210+
RequireLicenseAcceptance="$(PackageRequireLicenseAcceptance)"
211+
LicenseUrl="$(PackageLicenseUrl)"
212+
ProjectUrl="$(PackageProjectUrl)"
213+
IconUrl="$(PackageIconUrl)"
214+
ReleaseNotes="$(PackageReleaseNotes)"
215+
Tags="$(PackageTags)"
216+
TargetPathsToAssemblies="@(_TargetPathsToAssemblies->'%(FinalOutputPath)')"
217+
TargetPathsToSymbols="@(_TargetPathsToSymbols)"
218+
TargetFrameworks="@(_TargetFrameworks)"
219+
AssemblyName="$(AssemblyName)"
220+
PackageOutputPath="$(PackageOutputAbsolutePath)"
221+
IncludeSymbols="$(IncludeSymbols)"
222+
IncludeSource="$(IncludeSource)"
223+
PackageTypes="$(PackageType)"
224+
IsTool="$(IsTool)"
225+
RepositoryUrl="$(RepositoryUrl)"
226+
RepositoryType="$(RepositoryType)"
227+
SourceFiles="@(_SourceFiles->Distinct())"
228+
NoPackageAnalysis="$(NoPackageAnalysis)"
229+
MinClientVersion="$(MinClientVersion)"
230+
Serviceable="$(Serviceable)"
231+
AssemblyReferences="@(_References)"
232+
ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)"
233+
NuspecOutputPath="$(BaseIntermediateOutputPath)"
234+
IncludeBuildOutput="$(IncludeBuildOutput)"
235+
BuildOutputFolder="$(BuildOutputTargetFolder)"
236+
ContentTargetFolders="$(ContentTargetFolders)"
237+
RestoreOutputPath="$(RestoreOutputAbsolutePath)"
238+
NuspecFile="$(NuspecFileAbsolutePath)"
239+
NuspecBasePath="$(NuspecBasePath)"
240+
NuspecProperties="$(NuspecProperties)"/>
241+
</Target>
242+
<!--/+:cnd:noEmit-->
243+
</Project>

paket.dependencies

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
source https://www.nuget.org/api/v2
2-
framework: net46
2+
framework: netstandard20,net46,net452
3+
4+
nuget NUnit
5+
6+
nuget System.Data.SqlClient
7+
nuget System.Data.SQLite.Core.MSIL
8+
39
nuget CompareNETObjects
10+
nuget Newtonsoft.Json
411
nuget Elasticsearch.Net
5-
nuget EventStore.Client
612
nuget EventStore.Client.Embedded
7-
nuget Microsoft.Azure.KeyVault.Core
8-
nuget Microsoft.Data.Edm
9-
nuget Microsoft.Data.OData
10-
nuget Microsoft.Data.Services.Client
11-
nuget Newtonsoft.Json
12-
nuget NuGet.CommandLine
13-
nuget NUnit
14-
nuget NUnit.ReSharperRunner3
15-
nuget RavenDB.Client
16-
nuget RavenDB.Database
1713
nuget RavenDB.Embedded
1814
nuget StackExchange.Redis
1915
nuget System.Data.SQLite.Core
20-
nuget System.Data.SQLite.Core.MSIL
21-
nuget System.Spatial
2216
nuget WindowsAzure.Storage

0 commit comments

Comments
 (0)