简体   繁体   中英

How to target multiple .net frameworks for same build

I am trying to target multiple .net frameworks for the same output build (exe).

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{B4436616-28A2-4B98-9C39-3DA4AC95537E}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace></RootNamespace>
<AssemblyName></AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> 

My application works with 2.0 3.0 3.5 and I want to target all in my application.

Any idea?

Version Compatibility in the .NET Framework You should look on this. If you app not using some specific future of .net that are different for this version, you don't need 3 versions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM