■ 누겟 패키지 조건부 참조를 사용하는 방법을 보여준다.
▶ TestLibrary.csproj
1 2 3 4 5 6 7 8 9 10 |
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>netstandard2.1;net462;net35</TargetFrameworks> </PropertyGroup> <ItemGroup Condition="'$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'net35'"> <PackageReference Include="NAudio" Version="1.8.5" /> </ItemGroup> </Project> |