Previously if a solution level NuGet package, such as Fake, was
installed then running the Uninstall-Package cmdlet would not find
the Fake NuGet package and report an error. Now if the NuGet package
is not found in the project's package repository then the solution's
package repository is checked.
Fix AutoMapper NuGet PowerShell scripts not being run.
A NuGet package can have install.ps1 and uninstall.ps1 PowerShell
scripts that target a particular framework based on the tools
subdirectory where they can be placed:
tools\net40\install.ps1
tools\net40\uninstall.ps1
Previously SharpDevelop would only look in the tools directory for
these scripts. Now it will use the project's target framework to find
the most compatible PowerShell install or uninstall script.
Note that NuGet does not support init.ps1 being target framework
specific and it will only be run if it exists in the tools directory
inside the NuGet package.
NuGet allows you to define a range of package versions that are
allowed in your project.
http://docs.nuget.org/docs/reference/versioning
This is done by editing the packages.config file and adding an
allowedVersions attribute for the installed package. For example,
the following restricts jQuery to be any version from 1.4 up to but
not including version 1.8.
<package
id="jQuery"
version="1.4.1"
targetFramework="net40"
allowedVersions="[1.4.1,1.8)" />
The NuGet addin now supports this information when updating the
package from the PowerShell console when using the Update-Package
cmdlet when no version is specified. With the above example when
updating jQuery the NuGet addin will now update to jQuery 1.7.2 and
not the latest 2.1.1 version. Previously it would update to the
latest version of the NuGet package.
Note that if you search for another NuGet package and install a later
version that is outside the allowed range it will still install. This
is the same behaviour as Visual Studio. The allowedVersions attribute
is to prevent you from accidentally updating the version but you can
explicitly pick a later NuGet package and update to it with the
Manage Packages dialog.
Run uninstall PowerShell scripts before the NuGet package is
removed so the jQuery uninstall.ps1 script can find the Scripts
folder in the project when uninstalling.