Reputation: 6541
In my simple ASP.net webservice I get the NuGet "assembly outside lib folder" warning in 2 scenarios:
The DLLs do actually get packaged in the nupkg file (in the /content and /tools folder, respectively).
How should I configure my project?
I have checked the answer to the nuget-assembly-outside-lib-folder question.
Build dumps below
Library referenced in my project warning:
[10:20:34][pack] Issue: Assembly outside lib folder.
[10:20:34][pack] Description: The assembly 'content\(referenced library).dll' is not inside the 'lib' folder and hence it won't be added as reference when the package is installed into a project.
[10:20:34][pack] Solution: Move it into the 'lib' folder if it should be referenced.
Main project assembly warning:
[10:20:34][pack] Issue: Assembly outside lib folder.
[10:20:34][pack] Description: The assembly 'tools\(my assembly).dll' is not inside the 'lib' folder and hence it won't be added as reference when the package is installed into a project.
[10:20:34][pack] Solution: Move it into the 'lib' folder if it should be referenced.
I find it odd that the default build process for a simple ASP.NET project should package files in a non-compliant way when the .nuspec file has not been tampered with.
Upvotes: 2
Views: 6686
Reputation: 3768
I added an answer to the referenced question as well, but you can have your build server build the .dll files in the normal folders, then use nuget pack against the .csproj file instead of the .nuspec file. It will pick up the info in the .nuspec file, but it seems to find the assemblies better with help from the .csproj file. Something like:
nuget pack simple.csproj -IncludeReferencedProjects
Upvotes: 3