Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Only include wanted content files in NuGet package

$
0
0

I am building a nuget package from a c# class library project.

The class library itself has files that are marked as build action=content and I can't change this.

I don't want these content files in the nuget package. If I am using an empty files tag, these content files are not included.

<?xml version="1.0"?><package ><metadata><id>$id$</id><version>$version$</version><title>$title$</title><authors>$author$</authors><owners>$author$</owners>    ...</metadata><files /></package>

However, if I add at least on other file to my package like this

<?xml version="1.0"?><package ><metadata><id>$id$</id><version>$version$</version><title>$title$</title><authors>$author$</authors><owners>$author$</owners>    ...</metadata><files><file src="source/path.dll" target="lib\net45\" /></files></package>

every file marked as content in my project is included in my package, too.

Is there a way to avoid this?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>