<file src="..\whatever" /> Not working, Bug?

Jul 12, 2011 at 7:26 AM

It seems that whenever you specify ..\ on your file source in the nuspec file, they dont seem to get copied over, particularly files that are destined for the Tools folder.

It works in most cases for lib and content, but definitely not for tools.

It seems to be a bug to me.

I've tried many other possible workarounds, but with no joy so far:

<file src="..\whatever.dll" target="tools" />

<file src="..\whatever.dll" target="tools\whatever.dll" />

<file src="..\*.*" target="tools" />

<file src="..\SomeFolder\**" target="tools" />

<file src="..\SomeFolder\**" target="" />

None of those hacks works, with forward slash or backward slash.

I package it using nuget.exe pack *.csproj, as well as against the nuspec. None works.

I tried using -basePath to the parent folder, which is not respected when you pack it against csproj, which I can't quite see any obvious reason why it should be, and therefore smells like another bug to me.

The -basePath does work with nuspec, as long as i don't use the csproj, but this is getting too far from the ideal, especially for an open-source project that im building, since it will demand all developers to know about this very specific hack to package up the project.

Does anyone have any workaround for this problem?


Dec 3, 2011 at 8:02 AM
Edited Dec 3, 2011 at 8:52 AM


Dec 3, 2011 at 10:12 PM

Could you provide us with the way your directory structure is set up? Our code doesn't differentiate between different target directories so it might be running into an edge case here.