Questions tagged [.net-framework-version]

For questions specifically on how to deal with .Net versions. For other questions on .Net, please use a .net + version tag.

1070 questions
2876
votes
13 answers

What are the correct version numbers for C#?

What are the correct version numbers for C#? What came out when? Why can't I find any answers about C# 3.5? This question is primarily to aid those who are searching for an answer using an incorrect version number, e.g. C# 3.5. The hope is that…
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
286
votes
25 answers

You must add a reference to assembly 'netstandard, Version=2.0.0.0

The project is an ASP.NET MVC Web App targeting the .NET Framework 4.6.1. All of a sudden (some NuGet packages were upgraded) I started to get the following error during runtime: CS0012: The type 'System.Object' is defined in an assembly that is…
empz
  • 11,509
  • 16
  • 65
  • 106
280
votes
16 answers

Your project does not reference ".NETFramework,Version=v4.6.2" framework. Add a reference to ".NETFramework,Version=v4.6.2" in the "TargetFrameworks"

I can't run my unit tests. I have the next error: Your project does not reference ".NETFramework,Version=v4.6.2" framework. Add a reference to ".NETFramework,Version=v4.6.2" in the "TargetFrameworks" property of your project file and then…
177
votes
15 answers

Determine .NET Framework version for dll

I have an old dll that was compiled against the .NET framework and deployed. I am not sure which version of the .NET framework it was compiled against. I am wondering how I can determine which version of the .NET framework this dll was compiled…
mpenrow
  • 5,563
  • 9
  • 30
  • 36
156
votes
9 answers

Open .net framework 4.5 project in VS 2022. Is there any workaround?

Is there anyway to open and work on .net framework 4.5 project in visual studio 2022. May be problem is not with VS2022 but as .net framework 4.5 developer pack is not available any more .. my project can not be changed target version .. Is there…
Moumit
  • 8,314
  • 9
  • 55
  • 59
79
votes
3 answers

What version of .NET ships with what version of Windows?

Looking for a list of Windows versions (service packs included) and what version of .NET is natively1 available. Example: Windows A - .NET Framework Z Windows A Service Pack 1 - .NET Framework Z Windows A Service Pack 2 - .NET Framework Y 1 By…
Robert MacLean
  • 38,975
  • 25
  • 98
  • 152
74
votes
9 answers

Convert .Net Core to .Net Framework

I have a .Net Core project web project, and for various reasons want to convert it to a .Net Framework project. Is there an easy way to do this, or do I have to start again and import the code from the previous projects
Richard Watts
  • 954
  • 2
  • 8
  • 21
73
votes
4 answers

How do I set the .NET Framework Version when using New-WebAppPool?

I'm looking to see how I can use the IIS PowerShell Cmdlet New-WebAppPool to specify the version of the .NET Framework to use. Currently, it defaults to v2.0, however I am using MVC, and this will not work because that's a v4.0 feature. We really…
68
votes
1 answer

Why are three properties in DbParameterCollection abstract in reference assemblies but virtual otherwise?

I'm moving a project from project.json to the new-style csproj format, and it includes a class derived from DbParameterCollection. In my real project I'm using multi-targeting, but for the purposes of this question we only need to care about…
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
55
votes
4 answers

How can I change a .NET standard library to a .NET framework library?

I'm writing a class library for a simple parser in C#. When I first created it, I used .NET standard 2.0, but now I need to migrate it to .NET 4.6 both to conform to the other projects in my solution and in order to use NUnit. I tried to follow the…
Edward Minnix
  • 2,889
  • 1
  • 13
  • 26
48
votes
4 answers

How to find out which .NET framework nuget package targets?

I have C# project that has to target .NET 3.5. framework and I have several nuget packages I'd like to install in the given project. How to find out, for a given nuget package, which .NET framework versions it supports (by version of package for…
dragan.stepanovic
  • 2,955
  • 8
  • 37
  • 66
45
votes
8 answers

Error CS1056: Unexpected character '$' running the msbuild on a tfs continuous integration process

I have a project that the framework is targeting .NET Framework 4.6.1, as part of the continuous integration process on the tfs we created a Build Solution task to ensure that the code compiles correctly. Now the TFS server has the latest version of…
Heinrich
  • 806
  • 2
  • 11
  • 26
45
votes
10 answers

Could not load file or assembly System.Net.Http version 4.1.1.0

I'm porting a Net Framework 4 dll to Net Core. When porting my unit tests project I get an exception running some specific tests (not all). System.IO.FileLoadException: Could not load file or assembly 'System.Net.Http, Version=4.1.1.0,…
Jawen
  • 1,416
  • 1
  • 14
  • 26
44
votes
6 answers

Could not load file or assembly System.Runtime, Version=4.1.2.0

Suddenly, after adding some NuGet packages (mostly, related to ASPNET Identity), it started showing this error: FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.1.2.0, Culture=neutral,…
40
votes
6 answers

Proper localization of a WinForms application

I have a WinForms application which I want to translate into multiple languages. However, I do not have any experience with localizing a WinForms app, and I find very contradictory information about this subject. Basically, what I want is: In the…
Michael Stum
  • 177,530
  • 117
  • 400
  • 535
1
2 3
71 72