-
Notifications
You must be signed in to change notification settings - Fork 289
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
Duality nuget packages have the wrong folder structure under lib #696
Comments
Duality internal NuGet packages currently do not specify a target framework and do not use framework folders. This hasn't been a problem in old NuGet via VS, but it is becoming one when working in the more modern netstandard / netcore area. It's not an issue of binaries or building, but how things are packaged and labeled in the end. It will need to be addressed before switching Duality to .Net Standard, see also this comment and also this one, but fixing this would be a great idea in any case. As a first step, the Duality package manager needs to properly support / consume multi-framework packages and, when this is done, Duality binaries can be packed specifying a proper target framework as well. |
Note that the Duality package manager should now be smart enough to handle multi-framework packages, both regarding their payload and dependencies - meaning this issue is no longer blocked by preconditions. |
Solution seems to be to simply use 'nuget pack' right? Since we are planning to move away from the older nightly build tool this could be solved at the same time. |
We'll still need So for the sake of simplicity, I'd keep the two issues separate. Better two small, self-contained steps with a small gain each, than one bigger, riskier one. Rough outline of the steps to investigate:
|
Progress
ToDo
|
Progress
ToDo
|
Duality and all of its dependencies now use framework folders in their packages. Closing this. |
Summary
Currently the dll's in the duality nuget packages are directly in the lib folder. This is wrong and can cause annoying problems. One of these problems is that you cannot reference duality in .Netstandard1.1 project (version 2.0 and higher do work).
The lib folder should contain a folder for each target framework (even if its only 1). So in the case of a pcl with
profile111
the lib folder should contain aportable45-net45%2Bwin8%2Bwpa81
folder with the dllWhy is this important? Nuget uses these folder names to figure out the target framework and uses this to resolve compatiblity issues. If you put the dll directly under lib then nuget will identify it as a
.NETFramework, Version=v0.0
. Obviously this is prone to cause problems when it needs this version to resolve something.How to reproduce
Try to reference a Adamslair.Duality from a netstandard1.1 project through nuget. It should work but it doesnt. Putting
<PackageTargetFallback>$(PackageTargetFallback);portable45-net45+win8+wpa81</PackageTargetFallback>
wont fix this as it cannot identify the library.Workaround
2 options:
<PackageTargetFallback>$(PackageTargetFallback);net00</PackageTargetFallback>
to your csproj. This will fix adding the nuget package.Analysis
nuget pack SomeDuality.csproj
seems to generate a correct nuget package. Not sure what the ci server is using for duality but its doing something different for sure.The text was updated successfully, but these errors were encountered: