-
Notifications
You must be signed in to change notification settings - Fork 525
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 isnt aware of current target framework #2233
Comments
I think I'd need help here |
@forki i think the current integration is ok. just Is also possibile to generate a file for each target framework (like |
Could we generate all? At least that would fit better into pakets philosophy (IMHO) |
fixed with paket 5 beta 1 |
Description
Affect new sdk (the .net core sdk)
Paket doesnt seems to be aware of current target framework when restoring deps.
Repro steps
Create a .csproj who target
net45
but does referenceSystem.Collections.Specialized
just fornetstandard1.3
, likeCreate myapp.csproj
paket.dependencies
paket references
dotnet restore
Expected behavior
Restore succeed, and
System.Collections.Specialized
is not a dependencyActual behavior
Restore fails because
System.Collections.Specialized
doesnt supportnet45
Known workarounds
None.
Notes
As a note the following works.
Minimizing the repro, i think is because
paket.exe" restore --project "myapp.csproj"
doesnt pass the$(TargetFramework)
and the generatedobj\myapp.csproj.references
contains all the netstandard1.3 packages.I think the paket target file should pass a
--framework net45
argument invokingpaket
, so the generatedobj\myapp.csproj.references
contains only dependencies for that target framework.Atm the target file cannot filter packages (adding the
Condition="'$(TargetFramework)' == 'netstandard1.3'"
because the information is missing, and ihmo is better done paket side)As additional note, doing a crossgen (multiple target frameworks) currently invoke paket three times, so with the proposed change should work, because each time paket will generate correct package list and that will be included for that framework build.
ref elastic/elasticsearch-net#2711
The text was updated successfully, but these errors were encountered: