I have a mixed environment where some developers are working on Visual Studio 2013, and others are working on 2015. Everything worked fine until we updated a referenced NuGet package from Visual Studio 2015.
Now, when trying to restore the NuGet packages from Visual Studio 2013, I see the following error:
NuGet Package restore failed for project Foo: The 'System.Linq 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60723.765'..
Apparently, there is no NuGet version 3.x for Visual Studio 2013.
Is there a solution to continue working with both Visual Studio 2013 and 2015?
Sigh, a team that can't make up their mind about what tools they use, what could possibly go wrong? Well this. And the other rather nasty problem, that package is meant for projects that target CoreCLR and the Win10 flavor of Universal apps. You cannot create nor build such a project on VS2013. So trying to solve the Nuget version problem doesn't buy you anything.
You guys need to get together and hammer-out what projects you are going to work on. If CoreCLR is what everybody wants to do, and do ask why, then everybody must update to VS2015.
As Hans Passant noted in his reply, there is no need for NuGet 3.0 on projects which are only targetting the vanilla .NET 4.5 framework (and that's what Visual Studio 2013 was meant to target in our case).
It was the addition of an updated NuGet package, specifically System.Collections.Immutable 1.1.37, which introduced a dependency on .NETPlatform,Version=v5.0, which in turn triggered the accidental dependency on NuGet 3.0.
Returning to version 1.1.36 of that package solved the issue.
Related
When I first open the solution in VS2017 and trying to build a project, I get many errors and warnings in the Error list window. The project I'm trying to build is from Github (https://github.com/KirillOsenkov/SourceBrowser). Visual studio is throwing the below error. The solution has .net core 2.1 and .net framework 4.7.2. Both are already installed in my machine too.
I'm not sure what fixed it for me, but I installed visual studio 2015 update 3 on my machine and also updated VS2019 and VS2017 and then built the solution again. Now it builds successfully in both VS2017 and VS2019. It looks like some other package or library that supports this also installed during the update process.
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)."
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.
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.
I have an inherited project in Visual Studio 2008 for which I need to create a build plan. Since the developer left no unit tests, I'm really, really hesitant to upgrade the project to VS 2010.
That said, my solution for NOT storing binaries in our source control mechanism (SVN) is to use a Nuget repository that I host. Ideally, what I would do is:
WITHOUT upgrading the VS 2008 project, remove the references and instead insert a *.pkg reference
Host the dlls in a NuGet Package on my local NuGet server
Let my Build rip so to speak.
Note that I have Visual Studio 2010 and NuGet installed - I just don't want to run the upgrade wizard. How could I go about doing this?
You can use Sharp Develop 4.1 to install packages in older solutions ( 2005/2008)
Sharp Develop doesn't change the version of Visual Studio.
website
I think Visual Studio 2010 has to be installed with the plugin, but you already did that :-)