How to get visual studio 2010 to install a NuGet Package - visual-studio-2010

I have a Visual Studio 2010 Solution Template.
When the user creates a solution using this template I want NuGet to get the latest version of that a package and install it.
The package is my own, shared on a network drive, maybe this is the issue.
I've looked at NuGet Restore and the Auto update feature but it still fails to get my package.

Here is a link to how to install packages via Visual Studio Template - http://docs.nuget.org/docs/reference/packages-in-visual-studio-templates.
Currently NuGet supports three package repositories, as discussed by the document. Your template can install a fixed version of NuGet packages; and the template consumer will need to update to the latest version themselves.

Related

NuGet TypeScript tooling:Why the added version of typescript compiler is still not available?

Context
I am using VS 2017.3. Just created an ASP MVC project, then added two nuget packages,
Microsoft.TypeScript.Compiler v2.5.3
Microsoft.TypeScript.MSBuild v2.5.3
When trying to configure the typescript build, I see that TypeScript version 2.5 is not available.
Question
What am I missing? I thought that adding those nuget packages will the project (and build) independent from the development machine state of installation...
What I've tried so far
Unloaded, reloaded the project
Exit VS,
restart VS Build the project
Why the added version of typescript compiler is still not available?
You need download and install the typescripts SDK version 2.5.3 from the download center and restarted Visual Studio.
The NuGet package of Microsoft.TypeScript.MSBuild is used for providing the TypeScript MSBuild task, and matching compiler version.
Starting with Visual Studio 2017, we could have multiple TypeScript versions installed and choose specific versions for each of your projects, after you install Microsoft.TypeScript.MSBuild package, you can choose specific versions for your project, for example, I have install several versions of the Typescripts SDKs on my machine:
Then I install that package to my ASP MVC project with the version 2.3, restart the Visual Studio, re-open project, on the Typescripts build tab, you will notice the matching version of Typescript 2.3 is selected by default:
Of course, you can manually select other version of Typescript.
The accepted answer is to the point, but perhaps some further explanation will prove helpful.
In Visual Studio 2017, the typescript compiler provided with the nuget package is only used by msbuild, but the TypeScript language service relies on a TypeScript SDK to be installed on the machine. Quoting from a github issue, "Currently, compile on save in VS requires a matching version of the TypeScript language service to be installed on the machine."
Although the question is tagged with Visual Studio 2017, it might be of interest that this will be amended with Visual Studio 2019. From the release notest of the release candidate: "The JavaScript/TypeScript language service will now be automatically loaded in projects that have the TypeScript NuGet package or npm package installed (TypeScript 3.2 and up is supported from the NuGet package and TypeScript 2.1 and up is supported from the npm package)."

What is the latest version of NuGet that works with Visual Studio 2012?

I am trying to add a nuget package (PiranhaCMS) to my VS2012/NET45 project. The nuget package itself depends on AutoMapper. When I try to install I get the message
'AutoMapper' already has a dependency defined for 'NETStandard.Library'
I'm confused because Piranha itself depends on NET45 not NETStandard. Research indicates I might need a later version of nuget. Having invoked nuget update -self on the nuget.exe in the .nuget folder under the solution, I tried again but got the same message.
What's further confusing me is nuget.exe is on 4.2.0.4168 but VS2012's Help, About dialog says the NuGet Package Manager is on 2.8.60318.667.
What I need to know is, can I get this package installed into this VS2012 solution? If so, how? If I can't do I need to move to VS017 so I can use a later version of NuGet which will install the package for me, even if the solution continues to target NET45?
can I get this package installed into this VS2012 solution? If so, how?
We could not get this package installed into this Visual Studio 2012. That because full NetStandard and NetCoreApp support for VS2013 (NuGet version is 2.12) and the latest version for Visual Studio 2012 is 2.8.6. so we will get that error when we install the package "PiranhaCMS" by Visual Studio 2012.
You can refer to the NuGet release note for 2.12 for detail info.
If I can't do I need to move to VS017 so I can use a later version of
NuGet which will install the package for me, even if the solution
continues to target NET45?
Yes, you can install that package to the solution continues to target NET45 on Visual Studio 2017.

Visual studio 2013 Premium - project templates packages versions

I am using Visual Studio 2013 Premium. When I create a new Web API project for example all packages are with old versions and need an update. Is there a way to set VS or NuGet maybe to create the new project with latest versions of the packages?
No, templates packaged in Visual Studio define which versions of the package that they want to pick. A template is not guaranteed to work with the latest updates, since newer packages could have breaking changes. Hence, the onus is on the developer to update the package as they see fit.

Install-Package : Unable to find package 'JSNLog'

I am trying to install JSNLog through Package Manager Console in Visual Studio 2010 as per the instructions given in http://www.jsnlog.com/Documentation/DownloadInstall but I am getting installation error...as below.
I am wondering that has something changed with the command ?? and also how can we restore the missing NuGet packages from the project solution -- I updated the NuGet version
Environment I have is
Visual Studio 2010 Professional and NuGet from https://www.nuget.org/api/v2/
Main Purpose of using JSNLog is to implement client side Logging in my project...
Any thoughts pelase...

Nuget Package install/update fails with error "Id is required" in Visual Studio 2010

I am using VS 2010. Want to install Sendgrid Nuget package.
So on package manage console I give following command.
PM> Install-Package Sendgrid
which gives error as follows:
Id is required.
Version is required.
Authors is required.
Description is required.
Even if try this from solution explorer, by adding package reference online, it gives same error.
How can I download this Sendgrid package?
I have faced similar issues on Visual Studio 2010 and later found that same pkg can be installed via Visual Studio 2012. Most probably you need to update your Nuget pkg manager in Visual Studio 2010.
Go to Tools -> Extension Manager -> Updates -> Update Nuget
In my case I had to update from version 1.0.11220.104 to 2.5.40416.9020.
Another thing I would like to point that you might face this error while trying to update Nuget.
"The signature on the update version of 'NuGet Package Manager' does not match the signature on the installed version."
In that case, uninstall Nuget, restart VS 2010 and install Nuget again. Source: http://docs.nuget.org/docs/reference/known-issues

Resources