Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to create nuspec file in specific folder?

I tried to create .nuspec file in a different folder by giving path but it is giving me error

Nuget.exe spec ..\MYDEMOFOLDER
Nuget.exe pack ..\MYDEMOFOLDER\MYPROJECT.csproj
pause

want to create MYPROJECT.nuspec in ..\MYDEMOFOLDER folder location

getting error to create nuspec file 
The package ID '..\MYDEMOFOLDER' contains invalid characters. Examples of valid package IDs in
clude 'MyPackage' and 'MyPackage.Sample'.
like image 222
Neo Avatar asked Jun 18 '15 07:06

Neo


1 Answers

Unfortunately nuget.exe spec doesn't work like that. It expects a package ID.

If you need to create a nuspec in a given folder, you will need to change to that directory.

pushd ..\MYDEMOFOLDER          // switch to new directory (remember current)
nuget spec MYPROJECT           // create MYPROJECT.nuspec file
nuget pack MYPROJECT.csproj    // pack MYPROJECT.csproj
popd                           // return to previous directory

NOTE: If you're going to pack a project file, you don't need to create a nuspec file, as nuget will create one automatically.

like image 148
Kiliman Avatar answered Sep 28 '22 18:09

Kiliman