-
Notifications
You must be signed in to change notification settings - Fork 519
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
Combining type project and specifying files included in nuget package with different framework requirement #1221
Comments
|
do you have this as a zip or git repo for me? |
|
I can create a git repo, give me a couple of hours |
|
Updated https://github.com/theggelund/paket_bug I've created 2 project files in separate folder under MyClassLibrary ( They have the same dependencies but that doesn't matter. I believe that the error occurs when one project references the other. the bin folder contains separate files for v4.0, v4.5.2 and v4.6. These dll and pdb files are only text files with the version expected inside. the out folder contains the nupkg files that has error, DIPS.Infrastructure has the error in v4.0\AnyCPU\release\DIPS.Infrastructure.dll |
|
it can't load the assemblies to retrieve meta data. can you try to reducethe repro to "type file"? |
|
Yes that's fine. I only thought I might be easier to use type file to
|
|
I can reproduce |
|
Ok let's try to analyze MyClassLibrary2\manual_project\Dips.Infrastructure.csproj
Unfortunately we don't undestand this: So paket get's confused and thinks TargetFrameworkVersion is "Client" ==> v4,0 and put's project output (v4.6 binaries) into v4.0 folder. This overwrites the already copied v4.0 bins from the "additional files" section. I guess the fix is to make Paket understand your conditions. |
|
@amazingant in #942 you introduced magic parsing in ProjectFile.GetOutputDirectory. This magic needs to be consistent with GetTargetProfile() (where it's basically missing). Are you interested in helping here and making GetTargetProfile as smart as GetOutputDirectory? |
|
Wouldn't it be possible to specify an override for template file, like when files are specified or some kind of magic constant is specified, then paket will not try to find any files to put in nupkg but rather use the files specified? I guess my project is kind of special since I try to build for multiple platforms, and one of them are v4.0 client profile. |
|
I don't think we should introduce another option here. I'd really like to
|
|
That said: we could also change the copy order to make your use case work
|
|
If I'm understanding the comment chain here, I don't see why the parsing code I wrote couldn't be used for this too. I rather expected it would be useful again, as someone somewhere had to be doing insane things to their project files just like I do. 😁 But if it can be fixed easily elsewhere, I'll hold-off. @forki: If you do want me to tackle this, I'd probably want to move my code farther up in the ProjectFile definition and wrap it up as |
|
Yes that's what I hoped. Please reuse your code in gettargetprofile. Thx a
|
|
@theggelund not sure if my workaround worked, but could you please try 2.25.2? |
|
It works |
|
Cool. So we have no pressure for the real fix. But when it's in place I can
|





When using project type project in paket.template and specifying different files for different framework, the packages for 4.5.2 and 4.6 are correct but the package for 4.0 is replaced with the content of package for 4.6
paket.template
The text was updated successfully, but these errors were encountered: