NET Framework Version compatibility for Visual Studio Package - visual-studio

I have a visual studio package which currently targets .NET Framework version 4.5 and works with Visual Studio versions from 2012 up to 2019.
If I upgrade to .NET Framework 4.7.2, what does this mean for compatibility with different versions of Visual Studio?
Will it automatically make the package incompatible with older versions of Visual Studio (e.g. 2012, 2013 and 2015)?

if you install a specific version of .net framework you can see that in your target framework.
you can use this address to see all the .net SDK for visual studio
https://dotnet.microsoft.com/download/visual-studio-sdks?utm_source=getdotnetsdk&utm_medium=referral
you must attention, if you want to using .NetCore in your project you must have a newer version of Visual Studio like 2017 or 2019.

An answer for those who doesn't need compatibility deeper than 2017
(But still ended up here from a search engine.)
Check system requirements.
For example, Visual Studio 2017 Product Family System Requirements says that:
Visual Studio requires .NET Framework 4.7.2 to run, and this will be
installed during setup.
This means that we can be 100% sure that it's safe to target 4.7.2 when targeting VS 2017.
P.S.: The reason I limit backward compatibility to 2017 is I don't see any mentions of .NET framework in the system requirements of older versions, so this method won't help with targeting older versions.

Related

Is .Net Framework 4.8 compatible with Visual Studio 2017

I am looking to see if there are any official mentions about .NET Framework 4.8 being compatible with Visual Studio 2017.
I can see that there is backwards compatibility between applications built with .Net Framework 4.8 to 4.5 as noted here but on the other side, looking at Visual Studio 2017 Support for .NET Development I don't see 4.8 being mentioned.
Installing it locally and checking, it looks like .Net Framework 4.8 is compatible to Visual Studio 2017, but I am still looking for a more official resource confirming that it is safe to use them together for development.
Yes, it's compatible.
Visual Studio 2017 was released before .NET Framework 4.8, so it makes sense that the original documentation of Visual Studio 2017 does not mention .NET Framework 4.8. In particular, the document you linked to mentions "05/31/2018" as its modification date, which is also before .NET Framework 4.8 was released (18 April 2019).
According to Microsoft's official "What's new in .NET Framework" page, .NET Framework 4.8 can be used in Visual Studio 2012 and higher:
You can target .NET Framework 4.8 in Visual Studio 2012 or later by installing the .NET Framework 4.8 Developer Pack.

Cannot target .NET Framework 4.7.2 in VS 2017 15.7.5

I have installed .NET Framework 4.7.2 from Microsoft's website. However, when I'm in Visual Studio 2017 (version 15.7.5 (currently the latest)) I cannot target Framework 4.7.2 even though it is installed on the computer. All other Frameworks are there.
When running the Visual Studio installer there is only the option to install up to 4.7.1.
Does VS 2017 15.7.5 literally not support targetting project to 4.7.2 yet or what might be going on here?
For developing with .NET Framework 4.7.2, the .NET Framework Dev Pack must be installed, not just the runtime.
Currently it can be found at Download .NET Framework 4.7.2, but that location is likely to change in future.

Use Visual Studio 2017 with .Net Core SDK 2.0

Can i open a core 2.0 project in Visual Studio 2017?
I've installed the latest dotnet-core (2.0.0-preview2-005840) and created a core 2.0 console-app.
mkdir dn2cli
cd dn2cli
dotnet new console
dotnet restore
Open console.csproj in Visual Studio 2017 with "open project"
Clean and Build Solutions
i get several erros
amongs others:
Unable to resolve 'Microsoft.NETCore.App (>= 2.0.0)' for '.NETCoreApp,Version=v2.0'.
So. Is it just not supported at the moment or am i missing something?
c:\Temp>dotnet --info
.NET Command Line Tools (2.0.0-preview2-005840)
Product Information: Version: 2.0.0-preview2-005840
Commit SHA-1 hash: 8f2fcef544
Runtime Environment: OS Name: Windows OS Version: 10.0.14393
OS Platform: Windows RID: win10-x86 Base Path: C:\Program
Files (x86)\dotnet\sdk\2.0.0-preview2-005840\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0-preview1-002061-00 Build :
2b70ec9c3b014af0c2a5f45de0e5b73a1ae51c09
Update:
There is now a VS 2017 15.3 preview that resolves this issue. Starting with VS 15.3, Visual Studio carries an MSBuild SDK resolver that determines which version of the CLI SDK a project would use (e.g. if a global.json sets the version) and uses it's MSBuild targets so new previews are picked up by VS.
Original:
You can modify your environment to get VS 2017 support for the unreleased 2.0 tooling by setting the MSBuildSdksPath as described in https://github.com/aspnet/Announcements/issues/231 so that VS picks up the build logic from the CLI.
The Visual Studio .NET Core tools were just released in March, yet the 2.0 preview you are using was released in April.
https://blogs.msdn.microsoft.com/dotnet/2017/03/07/announcing-net-core-tools-1-0/
You'll need to wait for an update to the .NET Core Tools before you can use Visual Studio with .NET Core 2.0
Visual Studio 2017 Version 15.3 Released and .NET Core 2.0 also Released with nuget v4.3 and the problem is resolved completely.
you can review all fixes Release notes
Landed on this today (April 2019) and it appears that now there is a version of .NET Core Tools SDK for VS 2017. Here's how you get to it:
1. browse to http://dot.net
2. Under .NET Core 2.2, look for "Download .NET Core SDK (Compatible with Visual Studio 2017"
3. Visual studio 2017 (I have version 15.9.11) should now list .NET Core 2.2 as a target framework

