Anyname Donotcare Anyname Donotcare - 2 months ago 30
ASP.NET (C#) Question

File not found when creating a package

This the first time trying to create a Nuget package .

I try to run the following command :

nuget.exe pack Package.nuspec

But i get the following exception :

NuGet.exe : File not found: 'Site1.Master'. At line:1 char:10
+ nuget.exe <<<< pack Package.nuspec
+ CategoryInfo : NotSpecified: (File not found: 'Site1.Master'.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

The files section in
is like this :

<file src="Site1.Master" target="content\Site1.Master" />
<file src="Site1.Master.cs" target="content\Site1.Master.cs" />
<file src="Site1.Master.cs.designer" target="content\Site1.Master.cs.designer" />

My Sample Solution is like this :

enter image description here

The Directory :

enter image description here


Paths in a .nuspec file are always relative to the location of the .nuspec file itself. Either the file name is wrong, or the directory path is wrong.