From 4ef51765dcd501fb796fe83aa9feeb7d2d055340 Mon Sep 17 00:00:00 2001 From: Roman Semenov Date: Sat, 17 Sep 2016 17:05:21 +0300 Subject: [PATCH 1/3] Replaced MyApp with $(MSBuildProjectName) --- docs/using/visual-studio-packaging.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/docs/using/visual-studio-packaging.md b/docs/using/visual-studio-packaging.md index b57cad515..ffbd36fe3 100644 --- a/docs/using/visual-studio-packaging.md +++ b/docs/using/visual-studio-packaging.md @@ -10,7 +10,13 @@ Squirrel packaging can be easily integrated directly into your build process usi The first step is to define a build target in your `.csproj` file. ```xml - + + + + + + + ``` This will generate a NuGet package from .nuspec file setting version from AssemblyInfo.cs and place it in OutDir (by default bin\Release). Then it will generate release files from it. @@ -20,7 +26,23 @@ This will generate a NuGet package from .nuspec file setting version from Assemb Here is an example `MyApp.nuspec` file for the above build target example. ```xml - MyApp 0.0.0.0 title authors description false Copyright 2016 + + + + MyApp + + 0.0.0.0 + title + authors + description + false + Copyright 2016 + + + + + + ``` ## Additional Notes From 6fd5cbdbd5d81161fb9fb3a596729b5a05f1d247 Mon Sep 17 00:00:00 2001 From: Roman Semenov Date: Sat, 17 Sep 2016 17:28:23 +0300 Subject: [PATCH 2/3] Made Additional Notes more clear --- docs/using/visual-studio-packaging.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/docs/using/visual-studio-packaging.md b/docs/using/visual-studio-packaging.md index ffbd36fe3..7250ffd31 100644 --- a/docs/using/visual-studio-packaging.md +++ b/docs/using/visual-studio-packaging.md @@ -45,20 +45,18 @@ Here is an example `MyApp.nuspec` file for the above build target example. ``` -## Additional Notes - -Please be aware of the following when using this solution: +We use `nuget pack MyApp.nuspec -Version ...` instead of usual `nuget pack MyApp.csproj` to prevent it from including project dependencies into the package. -* Solution needs to have nuget.exe available which can be accomplished by installing `NuGet.CommandLine` package in your solution. +## Additional Notes - ~~~pm -PM> Install-Package NuGet.CommandLine - ~~~ -* It suffers from a bug when sometimes NuGet packages are not loaded properly and throws nuget/squirrel is not recogized (9009) errors. - **Tip:** In this case you may simply need to restart Visual Studio so the Package Manager Console will have loaded all the package tools -* If you get the following error you may need add the full path to squirrel.exe in the build target `Exec Command` call. `'squirrel' is not recognized as an internal or external command` +MSBuild needs to be able to find `nuget.exe` and `squirrel.exe` which can be accomplished in one of the following ways: +* Using full paths to exe files in your `Exec` commands +* Including paths to executables in your system PATH variable +* Visual Studio package manager can automatically find tool executables from installed NuGet packages and include them into local environment path. To do this: + * Install `NuGet.CommandLine` package in your solution to get nuget.exe: `PM> Install-Package NuGet.CommandLine` + * Open Package Manager Console window to scan solution for executable tools. You have to open this window each time you restart VS. Sometimes VS forgets paths to tools after some time due to a bug - in that case you need to restart VS. -**Source:** [Issue #630](https://github.com/Squirrel/Squirrel.Windows/issues/630) +If you get Error 9009: `'squirrel/nuget' is not recognized as an internal or external command` that means MSBuild can't find nuget.exe or squirrel.exe. --- | Return: [Packaging Tools](packaging-tools.md) | From 20191c4c4e2b74b732e8670e1f30969cc3b29273 Mon Sep 17 00:00:00 2001 From: Roman Semenov Date: Sun, 18 Sep 2016 00:58:44 +0300 Subject: [PATCH 3/3] small docs fix Reopening solution is enough --- docs/using/visual-studio-packaging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/using/visual-studio-packaging.md b/docs/using/visual-studio-packaging.md index 7250ffd31..50b47d9ab 100644 --- a/docs/using/visual-studio-packaging.md +++ b/docs/using/visual-studio-packaging.md @@ -54,7 +54,7 @@ MSBuild needs to be able to find `nuget.exe` and `squirrel.exe` which can be acc * Including paths to executables in your system PATH variable * Visual Studio package manager can automatically find tool executables from installed NuGet packages and include them into local environment path. To do this: * Install `NuGet.CommandLine` package in your solution to get nuget.exe: `PM> Install-Package NuGet.CommandLine` - * Open Package Manager Console window to scan solution for executable tools. You have to open this window each time you restart VS. Sometimes VS forgets paths to tools after some time due to a bug - in that case you need to restart VS. + * Open Package Manager Console window to scan solution for executable tools. You have to open this window each time you restart VS. Sometimes VS forgets paths to tools after some time due to a bug - in that case you need to reopen your solutuon. If you get Error 9009: `'squirrel/nuget' is not recognized as an internal or external command` that means MSBuild can't find nuget.exe or squirrel.exe.