Content only packages #3668

Closed
gerritgoetzen opened this Issue Oct 17, 2016 · 4 comments

Comments

Projects
None yet
4 participants
@gerritgoetzen

Nuget complains on installing content only packages that are created without any assembly to a reference. The package is created from a convention-based working directory with only a build folder. The same problem seems to occur with a content folder only (reference).

The installation (NuGet Package Manager for VS 2015 v3.4.4.1321) fails with an error like:

Install-Package : Could not install package 'My-content-only-package 1.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

The solution is to add an empty lib folder to the root package directory. This is not obvious (no error or warning while packing) and a little cumbersome and therefore I would treat that behavior as a bug.

@rrelyea rrelyea added this to the 3.6 RTM milestone Oct 17, 2016

@rrelyea rrelyea added the Type:Bug label Oct 17, 2016

@iernie

This comment has been minimized.

Show comment
Hide comment
@iernie

iernie Jan 11, 2017

Any news on this?

iernie commented Jan 11, 2017

Any news on this?

@emgarten

This comment has been minimized.

Show comment
Hide comment
@emgarten

emgarten Jan 11, 2017

Contributor

Content and Build are both counted as assets. If you are seeing the error above it means that there are zero files in the package that apply to your target framework.

Please share what version of NuGet you are using, the project Target Framework, and the package if you are seeing different behavior.

Contributor

emgarten commented Jan 11, 2017

Content and Build are both counted as assets. If you are seeing the error above it means that there are zero files in the package that apply to your target framework.

Please share what version of NuGet you are using, the project Target Framework, and the package if you are seeing different behavior.

@iernie

This comment has been minimized.

Show comment
Hide comment
@iernie

iernie Jan 11, 2017

Yeah, I found out I needed to have the files in a folder named "content" for it to work :) Thanks!

iernie commented Jan 11, 2017

Yeah, I found out I needed to have the files in a folder named "content" for it to work :) Thanks!

@emgarten emgarten modified the milestones: 4.0 RTM, Future-1 Feb 16, 2017

@emgarten

This comment has been minimized.

Show comment
Hide comment
@emgarten

emgarten Feb 16, 2017

Contributor

This is fixed in 4.0.0, the build folder is now counted as compatible.

Contributor

emgarten commented Feb 16, 2017

This is fixed in 4.0.0, the build folder is now counted as compatible.

@emgarten emgarten closed this Feb 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment