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 Package.nuspec
is like this :
<files>
<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" />
</files>
My Sample Solution is like this :
The Directory :
Restore packages manually using Visual Studio Enable package restore by choosing Tools > Options > NuGet Package Manager. Under Package Restore options, select Allow NuGet to download missing packages. In Solution Explorer, right click the solution and select Restore NuGet Packages.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With