diff options
Diffstat (limited to 'dir.targets')
-rw-r--r-- | dir.targets | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/dir.targets b/dir.targets index aaf9c39c4..788a01823 100644 --- a/dir.targets +++ b/dir.targets @@ -17,9 +17,41 @@ <CLSCompliant Condition="'$(CLSCompliant)'==''">false</CLSCompliant> </PropertyGroup> - <!-- Setting IsTestProject prior to Build.Common.targets --> + <!-- Set default references for netstandard1.3 --> + <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.3'"> + <NuGetTargetMoniker>.NETStandard,Version=v1.3</NuGetTargetMoniker> + <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v1.3</TargetFrameworkVersion> + </PropertyGroup> + <ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'"> + <PackageReference Include="NETStandard.Library"> + <Version>1.6.1</Version> + </PackageReference> + </ItemGroup> + + <!-- Set default references for netcoreapp1.1 --> + <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp1.1'"> + <NuGetTargetMoniker>.NETCoreApp,Version=v1.1</NuGetTargetMoniker> + <!-- This tells VS that this is .NET Core app - uses .NET Core debugger, etc. --> + <TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v1.1</TargetFrameworkVersion> + <NoWarn>$(NoWarn);1701;1702</NoWarn> + <!-- Force .dll extension even if output type is exe. --> + <TargetExt>.dll</TargetExt> + </PropertyGroup> + <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp1.1'"> + <PackageReference Include="Microsoft.NETCore.App"> + <Version>1.1.2</Version> + </PackageReference> + </ItemGroup> + + <!-- Set non-empty TargetFrameworkIdentifier to avoid defaulting to .NETPortable --> + <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == ''"> + <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier> + </PropertyGroup> + <PropertyGroup> - <IsTestProject Condition="'$(IsTestProject)'=='' And $(MSBuildProjectName.EndsWith('.tests', StringComparison.OrdinalIgnoreCase))">true</IsTestProject> + <NugetRuntimeIdentifier Condition="'$(NugetRuntimeIdentifier)' == ''">$(RuntimeIdentifiers)</NugetRuntimeIdentifier> </PropertyGroup> <Import Project="$(ToolsDir)/Build.Common.targets" /> @@ -45,4 +77,5 @@ <!-- We set this property to avoid MSBuild errors regarding not setting TargetFrameworkProfile (see above line) --> <PortableNuGetMode>true</PortableNuGetMode> </PropertyGroup> + </Project> |