How do I build a Visual Studio Extension (VSIX) that targets Visual Studio 2010-2017

Our build environment is VS 2015 (ideally) targeting .net 4.0
We have just re-worked our visual studio plugins based on the Visual Studio extensibility project template in VS 2015. The resulting VSIX works great on VS 2015 & 2017 RC1.
However I would like to target the VSIX at VS 2010 (and ideally 2012). This is where the problems start....
VS 2010 uses .net 4.0.
I drop the compiler to .net 4.0
The VS 2015 (4.5) assemblies wont load (i.e. Microsoft.VisualStudio.Shell.14.0).
Thats OK as I don't use anything in them, so I drop the references to them in favour of the version 10.0 (2010) ones.
Great the code compiles.
But the VSIX package does not
1>C:\Program Files
(x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5):
warning MSB3274: The primary reference
"Microsoft.VisualStudio.Imaging, Version=14.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" could not
be resolved because it was built against the
".NETFramework,Version=v4.5" framework. This is a higher version than
the currently targeted framework ".NETFramework,Version=v4.0".
So the problem seems to be that if I target VS 2010 I need it to build as .net 4.0, but the VS 2015 build script requires .net 4.5.
I'm wondering if its possible to use the VS 2010 build tools in a VS 2015 project? Or must I convert my VS 2015 project back to VS 2010?
UPDATE
Starting to think this is not possible for other reasons...
https://learn.microsoft.com/en-us/visualstudio/extensibility/faq-2017
The new VSIX v3 format is backward compatible with VSIX v2, so you’ll
still be able to have a single VSIX with a single VSIX ID that
supports Visual Studio 2012 and later. The new VSIX v3 format does not
support Visual 2010 and earlier. To support Visual Studio 2010 onward,
you will need to create a separate extension (with a separate VSIX
ID).
I have ran into similar problem, so I have created a Nuget package called VsixUpdater, which can do the VSIX migration automatically if added to a VSIX project, it even works with older versions of Visual Studio (I tested it with 2012), after adding the package the generated VSIX packages will be V3 and 2017 compatible, see https://github.com/axodox/VsixUpdater for details.
Create a seperate project and VSIX for VS 2010 and another for VS 2012 and later. You can have a look at my source here: https://github.com/ErikEJ/SqlCeToolbox
Notice that I require .NET 4.5.1 for my VS 2010 extension also (simply requires that .NET 4.5.1 is present/installed on the PC, and it is built in to Windows 8.1 and later)
In the end I ended up with 2 projects
A project targeting VS 2010 compiled under .Net 4.0 using a version 2.0 manifest (built using VS 2015).
A project targeting VS 2012 + compiled under .Net 4.5
using a version 3.0 manifest (built using VS 2015).
There has been a certain amount of faffing around with references, but it all seems to work. Our only outstanding issue is the code signing, as VS 2015 will not accept anything below SHA256 and VS 2012 will not accept SHA256....

How to open InstallShield Limited Edition project in Visual Studio 2015?

I have a Visual Studio solution developed in VS 2013. The solution included a setup project bu InstalledShield Limited Edition. Visual Studio 2015 says the setup project is not compatible. I reinstalled InstallShield which didn't didn't help. I don't see anything on Flexera's site about InstallShield which works in VS 2015. Are there plans for one or does Microsoft now want us to use something else for installation projects?
While you could theoretically register the extension manually, as in our initial testing that's the minimum required to get ISLE 2013 up and running, we have now released ISLE 2015, so you should update. This release includes support for Windows 10, Visual Studio 2015, .NET 4.6 (including a fix for the 1001 error from installing .NET 4.6), and other enhancements and bug fixes since the 2013 release.

Resources