I can't upgrade my .NET to anything over 4.8 [closed] - c#

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 days ago.
Improve this question
I've installed multiple .NET SDKs from Microsoft site. They do not appear in Visual Studio when I want to change it. How do I fix this?
I've downloaded SDKs, Nugets, and nothing. I want to be able to use .net 7+ on a C# project.

Your project is a .NET Framework project (the "older" dot net). You'll not be able to select dotnet 5+ directly in the visual studio project's properties as dotnet net 5+ is the evolution of the dotnet core branch. Those versions will not appear at all.
You can create a new dotnet core project and import your code (and adapt if necessary), or use the tool microsoft released to "upgrade" a .NET Framework project to dotnet core one. (https://dotnet.microsoft.com/en-us/platform/upgrade-assistant)
You'll then be able to select any dotnet core framework you want (ie 7.0)

If your project is targeting .Net framework 4.8, you can't simply upgrade to .Net 7 by selecting from a list,
You need to migrate your project to .Net 7,
A very useful tool is the .Net upgrade assistant provided by Microsoft.
You can find it here:
https://dotnet.microsoft.com/en-us/platform/upgrade-assistant/tutorial/install-sdk
and follow the step-by-step instructions in that page to complete your migration.

Try installing everything related to .NET using the Visual Studio Installer - https://visualstudio.microsoft.com/downloads
In order to be able to create .NET 7 application, you will need to select ".NET 7 Runtime" under the "Individual components" section.
After the installation, you should be able to select ".NET 7" as your application Framework.

Related

Nuget Package not installing in framework 4.6.1 VS 2017 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
Error Could not install package 'Microsoft.EntityFrameworkCore 5.0.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
Installing in Visual Studio 2017
Microsoft.EntityFrameworkCore targets .NET Standard 2.1, which basically means it will only work on .NET Core 3.1 or above; .NET Framework (any version) does not support .NET Standard 2.1; some versions of .NET Framework support .NET Standard 2.0 (at least, sort-of), but that isn't enough.
Two options:
move away from .NET Framework (hugely preferred option) - ideally to .NET 5.0 or .NET Core 3.1 (at time of writing)
use an older version of Entity Framework; EF 6.4.4 works down to .NET 4.0, or (as noted by Hostel in comments) EF Core 3.1.10 may work on .NET Framework 4.6.1

Problems with using .NET 5 [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
I wanted to play with new features of .NET and C#.
In order to do that, I downloaded newest .NET SDK and .NET runtime and installed it successfully.
Then I tried to create app with new features and failed, as I couldn't set target framework to .NET 5.
So I googled for that and found that I need to enable "using previews of .NET SDKs" in Visual Studio's Tools (Preiview Features tab).
After that, when I created console project, it set my target framework to .NET 5.0, I got this section in my csproj:
<TargetFramework>net5.0</TargetFramework>
Now, when I try to build, I get this error:
The reference assemblies for .NETFramework,Version=v5.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
I tried to search anything about this, but I just run into the same articles suggesting enabling using preivew of .NET Core SDKs.
Also, my VS version is VS Studio Professional 16.7.6 (as far as I remember, other suggestions were about updateing VS to 16.6 or newer).
In terms of development with Visual Studio, .NET 5 requires VS 2019 16.8 or later. I'm using it with .NET 5 without problems.

What is the stable and latest version of .Net Framework we can use in WPF Application? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I want to upgrade my live WPF Application's .Net Framework.
Which is the stable and latest version in .Net Framework ?
Thanks in advance!!!
As of right now, the latest version of the full .NET framework is version 4.7.2. You can find the latest SDK and runtime downloads here on the Microsoft download website and install what you need.
I think that it is a nice iniciative of you to upgrade the .Net of your WPF Application.
Right now, as 20 June,2018, it is .NET Framework 4.7.2 and it can be downloaded at
https://www.microsoft.com/net/download/windows
This month they released .NET Framework 4.8 Early Access build 3621
https://blogs.msdn.microsoft.com/dotnet/2018/06/06/announcing-net-framework-4-8-early-access-build-3621/
Also it was announced earlier that .Net Core 3 will support for Windows Desktop, namely: WPF, Windows Forms and UWP
https://blogs.msdn.microsoft.com/dotnet/2018/05/07/net-core-3-and-support-for-windows-desktop-applications/
Note: To do this upgrade, on my projects, on the most cases it was just a matter of installing the newest Net Framework SDK, set the target in Project settings and rebuild the App in Visual Studio 2017.

I'm trying to install this package but i can't! Xunit.Microsoft.VisualStudio.TestTools.UnitTesting [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Please i want Install Unit Test
'Xunit.Microsoft.VisualStudio.TestTools.UnitTesting 1.0.0-beta-1011'. You are attempting to install this package in a project that has '. NETFramework, Version = v4. 5 1' as a destination, but the package does not contain assembly references or content files that are compatible with that framework. For more information, please contact the author of the package. 0
The dll you are trying to add, Xunit.Microsoft.VisualStudio.TestTools.UnitTesting, doesn't match the target framework of your project.
Specifically, the DLL you are trying to add is a beta version needing .NET framework 4.6, and you project is currently .NET 4.5.1.
You could either change the target framework of your project, or look for a matching dll.
To see/change, target framework of your project:
Right click project's name
Click on "Properties"
There you will see "Target framework" dropdown (under Application tab, that should be open by default)
See: https://xunit.github.io/docs/getting-started-desktop.html#add-xunit-ref
As a side note, if you are experiencing the following error, after changing your target framework to 4.6:
Install-Package : 'NETStandard.Library' already has a dependency defined..., try updating your nuget installation.

The C# project is targeting ".Net Framework, Version =v4.5",which is not installed on this machine [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am working on a C# project using VS 2012 installed on windows 8 this afternoon. It works well and I upload my code to TFS before I left for home.
But when I download and open this project using VS 2012 installed on windows 7. I got the error message below.
The C# project is targeting ".Net Framework, Version =v4.5",which is
not installed on this machine. To proceed, select an option below.
Change the target to .Net Framework 4.5. You can change back to ".Net Framework, Version=v4.5" at later time.
Download the targeting pack for ".Net Framework, Version=v4.5". The project will not change.
Do not load the project.
I am sure I have installed .Net Framework 4.5 on my windows 7 laptop.
Now, I cannot load my project. Any one knows how to solve this problem?
Many thanks!
--------------- updates--------
For people who have the same problem:
I uninstalled VS 2012 and .Net Framework 4.5 and re install both of them. The problem is solved. Now I can load my project.
Right-click your project and click in "Properties". In the tab "Application" see if you have the option for the 4.5 framework in the "Target Framework" dropdown list. If you have it, just select it and try to build your project again.
If you don't have this option, go to "Programs and Features" in Windows 7 and make sure you have .NET Framework 4.5 installed. If you have it, then try repairing your installation of VS 2012 in this same menu and verify again your options in the "Target Framework" dropdown list.

Categories