|
7 | 7 | <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
8 | 8 |
|
9 | 9 | <DetectedMSBuildVersion>$(MSBuildVersion)</DetectedMSBuildVersion>
|
10 |
| - <DetectedMSBuildVersion Condition="'$(MSBuildVersion)' == ''">15.0.0</DetectedMSBuildVersion> |
| 10 | + <DetectedMSBuildVersion Condition="$(MSBuildVersion) == ''">15.0.0</DetectedMSBuildVersion> |
11 | 11 | <MSBuildSupportsHashing>false</MSBuildSupportsHashing>
|
12 | 12 | <MSBuildSupportsHashing Condition=" '$(DetectedMSBuildVersion)' > '15.8.0' ">true</MSBuildSupportsHashing>
|
13 | 13 | <!-- Mark that this target file has been loaded. -->
|
|
20 | 20 | <PaketBootstrapperStyle Condition="Exists('$(PaketToolsPath)paket.bootstrapper.proj')">proj</PaketBootstrapperStyle>
|
21 | 21 | <PaketExeImage>assembly</PaketExeImage>
|
22 | 22 | <PaketExeImage Condition=" '$(PaketBootstrapperStyle)' == 'proj' ">native</PaketExeImage>
|
23 |
| - <MonoPath Condition="'$(MonoPath)' == '' AND Exists('/Library/Frameworks/Mono.framework/Commands/mono')">/Library/Frameworks/Mono.framework/Commands/mono</MonoPath> |
| 23 | + <MonoPath Condition="'$(MonoPath)' == '' And Exists('/Library/Frameworks/Mono.framework/Commands/mono')">/Library/Frameworks/Mono.framework/Commands/mono</MonoPath> |
24 | 24 | <MonoPath Condition="'$(MonoPath)' == ''">mono</MonoPath>
|
25 | 25 |
|
26 | 26 | <!-- PaketBootStrapper -->
|
27 | 27 | <PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' AND Exists('$(PaketRootPath)paket.bootstrapper.exe')">$(PaketRootPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
|
28 | 28 | <PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
|
29 | 29 | <PaketBootStrapperExeDir Condition=" Exists('$(PaketBootStrapperExePath)') " >$([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\</PaketBootStrapperExeDir>
|
30 |
| - |
31 |
| - <PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT' ">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand> |
32 |
| - <PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)"</PaketBootStrapperCommand> |
33 |
| - |
34 |
| - <!-- Disable Paket restore under NCrunch build --> |
35 |
| - <PaketRestoreDisabled Condition="'$(NCrunch)' == '1'">True</PaketRestoreDisabled> |
36 | 30 |
|
37 |
| - <!-- Disable test for CLI tool completely - overrideable via properties in projects or via environment variables --> |
38 |
| - <PaketDisableCliTest Condition=" '$(PaketDisableCliTest)' == '' ">False</PaketDisableCliTest> |
| 31 | + <!-- Paket --> |
39 | 32 |
|
40 |
| - <PaketIntermediateOutputPath Condition=" '$(PaketIntermediateOutputPath)' == '' ">$(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/'))</PaketIntermediateOutputPath> |
41 |
| - </PropertyGroup> |
| 33 | + <!-- windows, root => tool => proj style => bootstrapper => global --> |
| 34 | + <PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' == 'Windows_NT' AND Exists('$(PaketRootPath)paket.exe') ">$(PaketRootPath)paket.exe</PaketExePath> |
| 35 | + <PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' == 'Windows_NT' AND Exists('$(PaketToolsPath)paket.exe') ">$(PaketToolsPath)paket.exe</PaketExePath> |
| 36 | + <PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' == 'Windows_NT' AND '$(PaketBootstrapperStyle)' == 'proj' ">$(PaketToolsPath)paket.exe</PaketExePath> |
| 37 | + <PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' == 'Windows_NT' AND Exists('$(PaketBootStrapperExeDir)') ">$(_PaketBootStrapperExeDir)paket.exe</PaketExePath> |
| 38 | + <PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' == 'Windows_NT' ">paket.exe</PaketExePath> |
42 | 39 |
|
43 |
| - <!-- Resolve how paket should be called --> |
44 |
| - <!-- Current priority is: local (1: repo root, 2: .paket folder) => 3: as CLI tool => as bootstrapper (4: proj Bootstrapper style, 5: BootstrapperExeDir) => 6: global path variable --> |
45 |
| - <Target Name="SetPaketCommand" > |
46 |
| - <!-- Test if paket is available in the standard locations. If so, that takes priority. Case 1/2 - non-windows specific --> |
47 |
| - <PropertyGroup Condition=" '$(OS)' != 'Windows_NT' "> |
48 |
| - <!-- no windows, try native paket as default, root => tool --> |
49 |
| - <PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketRootPath)paket') ">$(PaketRootPath)paket</PaketExePath> |
50 |
| - <PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketToolsPath)paket') ">$(PaketToolsPath)paket</PaketExePath> |
51 |
| - </PropertyGroup> |
| 40 | + <!-- no windows, try native paket as default, root => tool => proj style => mono paket => bootstrpper => global --> |
| 41 | + <PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' AND Exists('$(PaketRootPath)paket') ">$(PaketRootPath)paket</PaketExePath> |
| 42 | + <PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' AND Exists('$(PaketToolsPath)paket') ">$(PaketToolsPath)paket</PaketExePath> |
| 43 | + <PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' AND '$(PaketBootstrapperStyle)' == 'proj' ">$(PaketToolsPath)paket</PaketExePath> |
52 | 44 |
|
53 |
| - <!-- Test if paket is available in the standard locations. If so, that takes priority. Case 2/2 - same across platforms --> |
54 |
| - <PropertyGroup> |
55 |
| - <!-- root => tool --> |
56 |
| - <PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketRootPath)paket.exe') ">$(PaketRootPath)paket.exe</PaketExePath> |
57 |
| - <PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketToolsPath)paket.exe') ">$(PaketToolsPath)paket.exe</PaketExePath> |
58 |
| - </PropertyGroup> |
| 45 | + <!-- no windows, try mono paket --> |
| 46 | + <PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' AND Exists('$(PaketRootPath)paket.exe') ">$(PaketRootPath)paket.exe</PaketExePath> |
| 47 | + <PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' AND Exists('$(PaketToolsPath)paket.exe') ">$(PaketToolsPath)paket.exe</PaketExePath> |
59 | 48 |
|
60 |
| - <!-- If paket hasn't be found in standard locations, test for CLI tool usage. --> |
61 |
| - <!-- First test: Is CLI configured to be used in "dotnet-tools.json"? - can result in a false negative; only a positive outcome is reliable. --> |
62 |
| - <PropertyGroup Condition=" '$(PaketExePath)' == '' "> |
63 |
| - <_DotnetToolsJson Condition="Exists('$(PaketRootPath)/.config/dotnet-tools.json')">$([System.IO.File]::ReadAllText("$(PaketRootPath)/.config/dotnet-tools.json"))</_DotnetToolsJson> |
64 |
| - <_ConfigContainsPaket Condition=" '$(_DotnetToolsJson)' != ''">$(_DotnetToolsJson.Contains('"paket"'))</_ConfigContainsPaket> |
65 |
| - <_ConfigContainsPaket Condition=" '$(_ConfigContainsPaket)' == ''">false</_ConfigContainsPaket> |
66 |
| - </PropertyGroup> |
| 49 | + <!-- no windows, try bootstrapper --> |
| 50 | + <PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' AND Exists('$(PaketBootStrapperExeDir)') ">$(PaketBootStrapperExeDir)paket.exe</PaketExePath> |
67 | 51 |
|
68 |
| - <!-- Second test: Call 'dotnet paket' and see if it returns without an error. Mute all the output. Only run if previous test failed and the test has not been disabled. --> |
69 |
| - <!-- WARNING: This method can lead to processes hanging forever, and should be used as little as possible. See https://github.com/fsprojects/Paket/issues/3705 for details. --> |
70 |
| - <Exec Condition=" '$(PaketExePath)' == '' AND !$(PaketDisableCliTest) AND !$(_ConfigContainsPaket)" Command="dotnet paket --version" IgnoreExitCode="true" StandardOutputImportance="low" StandardErrorImportance="low" > |
71 |
| - <Output TaskParameter="ExitCode" PropertyName="LocalPaketToolExitCode" /> |
72 |
| - </Exec> |
| 52 | + <!-- no windows, try global native paket --> |
| 53 | + <PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' ">paket</PaketExePath> |
73 | 54 |
|
74 |
| - <!-- If paket is installed as CLI use that. Again, only if paket haven't already been found in standard locations. --> |
75 |
| - <PropertyGroup Condition=" '$(PaketExePath)' == '' AND ($(_ConfigContainsPaket) OR '$(LocalPaketToolExitCode)' == '0') "> |
76 |
| - <_PaketCommand>dotnet paket</_PaketCommand> |
77 |
| - </PropertyGroup> |
| 55 | + <!-- Paket command --> |
| 56 | + <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))</_PaketExeExtension> |
| 57 | + <PaketCommand Condition=" '$(PaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)"</PaketCommand> |
| 58 | + <PaketCommand Condition=" '$(PaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</PaketCommand> |
| 59 | + <PaketCommand Condition=" '$(PaketCommand)' == '' ">"$(PaketExePath)"</PaketCommand> |
78 | 60 |
|
79 |
| - <!-- If neither local files nor CLI tool can be found, final attempt is searching for boostrapper config before falling back to global path variable. --> |
80 |
| - <PropertyGroup Condition=" '$(PaketExePath)' == '' AND '$(_PaketCommand)' == '' "> |
81 |
| - <!-- Test for bootstrapper setup --> |
82 |
| - <PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(PaketBootstrapperStyle)' == 'proj' ">$(PaketToolsPath)paket</PaketExePath> |
83 |
| - <PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketBootStrapperExeDir)') ">$(PaketBootStrapperExeDir)paket</PaketExePath> |
84 | 61 |
|
85 |
| - <!-- If all else fails, use global path approach. --> |
86 |
| - <PaketExePath Condition=" '$(PaketExePath)' == ''">paket</PaketExePath> |
87 |
| - </PropertyGroup> |
| 62 | + <PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand> |
| 63 | + <PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)"</PaketBootStrapperCommand> |
88 | 64 |
|
89 |
| - <!-- If not using CLI, setup correct execution command. --> |
90 |
| - <PropertyGroup Condition=" '$(_PaketCommand)' == '' "> |
91 |
| - <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))</_PaketExeExtension> |
92 |
| - <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)"</_PaketCommand> |
93 |
| - <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</_PaketCommand> |
94 |
| - <_PaketCommand Condition=" '$(_PaketCommand)' == '' ">"$(PaketExePath)"</_PaketCommand> |
95 |
| - </PropertyGroup> |
| 65 | + <!-- Disable automagic references for F# dotnet sdk --> |
| 66 | + <!-- This will not do anything for other project types --> |
| 67 | + <!-- see https://github.com/fsharp/fslang-design/blob/master/RFCs/FS-1032-fsharp-in-dotnet-sdk.md --> |
| 68 | + <DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference> |
| 69 | + <DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference> |
96 | 70 |
|
97 |
| - <!-- The way to get a property to be available outside the target is to use this task. --> |
98 |
| - <CreateProperty Value="$(_PaketCommand)"> |
99 |
| - <Output TaskParameter="Value" PropertyName="PaketCommand"/> |
100 |
| - </CreateProperty> |
| 71 | + <!-- Disable Paket restore under NCrunch build --> |
| 72 | + <PaketRestoreDisabled Condition="'$(NCrunch)' == '1'">True</PaketRestoreDisabled> |
101 | 73 |
|
102 |
| - </Target> |
| 74 | + <PaketIntermediateOutputPath Condition=" '$(PaketIntermediateOutputPath)' == '' ">$(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/'))</PaketIntermediateOutputPath> |
| 75 | + </PropertyGroup> |
103 | 76 |
|
104 | 77 | <Target Name="PaketBootstrapping" Condition="Exists('$(PaketToolsPath)paket.bootstrapper.proj')">
|
105 | 78 | <MSBuild Projects="$(PaketToolsPath)paket.bootstrapper.proj" Targets="Restore" />
|
|
108 | 81 | <!-- Official workaround for https://docs.microsoft.com/en-us/visualstudio/msbuild/getfilehash-task?view=vs-2019 -->
|
109 | 82 | <UsingTask TaskName="Microsoft.Build.Tasks.GetFileHash" AssemblyName="Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(MSBuildSupportsHashing)' == 'true' And '$(DetectedMSBuildVersion)' < '16.0.360' " />
|
110 | 83 | <UsingTask TaskName="Microsoft.Build.Tasks.VerifyFileHash" AssemblyName="Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(MSBuildSupportsHashing)' == 'true' And '$(DetectedMSBuildVersion)' < '16.0.360' " />
|
111 |
| - <Target Name="PaketRestore" Condition="'$(PaketRestoreDisabled)' != 'True'" BeforeTargets="_GenerateDotnetCliToolReferenceSpecs;_GenerateProjectRestoreGraphPerFramework;_GenerateRestoreGraphWalkPerFramework;CollectPackageReferences" DependsOnTargets="SetPaketCommand;PaketBootstrapping"> |
| 84 | + <Target Name="PaketRestore" Condition="'$(PaketRestoreDisabled)' != 'True'" BeforeTargets="_GenerateDotnetCliToolReferenceSpecs;_GenerateProjectRestoreGraphPerFramework;_GenerateRestoreGraphWalkPerFramework;CollectPackageReferences" DependsOnTargets="PaketBootstrapping"> |
112 | 85 |
|
113 | 86 | <!-- Step 1 Check if lockfile is properly restored (if the hash of the lockfile and the cache-file match) -->
|
114 | 87 | <PropertyGroup>
|
|
230 | 203 | <PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
|
231 | 204 | <PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
|
232 | 205 | <AllPrivateAssets>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])</AllPrivateAssets>
|
233 |
| - <CopyLocal Condition="'%(PaketReferencesFileLinesInfo.Splits)' == '6'">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])</CopyLocal> |
| 206 | + <CopyLocal Condition="'$(Splits)' == '6'">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])</CopyLocal> |
234 | 207 | </PaketReferencesFileLinesInfo>
|
235 | 208 | <PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
|
236 | 209 | <Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
|
|
273 | 246 | </PropertyGroup>
|
274 | 247 | </Target>
|
275 | 248 |
|
276 |
| - <Target Name="PaketOverrideNuspec" DependsOnTargets="SetPaketCommand" AfterTargets="GenerateNuspec" Condition="('$(IsPackable)' == '' Or '$(IsPackable)' == 'true') And Exists('$(PaketIntermediateOutputPath)/$(MSBuildProjectFile).references')" > |
| 249 | + <Target Name="PaketOverrideNuspec" AfterTargets="GenerateNuspec" Condition="('$(IsPackable)' == '' Or '$(IsPackable)' == 'true') And Exists('$(PaketIntermediateOutputPath)/$(MSBuildProjectFile).references')" > |
277 | 250 | <ItemGroup>
|
278 | 251 | <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/>
|
279 | 252 | <MSBuildMajorVersion Include="$(DetectedMSBuildVersion.Replace(`-`, `.`).Split(`.`)[0])" />
|
|
327 | 300 | DevelopmentDependency="$(DevelopmentDependency)"
|
328 | 301 | BuildOutputInPackage="@(_BuildOutputInPackage)"
|
329 | 302 | TargetPathsToSymbols="@(_TargetPathsToSymbols)"
|
330 |
| - SymbolPackageFormat="$(SymbolPackageFormat)" |
| 303 | + SymbolPackageFormat="symbols.nupkg" |
331 | 304 | TargetFrameworks="@(_TargetFrameworks)"
|
332 | 305 | AssemblyName="$(AssemblyName)"
|
333 | 306 | PackageOutputPath="$(PackageOutputAbsolutePath)"
|
|
374 | 347 | DevelopmentDependency="$(DevelopmentDependency)"
|
375 | 348 | BuildOutputInPackage="@(_BuildOutputInPackage)"
|
376 | 349 | TargetPathsToSymbols="@(_TargetPathsToSymbols)"
|
377 |
| - SymbolPackageFormat="$(SymbolPackageFormat)" |
| 350 | + SymbolPackageFormat="symbols.nupkg" |
378 | 351 | TargetFrameworks="@(_TargetFrameworks)"
|
379 | 352 | AssemblyName="$(AssemblyName)"
|
380 | 353 | PackageOutputPath="$(PackageOutputAbsolutePath)"
|
|
0 commit comments