|
|
|
@@ -7,7 +7,7 @@
|
|
|
|
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
|
|
|
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
|
|
|
|
|
|
|
|
|
|
|
<DetectedMSBuildVersion>$(MSBuildVersion)</DetectedMSBuildVersion>
|
|
|
|
<DetectedMSBuildVersion>$(MSBuildVersion)</DetectedMSBuildVersion>
|
|
|
|
<DetectedMSBuildVersion Condition="$(MSBuildVersion) == ''">15.0.0</DetectedMSBuildVersion>
|
|
|
|
<DetectedMSBuildVersion Condition="'$(MSBuildVersion)' == ''">15.0.0</DetectedMSBuildVersion>
|
|
|
|
<MSBuildSupportsHashing>false</MSBuildSupportsHashing>
|
|
|
|
<MSBuildSupportsHashing>false</MSBuildSupportsHashing>
|
|
|
|
<MSBuildSupportsHashing Condition=" '$(DetectedMSBuildVersion)' > '15.8.0' ">true</MSBuildSupportsHashing>
|
|
|
|
<MSBuildSupportsHashing Condition=" '$(DetectedMSBuildVersion)' > '15.8.0' ">true</MSBuildSupportsHashing>
|
|
|
|
<!-- Mark that this target file has been loaded. -->
|
|
|
|
<!-- Mark that this target file has been loaded. -->
|
|
|
|
@@ -28,8 +28,36 @@
|
|
|
|
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
|
|
|
|
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
|
|
|
|
<PaketBootStrapperExeDir Condition=" Exists('$(PaketBootStrapperExePath)') " >$([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\</PaketBootStrapperExeDir>
|
|
|
|
<PaketBootStrapperExeDir Condition=" Exists('$(PaketBootStrapperExePath)') " >$([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\</PaketBootStrapperExeDir>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Paket -->
|
|
|
|
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
|
|
|
|
|
|
|
|
<PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Disable automagic references for F# dotnet sdk -->
|
|
|
|
|
|
|
|
<!-- This will not do anything for other project types -->
|
|
|
|
|
|
|
|
<!-- see https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1002-fsharp-in-dotnet-sdk.md -->
|
|
|
|
|
|
|
|
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
|
|
|
|
|
|
|
|
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Disable Paket restore under NCrunch build -->
|
|
|
|
|
|
|
|
<PaketRestoreDisabled Condition="'$(NCrunch)' == '1'">True</PaketRestoreDisabled>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<PaketIntermediateOutputPath Condition=" '$(PaketIntermediateOutputPath)' == '' ">$(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/'))</PaketIntermediateOutputPath>
|
|
|
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Check if paket is available as local dotnet cli tool -->
|
|
|
|
|
|
|
|
<Target Name="SetPaketCommand" >
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Call 'dotnet paket' and see if it returns without an error. Mute all the output. -->
|
|
|
|
|
|
|
|
<Exec Command="dotnet paket --version" IgnoreExitCode="true" StandardOutputImportance="low" StandardErrorImportance="low" >
|
|
|
|
|
|
|
|
<Output TaskParameter="ExitCode" PropertyName="LocalPaketToolExitCode" />
|
|
|
|
|
|
|
|
</Exec>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- If local paket tool is found, use that -->
|
|
|
|
|
|
|
|
<PropertyGroup Condition=" '$(LocalPaketToolExitCode)' == '0' ">
|
|
|
|
|
|
|
|
<InternalPaketCommand>dotnet paket</InternalPaketCommand>
|
|
|
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- If not, then we go through our normal steps of setting the Paket command. -->
|
|
|
|
|
|
|
|
<PropertyGroup Condition=" '$(LocalPaketToolExitCode)' != '0' ">
|
|
|
|
<!-- windows, root => tool => proj style => bootstrapper => global -->
|
|
|
|
<!-- windows, root => tool => proj style => bootstrapper => global -->
|
|
|
|
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' == 'Windows_NT' AND Exists('$(PaketRootPath)paket.exe') ">$(PaketRootPath)paket.exe</PaketExePath>
|
|
|
|
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' == 'Windows_NT' AND Exists('$(PaketRootPath)paket.exe') ">$(PaketRootPath)paket.exe</PaketExePath>
|
|
|
|
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' == 'Windows_NT' AND Exists('$(PaketToolsPath)paket.exe') ">$(PaketToolsPath)paket.exe</PaketExePath>
|
|
|
|
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' == 'Windows_NT' AND Exists('$(PaketToolsPath)paket.exe') ">$(PaketToolsPath)paket.exe</PaketExePath>
|
|
|
|
@@ -52,28 +80,20 @@
|
|
|
|
<!-- no windows, try global native paket -->
|
|
|
|
<!-- no windows, try global native paket -->
|
|
|
|
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' ">paket</PaketExePath>
|
|
|
|
<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' ">paket</PaketExePath>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Paket command -->
|
|
|
|
|
|
|
|
<_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))</_PaketExeExtension>
|
|
|
|
<_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))</_PaketExeExtension>
|
|
|
|
<PaketCommand Condition=" '$(PaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)"</PaketCommand>
|
|
|
|
<InternalPaketCommand Condition=" '$(InternalPaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)"</InternalPaketCommand>
|
|
|
|
<PaketCommand Condition=" '$(PaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</PaketCommand>
|
|
|
|
<InternalPaketCommand Condition=" '$(InternalPaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</InternalPaketCommand>
|
|
|
|
<PaketCommand Condition=" '$(PaketCommand)' == '' ">"$(PaketExePath)"</PaketCommand>
|
|
|
|
<InternalPaketCommand Condition=" '$(InternalPaketCommand)' == '' ">"$(PaketExePath)"</InternalPaketCommand>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
|
|
|
|
|
|
|
|
<PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Disable automagic references for F# dotnet sdk -->
|
|
|
|
|
|
|
|
<!-- This will not do anything for other project types -->
|
|
|
|
|
|
|
|
<!-- see https://github.com/fsharp/fslang-design/blob/master/RFCs/FS-1032-fsharp-in-dotnet-sdk.md -->
|
|
|
|
|
|
|
|
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
|
|
|
|
|
|
|
|
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Disable Paket restore under NCrunch build -->
|
|
|
|
|
|
|
|
<PaketRestoreDisabled Condition="'$(NCrunch)' == '1'">True</PaketRestoreDisabled>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<PaketIntermediateOutputPath Condition=" '$(PaketIntermediateOutputPath)' == '' ">$(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/'))</PaketIntermediateOutputPath>
|
|
|
|
|
|
|
|
</PropertyGroup>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- The way to get a property to be available outside the target is to use this task. -->
|
|
|
|
|
|
|
|
<CreateProperty Value="$(InternalPaketCommand)">
|
|
|
|
|
|
|
|
<Output TaskParameter="Value" PropertyName="PaketCommand"/>
|
|
|
|
|
|
|
|
</CreateProperty>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
|
|
<Target Name="PaketBootstrapping" Condition="Exists('$(PaketToolsPath)paket.bootstrapper.proj')">
|
|
|
|
<Target Name="PaketBootstrapping" Condition="Exists('$(PaketToolsPath)paket.bootstrapper.proj')">
|
|
|
|
<MSBuild Projects="$(PaketToolsPath)paket.bootstrapper.proj" Targets="Restore" />
|
|
|
|
<MSBuild Projects="$(PaketToolsPath)paket.bootstrapper.proj" Targets="Restore" />
|
|
|
|
</Target>
|
|
|
|
</Target>
|
|
|
|
@@ -81,7 +101,7 @@
|
|
|
|
<!-- Official workaround for https://docs.microsoft.com/en-us/visualstudio/msbuild/getfilehash-task?view=vs-2019 -->
|
|
|
|
<!-- Official workaround for https://docs.microsoft.com/en-us/visualstudio/msbuild/getfilehash-task?view=vs-2019 -->
|
|
|
|
<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' " />
|
|
|
|
<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' " />
|
|
|
|
<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' " />
|
|
|
|
<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' " />
|
|
|
|
<Target Name="PaketRestore" Condition="'$(PaketRestoreDisabled)' != 'True'" BeforeTargets="_GenerateDotnetCliToolReferenceSpecs;_GenerateProjectRestoreGraphPerFramework;_GenerateRestoreGraphWalkPerFramework;CollectPackageReferences" DependsOnTargets="PaketBootstrapping">
|
|
|
|
<Target Name="PaketRestore" Condition="'$(PaketRestoreDisabled)' != 'True'" BeforeTargets="_GenerateDotnetCliToolReferenceSpecs;_GenerateProjectRestoreGraphPerFramework;_GenerateRestoreGraphWalkPerFramework;CollectPackageReferences" DependsOnTargets="SetPaketCommand;PaketBootstrapping">
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Step 1 Check if lockfile is properly restored (if the hash of the lockfile and the cache-file match) -->
|
|
|
|
<!-- Step 1 Check if lockfile is properly restored (if the hash of the lockfile and the cache-file match) -->
|
|
|
|
<PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
|
|
@@ -203,7 +223,7 @@
|
|
|
|
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
|
|
|
|
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
|
|
|
|
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
|
|
|
|
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
|
|
|
|
<AllPrivateAssets>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])</AllPrivateAssets>
|
|
|
|
<AllPrivateAssets>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])</AllPrivateAssets>
|
|
|
|
<CopyLocal Condition="'$(Splits)' == '6'">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])</CopyLocal>
|
|
|
|
<CopyLocal Condition="'%(PaketReferencesFileLinesInfo.Splits)' == '6'">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])</CopyLocal>
|
|
|
|
</PaketReferencesFileLinesInfo>
|
|
|
|
</PaketReferencesFileLinesInfo>
|
|
|
|
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
|
|
|
|
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
|
|
|
|
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
|
|
|
|
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
|
|
|
|
@@ -246,7 +266,7 @@
|
|
|
|
</PropertyGroup>
|
|
|
|
</PropertyGroup>
|
|
|
|
</Target>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
|
|
<Target Name="PaketOverrideNuspec" AfterTargets="GenerateNuspec" Condition="('$(IsPackable)' == '' Or '$(IsPackable)' == 'true') And Exists('$(PaketIntermediateOutputPath)/$(MSBuildProjectFile).references')" >
|
|
|
|
<Target Name="PaketOverrideNuspec" DependsOnTargets="SetPaketCommand" AfterTargets="GenerateNuspec" Condition="('$(IsPackable)' == '' Or '$(IsPackable)' == 'true') And Exists('$(PaketIntermediateOutputPath)/$(MSBuildProjectFile).references')" >
|
|
|
|
<ItemGroup>
|
|
|
|
<ItemGroup>
|
|
|
|
<_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/>
|
|
|
|
<_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/>
|
|
|
|
<MSBuildMajorVersion Include="$(DetectedMSBuildVersion.Replace(`-`, `.`).Split(`.`)[0])" />
|
|
|
|
<MSBuildMajorVersion Include="$(DetectedMSBuildVersion.Replace(`-`, `.`).Split(`.`)[0])" />
|
|
|
|
@@ -300,7 +320,7 @@
|
|
|
|
DevelopmentDependency="$(DevelopmentDependency)"
|
|
|
|
DevelopmentDependency="$(DevelopmentDependency)"
|
|
|
|
BuildOutputInPackage="@(_BuildOutputInPackage)"
|
|
|
|
BuildOutputInPackage="@(_BuildOutputInPackage)"
|
|
|
|
TargetPathsToSymbols="@(_TargetPathsToSymbols)"
|
|
|
|
TargetPathsToSymbols="@(_TargetPathsToSymbols)"
|
|
|
|
SymbolPackageFormat="symbols.nupkg"
|
|
|
|
SymbolPackageFormat="$(SymbolPackageFormat)"
|
|
|
|
TargetFrameworks="@(_TargetFrameworks)"
|
|
|
|
TargetFrameworks="@(_TargetFrameworks)"
|
|
|
|
AssemblyName="$(AssemblyName)"
|
|
|
|
AssemblyName="$(AssemblyName)"
|
|
|
|
PackageOutputPath="$(PackageOutputAbsolutePath)"
|
|
|
|
PackageOutputPath="$(PackageOutputAbsolutePath)"
|
|
|
|
@@ -347,7 +367,7 @@
|
|
|
|
DevelopmentDependency="$(DevelopmentDependency)"
|
|
|
|
DevelopmentDependency="$(DevelopmentDependency)"
|
|
|
|
BuildOutputInPackage="@(_BuildOutputInPackage)"
|
|
|
|
BuildOutputInPackage="@(_BuildOutputInPackage)"
|
|
|
|
TargetPathsToSymbols="@(_TargetPathsToSymbols)"
|
|
|
|
TargetPathsToSymbols="@(_TargetPathsToSymbols)"
|
|
|
|
SymbolPackageFormat="symbols.nupkg"
|
|
|
|
SymbolPackageFormat="$(SymbolPackageFormat)"
|
|
|
|
TargetFrameworks="@(_TargetFrameworks)"
|
|
|
|
TargetFrameworks="@(_TargetFrameworks)"
|
|
|
|
AssemblyName="$(AssemblyName)"
|
|
|
|
AssemblyName="$(AssemblyName)"
|
|
|
|
PackageOutputPath="$(PackageOutputAbsolutePath)"
|
|
|
|
PackageOutputPath="$(PackageOutputAbsolutePath)"
|
|
|
|
|