Creating NuGet Packages - Why doesn't this folder structure work for .NET 4.0?
-
27-10-2019 - |
Question
Here is the issue I'm having - I cannot get my project's NuGet package to work for .NET 4.0.
Here is what my folder structure looks like:
lib\
\.NET 4.0
binary.dll
\Silverlight 4.0
binary.silverlight.dll
Whenever I try to add this package to a Silverlight 4 project, it works just fine. When I try to add it to an ASP.NET MVC3 app I get the following error: "unable to find assembly references that are compatible with the target framework '.NETFramework, version=v4.0'"
What am I doing wrong?
Solution
Change the folder name to Net40 and SL4 (or Silverlight4 no spaces). You should file a bug though, those names should work. I think the "." in .NET might be throwing it off.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow