NuGet tips

Updated: 2015-07-09

Adding existing Nuget package to other project.

In a Visual Studio (VS) solution in \packages.config I had

<package id="log4net" version="1.2.10" targetFramework="net45" />

Now adding this same version (instead of latest) to another project in VS can be done from Package Manager Console:

PM> Install-Package log4net -Version 1.2.10 -ProjectName MySln.SomeOtherProject
'log4net 1.2.10' already installed.
Adding 'log4net 1.2.10' to MySln.SomeOtherProject.
Successfully added 'log4net 1.2.10' to MySln.SomeOtherProject.

Adding old DLL to GAC

At another time I wanted to install an old Enterprise Library, but the ones in the NuGet gallery was too new

Intead I chose to add to GAC, but even that is not easy anymore – the drag-n-drop has been barred. So back to a prompt

> "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft Enterprise Library 4.1 - October 2008\Bin\Microsoft.Practices.EnterpriseLibrary.Data.dll"


The End


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: