File sources outside of Nuget project result in mangled content paths

Apr 6, 2012 at 3:04 PM

Hi all,

I'm running into an issue with Nuget 1.7.30402.9028. The solution has a number of projects, shared resources, and Nuget packages. Each Nuget package has an associated c# project with a nuspec and a post build event set up to create the package. One of the Nuget packages is primarily responsible for packaging shared assets. A large portion of the assets reside in a project outside of the Nuget project itself (same solution though). For example:


--> Project 1

--> Nuget package (sources content from Project 1)

The nuspec file for the package looks similar to the following:

    <file src="..\..\App.SampleProject.Configuration\obj\Debug\App.SampleProject.Configuration.dll" target="lib" />
    <file src="content\**\*.*" target="content"/>
    <file src="tools\**\*.*" target="tools"/>
    <file src="assets\*.*" target="Assets"/>
    <file src="..\..\App.SampleProject.Configuration\Config\**\*.*" target="Assets\Config"/>
    <file src="..\..\App.SampleProject.Configuration\App_Data\**\*.*" target="Assets\App_Data"/>

The last <file> element is intended to include any directories and files in the \Config folder of the App.SampleProject.Configuration project to the \Assets\Config folder in the package; same for the \App_Data folder. Unfortunately, what happens is that the resulting path in the package is garbled such that the following is inserted:




Yes, the "P" is missing from the second path. Anyone seen this before? Is my src element wrong? Any advice on how to eliminate the additional path structure?? I find it odd that it didn't even terminate on a dot, but rather, right in the middle of the project name.