Quantcast
Channel: WE MOVED to github.com/nuget. This site is not monitored!
Viewing all articles
Browse latest Browse all 7612

Closed Issue: Support creating empty folders from .nuspec [2507]

$
0
0
My assumption is that NuGet uses the lib folders to determine whether a particular package can be referenced from a given platform.

In order to keep things simple I want to ensure that my package can be referenced from, let's say, .NET 4.5 although there will no assemblies added to the project.

I tried the following three lines to get an empty folder named "lib/net45" but none of them worked:

<file src="_._" target="lib\net45" /> // Error: File “_._” couldn’t be found

<file target="lib\net45" /> // Error: Attribute “src” is required

<file src=”” target="lib\net45" /> // Error: Attribute “src” is required

The thing that kind-of works is this (although not quite intuitive):

<file src=”*” exclude=”*” target="lib\net45" />

However, it only works in the sense that I don’t get an error but it doesn’t work in the sense that the resulting .nupkg file still doesn’t have an empty folder.

Apparently, I need to have an empty file named "_._" that I then need to reference from the .nuspec file:

<file src=”_._” target="lib\net45" />

That seems quite cumbersome and counter intuitive. I think this could be better handled by “NuGet.exe pack” and a special XML node under files, such as:

<dir target="lib\net45" />
Comments: In 2.2, a folder with _._ file gets added to the nupkg file by Nuget pack command.

Viewing all articles
Browse latest Browse all 7612

Trending Articles



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