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

Using paket install; "Could not find paket.references" #2302

Closed
haf opened this issue Apr 28, 2017 · 5 comments
Closed

Using paket install; "Could not find paket.references" #2302

haf opened this issue Apr 28, 2017 · 5 comments

Comments

@haf
Copy link
Member

haf commented Apr 28, 2017

Description

Use paket to manage dependencies in fsproj files for .Net Core side-by-side with normal files. Build the project:

  	Could not find file "/Users/h/dev/haf/expecto/Expecto.netcore.Tests/paket.references".
/Users/h/dev/haf/expecto/.paket/Paket.Restore.targets(17,5): error MSB3073: The command "/Library/Frameworks/Mono.framework/Commands/mono --runtime=v4.0.30319 "/Users/h/dev/haf/expecto/.paket/paket.exe" restore --project "/Users/h/dev/haf/expecto/Expecto.netcore.Tests/Expecto.netcore.Tests.fsproj" " exited with code 1. [/Users/h/dev/haf/expecto/Expecto.netcore.Tests/Expecto.netcore.Tests.fsproj]

Is printed, but the build doesn't fail and it's not an error. It just doesn't exist in that project. Errors when building is a major source of alert fatigue to developers on projects and I'd rather not have them in my own project.

/cc @adamchester @cloudRoutine (how do we do about the .Net Core stuff in Expecto? Can we mitigate this ourselves?)

Repro steps

Please provide the steps required to reproduce the problem

  1. clone expecto from https://github.com/haf/expecto/
  2. bundle
  3. bundle exec rake
@forki
Copy link
Member

forki commented Apr 28, 2017

<Project Sdk="FSharp.NET.Sdk;Microsoft.NET.Sdk">
  <PropertyGroup>
    <!-- Name and AssemblyName are required because albacore fails without it -->
    <Name>Expecto.netcore.Tests</Name>
    <AssemblyName>Expecto.netcore.Tests</AssemblyName>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp1.1</TargetFramework>
    <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
    <DefineConstants>
      RESHAPED_THREAD_CULTURE;
      $(DefineConstants)
    </DefineConstants>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="../Expecto.Tests/Prelude.fs" />
    <Compile Include="../Expecto.Tests/Tests.fs" />
    <Compile Include="../Expecto.Tests/SummaryTests.fs" />
    <Compile Include="../Expecto.Tests/FocusedTests.fs" />
    <!-- TODO: consider enabling these tests when FsCheck/BenchmarkDotNetTests are ported to netcore
    <Compile Include="../Expecto.Tests/FsCheckTests.fs" />
    <Compile Include="../Expecto.Tests/BenchmarkDotNetTests.fs" />
    -->
    <Compile Include="../Expecto.Tests/Main.fs" />
    <None Include="../Expecto.Tests/Tests.fsx" />
    <None Include="../Expecto.Tests/paket.references" />
    <Content Include="../Expecto.Tests/app.config" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="FSharp.NET.Sdk" Version="1.0.*" PrivateAssets="All" />
    <PackageReference Include="FSharp.Core" Version="4.1.0" />
    <ProjectReference Include="../Expecto.netcore/Expecto.netcore.fsproj" />
    <PackageReference Include="FsCheck" Version="3.0.0-alpha-b752" />
  </ItemGroup>
  <!--<Import Project="..\.paket\Paket.Restore.targets" />-->
</Project>

huh? you can't use references files from different folder. Also Paket.Restore.targets is commented out!?

@forki forki closed this as completed in dae82b2 Apr 28, 2017
@haf
Copy link
Member Author

haf commented Apr 28, 2017

/cc @adamchester – what say you ;)?

@forki
Copy link
Member

forki commented Apr 28, 2017

@haf I updated the Paket.Restore.targets that ships with paket 5 alpha to fail the build when paket fails. a paket install run will change that in your projects (given you use latest alpha)

@haf
Copy link
Member Author

haf commented Apr 28, 2017

@forki Thanks. It sure does make true its promise of an error that way.

@adamchester
Copy link

adamchester commented Apr 28, 2017

Is this resolved now? I have just done clone & bundle & rake of Expecto and it Works On My Machine (TM).

Anyway I think is worth noting... originally in Expecto, we didn't plan to use Paket to manage packages for the SDK-based netstandard projects. That's why it was commented out.

  1. Way back when I first tried it, it wasn't quite ready for prime-time (we already had lots of unstable stuff here and I wasn't ready to bring in new unstable stuff).
  2. It seemed we would potentially need different groups of package versions anyway. For example, we had a theory that netstandard1.6 might need a different minimum version of Mono.Cecil than what full .net framework targets would required.

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

3 participants