target-framework

After updated Visual Studio 2019 to 16.4.0 I can't run tests with target framework 2.2

左心房为你撑大大i 提交于 2020-01-13 07:48:14
问题 I have updated Visual studio 2019 to version 16.4.0. This version includes .NET Core SDK 3.1.100. After that, I have tried to run some Unit Tests that I have on a project with Target Framework 2.2 but it's not being able to do so. It gives the following error: Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: It was not possible to find any compatible framework version The framework 'Microsoft.AspNetCore.App', version '2.2.0' was not

Why VS2012 project with referenced assembly can't target 4.0 automatically

纵饮孤独 提交于 2020-01-03 17:35:53
问题 In a Visual Studio 2012 C# console application, I downgrade ".NET Framework Target" from 4.5 to 4.0. Win 7 Pro with both Frameworks installed. I then reference an assembly, which, through warnings complains the following: The primary reference "System.Threading.Tasks.Dataflow, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=4.0.0.0,

Retrieve Target Framework Version and Target Framework Profile from a .Net Assembly

不打扰是莪最后的温柔 提交于 2019-12-20 11:52:58
问题 Is there any way that I can access the values that were used for TargetFrameworkVersion and/or TargetFrameworkProfile when a .Net assembly was compiled? The values I'm talking about are the ones contained the project file <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <OtherStuff> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client<

Retrieve Target Framework Version and Target Framework Profile from a .Net Assembly

孤街醉人 提交于 2019-12-20 11:52:19
问题 Is there any way that I can access the values that were used for TargetFrameworkVersion and/or TargetFrameworkProfile when a .Net assembly was compiled? The values I'm talking about are the ones contained the project file <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <OtherStuff> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client<

System.BadImageFormatException An attempt was made to load a program with an incorrect format

ε祈祈猫儿з 提交于 2019-12-17 10:38:34
问题 I'm writing a plug-in for another program that is based on a public .NET API. Typically these plugins are made by creating a class library DLL that references the API assembly. Then a command class is created by inheriting from a base command class in the API assembly. The application is then set to reference the plug-in DLL file, and is then also responsible for actually firing up the custom command class when the user requests it. However, now I'm trying to automate some code generation

Targeted .NET Framework version change

若如初见. 提交于 2019-12-13 19:06:38
问题 How do I go about changing the version for the targeted version of the .NET Framework from 4.5.1 to 4.5 in Visual Studio 2012? 回答1: You can usually select your desired target framework within the application properties. Your setup may be slightly different, my Visual Studio installation is using the C# development settings by default, and the example image below is from a WPF project (on the off chance yours is different). Either right-click on your project in the Solution Explorer and select

Do all intermediate target framework versions have to be specified in NuGet packages?

若如初见. 提交于 2019-12-12 00:09:15
问题 The NuGet documentation on enforced package conventions explains: NuGet copies assemblies from only a single library folder. For example, suppose a package has the following folder structure: \lib \Net20 \MyAssembly.dll (v1.0) \MyAssembly.Core.dll (v1.0) \Net40 \MyAssembly.dll (v2.0) When the package is installed in a project that targets the .NET Framework 4, MyAssembly.dll (v2.0) is the only assembly installed. MyAssembly.Core.dll (v1.0) is not installed. (One reason why NuGet behaves this

Error when changing to <TargetFrameworks> (plural) in .NET Core csproj file

流过昼夜 提交于 2019-12-11 03:35:13
问题 I was following a tutorial on Pluralsight about having an MSTest project target both .net core 2.2 AND .NET 4.7.2. This required going to my .csproj file for my test project and editing it so that the following: <PropertyGroup> <TargetFramework>netcoreapp2.2</TargetFramework> ... would change to become TargetFramework s (that's plural now) and then we add in the .NET 4.7.2 moniker, as follows: <PropertyGroup> <TargetFrameworks>netcoreapp2.2;net472</TargetFrameworks> ... As soon as I saved the

ASP.NET the targetframework attribute is not allowed

我的未来我决定 提交于 2019-12-11 02:08:07
问题 I have these lines in my web.config: <httpRuntime maxRequestLength="5120000" executionTimeout="54000" requestValidationMode="2.0" targetFramework="4.5"/> <compilation debug="true" strict="false" explicit="true" targetFramework="4.5"> But on the httpRuntime element I get the design time error the targetframework attribute is not allowed The strange thing is that this occurs on my local development machine and other sites on it work fine with these definitions in their respective web.config

Configuration Error related to targetFramework in web.config

陌路散爱 提交于 2019-12-03 06:32:53
问题 I have made an MVC website in Visual Studio 2015 and it works in my localhost. But when I published my website and put into my host, it doesn't work. It gives me this error notice: Server Error in '/' Application. Configuration Error Parser Error Message: The 'targetFramework' attribute in the element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, ''). The 'targetFramework' attribute currently references a version that is later than the