Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAKE CLIs restore step fails on some machines, but .paket/paket.exe restore works #2182

Closed
atlemann opened this issue Nov 1, 2018 · 2 comments

Comments

@atlemann
Copy link
Contributor

atlemann commented Nov 1, 2018

Description

I have some Windows Server 2008 TeamCity build agents which fail when building using FAKE CLI. The NuGet restore process fails with a bunch of exceptions, however doing a .paket/paket.exe restore works fine.

Repro steps

I'm not sure, it works on my workstation and linux build agents, but none of my Windows build agents.

Expected behavior

Build to pass

Actual behavior

Build fails. See attached build log:
build.log

Known workarounds

  1. First run .paket/paket.exe restore
  2. then run build.cmd

Related information

  • Operating system
    Windows Server 2008
  • .NET Runtime, CoreCLR or Mono Version
    CoreCLR
  • Indications of severity
    Blocking
  • Version of FAKE (4.X, 5.X)
    FAKE 5
@matthid
Copy link
Member

matthid commented Nov 1, 2018

Have you checked if this is a duplicate of #2097?
In particular this comment

@atlemann
Copy link
Contributor Author

atlemann commented Nov 1, 2018

Adding <DotnetCliToolTargetFramework>netcoreapp2.0</DotnetCliToolTargetFramework> fixes this issue. Now my build.proj file looks like this:

<Project>
  <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <DotnetCliToolTargetFramework>netcoreapp2.0</DotnetCliToolTargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <DotNetCliToolReference Include="dotnet-fake" Version="5.*" />
  </ItemGroup>

  <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

  <PropertyGroup>
    <RepoRootDir>$([System.IO.Path]::GetFullPath("$(MSBuildThisFileDirectory)"))</RepoRootDir>
    <BuildDependsOn></BuildDependsOn>
    <CoreBuildDependsOn></CoreBuildDependsOn>
    <FakeParallel Condition="'$(Parallel)' == 'true'">--parallel 3</FakeParallel>
    <FakeTargetArg Condition="'$(FakeTarget)' != ''">target $(FakeTarget)</FakeTargetArg>
  </PropertyGroup>

  <Target Name="Build">
    <Exec IgnoreStandardErrorWarningFormat="true" Command='dotnet fake build $(FakeParallel) $(FakeTargetArg)' WorkingDirectory="$(RepoRootDir)" />
  </Target>

  <Target Name="Pack">
  </Target>

  <Target Name="Test">
  </Target>

  <Target Name="VSTest" DependsOnTargets="Test" />
</Project>

@atlemann atlemann closed this as completed Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants