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
Paket fails on projects that target multiple frameworks #2496
Comments
This sounds like an issue with dotnet cli itself. Why is it not providing the target framework information? |
Which of them? .NET Standard 1.6 or .NET Framework 4.6.2? I will test it with the stable CLI. |
We I tested multi target it actually called paket restore two times. One with every framework |
We should probably use the |
/cc @enricosada |
Or a breaking change in |
I guess so. But I uninstalled the preview CLI and the same error appeared. I also tried to "bisect" the bug by trying with Paket 5.0.0, but it happened again. I guess it's something else in my machine that changed. In the past I could make cross-framework packages with Paket and without problem.
I will try to see if it does anything. Currently, my project only targets .NET 4.6.2. 😢 |
No luck. 🙁 |
Can confirm that the plural works
|
@Mpdreamz can you please upload a zip with a repro |
Working on a PR with integration test 😄 hopefully I get somewhere otherwise will upload a repro |
even better ;-) |
The bug seems fixed with Paket 5.7.0. |
I think one is for discovering the cli tools |
With the latest Paket.Restore.targets I still wasn't able to get this to work. eg. <Project Sdk="FSharp.NET.Sdk;Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard1.6;net461</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
...
However, this works: <Project Sdk="FSharp.NET.Sdk;Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard1.6;net461</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<TargetFrameworks Include="netstandard1.6" />
<TargetFrameworks Include="net461" />
</ItemGroup>
... This makes sense to me, given the usage of the |
@seanamosw oh. can you please suggest a PR with a fix to the targets file so that thefirst thing works? |
@Mpdreamz do you see the issue? |
I have not yet tested the new release or the updates but my original commit splitted the tfm Which then allows @ to itterate each item. Now we pass the string verbatim and let paket expand it internally (:+1:) it should be |
ok changing it right now! |
fixed. @seanamosw can you please try it? |
Can confirm the change to |
Description
I made a very simple project that only depends on one package. It targets both .NET Standard 1.6 and .NET Framework 4.6.2. Running
paket install
andpaket restore
gives no errors. But when it rundotnet restore
, Paket says this:C:\code\paket_bug\.paket\Paket.Restore.targets(22,5): error MSB3073: The command ""C:\code\paket_bug\.paket\paket.exe" restore --project "C:\code\paket_bug\Hello.fsproj" --target-framework " exited with code 1. [C:\code\paket_bug\Hello.fsproj]
The target framework is empty!
Repro steps
hellp.fsproj
paket.dependencies
paket.references
Chessie
Possible cause
In the project file, there is a
TargetFrameworks
section, not theTargetFramework
thatpaket.restore.targets
asks for.paket.restore.targets
should handle it somehow. On projects that target one framework and have theTargetFramework
property, Paket works like a charm.Version information
paket --version:
Paket version 5.5.3
dotnet --version:
2.0.0-preview2-006497
The text was updated successfully, but these errors were encountered: