Skip to content

Commit

Permalink
Only run GitVersionTask during Windows builds.
Browse files Browse the repository at this point in the history
Failure more on Linux:
```
2018-12-04T18:02:22.6601166Z "/home/vsts/work/1/s/ServerHost.sln" (default target) (1) ->
2018-12-04T18:02:22.6601998Z "/home/vsts/work/1/s/ServerHost/ServerHost.csproj" (default target) (2) ->
2018-12-04T18:02:22.6602670Z (WriteVersionInfoToBuildLog target) ->
2018-12-04T18:02:22.6604817Z   /home/vsts/.nuget/packages/gitversiontask/4.0.1-beta1-50/build/functionality/GitVersionBuild.targets(6,5):
 error MSB4175: The task factory "UtilPack.NuGet.MSBuild.NuGetTaskRunnerFactory" could not be loaded
   from the assembly "/home/vsts/.nuget/packages/utilpack.nuget.msbuild/2.9.1/build/net46/UtilPack.NuGet.MSBuild.dll".
 Could not load type of field 'UtilPack.NuGet.BoundRestoreCommandUser:_clientPolicyContext' (8) due to:
 Could not resolve type with token 0100006c from typeref (expected class 'NuGet.Packaging.Signing.ClientPolicyContext' in assembly 'NuGet.Packaging, Version=4.9.0.6, Culture=neutral, PublicKeyToken=31bf3856ad364e35')
 assembly:NuGet.Packaging, Version=4.9.0.6, Culture=neutral, PublicKeyToken=31bf3856ad364e35
 type:NuGet.Packaging.Signing.ClientPolicyContext
 member:(null)
 [/home/vsts/work/1/s/ServerHost/ServerHost.csproj]
```
  • Loading branch information
jthelin committed Dec 4, 2018
1 parent ab208ec commit 209fd69
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ServerHost/ServerHost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="log4net" Version="2.0.8" />
</ItemGroup>

<ItemGroup Condition=" '$(OS)' == 'Windows_NT' ">
<PackageReference Include="GitVersionTask" Version="4.0.1-beta1-50">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down

0 comments on commit 209fd69

Please sign in to comment.