We are finding that Visual Studio 2017 does NOT include Microsoft.Bcl.Build in its package for an Azure Cloud Service (.NET Framework 4.5) project. The same project built and packaged under Visual Studio 2015 does include Microsoft.Bcl.Build.
We determined if included or not when putting the package into production in Azure and the web roles reporting the missing dependency. This can also be seen by comparing the bin folders as well.
Why doesn't VS 2017 include it as it should?
Here is a pic of the nuget dependencies for the project(s).
The package Microsoft.WindowsAzure.Management.Sql is obsolete and had no releases since 2015. It's been replaced by Microsoft.Azure.Management.Sql which has none of these dependencies. You should upgrade to that package.
Note that the Bcl packages are dependencies of an old version of Microsoft.Azure.Common. That package doesn't require them in the current version either. If you can't upgrade to the latest Azure SQL Management package perhaps you should upgrade the Microsoft.Azure.Common package.
Neither VS 2015 nor VS 2017 will ever add Microsoft.Bcl or Microsoft.Bcl.Async. Those packages were created as a stop-gap measure back in 2012 to allow applications using C# 4 to use the async/await keywords. They added both the runtime and compiler extensions to understand the async/await keywords and generate the asynchronous state machine. Visual Studio 2012 itself was able to target C# 5 so it didn't need that package.
Those packages are only used by old libraries that haven't been upgraded to C# 5.
Related
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)."
Until now I only used Visual Studio for Business Intelligence development and now I have to do something in C# that uses Google Drive API which has to be installed through NuGet Package Manager. Unfortunately I don't see this particular package in Visual Studio Extensions and Update manager. I though it may be related to lack of Tools > NuGet Package Manager > Package Manager Console option in my VS, so I wanted to install package manager. I downloaded .vsix file, but when I try to install, it fails with message This extension is not installable on any current installed products. I got VS 2015, 2013 and 2010 installed.
So if I'm not able to install package manager, there is at least any way to install google drive api without involving NuGet?
Drive api package name: Google.Apis.Drive.v3
EDIT: I did reset all Visual Studio settings since it was set for Business Intelligence development, but this didn't help as well.
Please make sure your Visual Studio 2015 has installed the latest update. The latest version for Visual Studio 2015 should be version 14.0.25431.01.
If your Visual Studio 2015 is the latest version, please try repair your Visual Studio 2015 to check whether there has any installation issue.
And you also can install nuget packages without NuGet Package Manager. Please download the NuGet package and unzip it to local folder, which will list all content of this package. Then add the dlls in the unzipped folder into your project through Add Reference.
You do realize that SSDT and BIDS are for use with project types that are specific to SQL Server business intelligence. Business Intelligence Development Studio is the primary environment that you will use to develop business solutions that include Analysis Services, Integration Services, and Reporting Services projects.
To my knowledge you are not going to be able to install NuGet on it or use it to develop an actually C# application.
I am going to take a wild guess here and say you are trying to use google drive with a Script task. You can do this I did it a number of years ago. The set up is a bit weird. Your going to have to create a normal C# application in NORMAL visual studio with Nuget and it will install all of the Dlls for you at that time.
Now that you have all of the dlls. You are going to have to dump them in GAC and the folders that SSIS needs
C:\Program Files (x86)\Microsoft SQL Server\100\DTS\PipelineComponents
The 100 part changes depending upon which version of Sql server you are using
2005 = 90
2008 = 100
2014 = 110 (I think I cant remember)
Once the dlls are in the correct folders you should then be able to use it in a scripting task.
Note: I am not 100% sure any of this will even work anymore. When I did it the client library still supported .net 3.5. Now you need to be able to use .Net 4.5 I am not sure if the newer version of Sql server will be able to handle the higher level of .net dll or if they all require 3.5.
Checked with a coworker his guess is that Sql server 12+ should support .Net 4.5 dlls.
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 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.
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 :-)