--- lang: ja-jp breaks: true --- # MSBuild 複数のターゲットフレームワークを指定した条件を記述する 2022-07-29 > How to specify a '|net35|net40|net45|'.Contains($(TargetFramework)) condition for an ItemGroup (*.csproj)? > https://stackoverflow.com/questions/67526728/how-to-specify-a-net35net40net45-containstargetframework-condition-fo ```xml= <PropertyGroup> <DotNetFrameworks>|net35|net40|net403|net45|net451|net452|net472|net48|</DotNetFrameworks> </PropertyGroup> <ItemGroup Condition="$(DotNetFrameworks.Contains('|$(TargetFramework)|'))"> <Reference Include="System.ComponentModel.DataAnnotations" /> </ItemGroup> ``` ###### tags: `MSBuild` `複数のターゲットフレームワーク` `TargetFramework`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up