문제

I'm using ServiceStack but I could not buy paid version of it, so I dont want to see newer version of it in my package update list.

I'm using TwitterBootstrap but our theme is compatible with 2.x version of TwitterBootstrap so I dont want to see 3.x version of it Bootstrap in my package update list.

So how can i prevent update notifications for specific packages in Nuget Package Manager

도움이 되었습니까?

해결책

You can use an allowedVersions constraint in your packages.config file for all the packages you want to fix to a particular version.

<package id="ServiceStack" version="3.9.60" targetFramework="net45" allowedVersions="[3.9.6]"/>

With the above in place the Manage Packages dialog will not show any updates for ServiceStack. You will need to add the allowedVersions attribute to all the service stack NuGet packages.

The Package Manager Console will show updates if you use

Get-Package -Updates

However it will not install anything due to the constraints:

Update-Package
Applying constraint 'ServiceStack (= 3.9.6)' defined in packages.config.
No updates available for 'ServiceStack' in project 'MyApp'.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top