Cannot target .NET Framework 4.6.1 - visual-studio

I try to load an existing project (not mine) that I get from TFS and I got an error telling me that I need .NET Framework 4.6.1 to load it.
So I downgraded it to 4.6, successfully load it, install .NET Framework 4.6.1 but I can't make my project target on 4.6.1.
The link where I get .NET framework
I'm on Windows 7 and I use Visual Studio Community 2017.

You may need to install the developer pack. It looks like you may have just installed the runtime. You can find the .NET Framework 4.6.1 developer pack here.

Related

Setup project visual studio 2022

What can be the reason that install is greyed out?
Microsoft Istaller projects 2022 is installed. Solution can build without problems.
It's an old project where .net Framework 4.0 is used.
I'm just guessing, but it might be that .NET Framework 4.0 is deprecated and support was removed. You can't even install it via the Visual Studio Installer's Individual Components. The lowest 4.x targeting pack version I could install is 4.6.
Try installing the latest .NET Framework targeting pack and then re-target the project to use that.

Newly installed .NET version doesn't show up in target frameworks

I want do develop a console app for .NET Framework 4.72
I installed the .NET Framework 4.7.2 developer pack.
I restarted the system, opened Visual Studio to create a new project but the :NET Framework 4.7.2 doesn't show up in the target framework options.
What step am I missing?

.NET 5 not available in Visual Studio 2019

I have downloaded and installed .NET Core 5.0 SDK (v5.0.100-preview.1) in my Visual Studio 2019.
But it is not available in Target framework.
Am I missing something?
You need to install the latest preview of Visual Studio 2019 16.8, refer to
https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-5-preview-1/
You also need to explicitly enable preview versions within Visual Studio itself:
Then you should see it:
Specs: VS Version 16.8.0
Target Version of .Net Core: 5.0
You must have version 16.8.0 in order to have .Net Core 5.0
If you still have problems with Visual Studio not showing .Net Core 5.0 in Visual Studio version 16.8.0 (and assuming you downloaded the .NET Core 5.0 SDK for Visual Studio), well, apparently (and correct me if I'm wrong) it is now called just .Net 5.0, omitting the Core.
After selecting .NET 5.0, I was able to install other libraries which are currently version 5.0+ and dependent on .NET Core 5.0+
Is the new name intentional? Anyways, here some evidence of this working (I was able to install the newest version of Newtonsoft and Entity Framework for .Net Core):
Funny enough, when I try to create a new .Net Core project, the version shows up as expected:
I upgraded my version of Visual studio from 16.7.x to 16.8.1. I expected NET 5 to be listed as a target framework, but it was not.
I had previously created projects in 16.8 preview 6 using RC1.
Visual Studio Install did not list .NET 5 as an individual component either. I then downloaded and installed the x64 SDK. Still no luck. .NET5 was still missing as a target framework for VS 16.8.x
Today I opened VS Installer and from the More dropdown menu selected Repair . The repair process took 25-30 minutes to run, but now .NET Core 3.1 and .NET 5 are listed in all the usual places.
Norm
Maybe a bit late to the party.
Please note that if you've selected a 'regular' .NET Framework application you won't see the .NET 5.0 Framework option.
This is only visible in .NET Core project styles.
Try to set it in your .csproj file. Right click (maybe unload) and edit (within a PropertyGroup-element):
<TargetFramework>net5.0</TargetFramework>
Targeting .NET 5 (rc2) doesn't work smoothly in VS Version 16.8.0 Preview 6.0
I could only target .NET 5 by manually changing the .csproj file, and adding:
<TargetFramework>net5.0</TargetFramework>
When I wanted to create a solution, .NET 5 was not available, even when I have it installed. What I did to fix this was:
When you are creating the project, select the last version (in my case .NET Core 3.1)
When the project is created, right click on the project and select the Properties option.
In the Application tab, select the Target Framework you want.

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.

Framework 4.6.2 not available in Visual Studio 2015?

I'm currently using Visual Studio 2015 with framework version 4.6.1. I need to use TLS 1.2 with my app. From what I've read, TLS 1.2 is the default with framework version 4.6.2. But, that version isn't listed in visual studio:
VS 2015 Frameworks listed in my project properties
I downloaded the 4.6.2 installer, but when I try to install it, the installer indicates:
".NET Framework 4.6.2 or a later update is already installed on this computer."
So, my questions are:
1) Can framework 4.6.2 be used in VS 2015? (if so, what do I have to do?)
2) Can I use TLS 1.2 with the framework 4.6.1?
Appreciate any help!
You probably need to install the 4.6.2 SDK. It includes the reference assemblies for 4.6.2, which is what Visual Studio needs in order to target 4.6.2 for builds.
SDKs for all .NET versions (3.5+) are available from the .NET SDKs for Visual Studio page.

Resources