diff options
author | Jan Kotas <jkotas@microsoft.com> | 2018-09-06 21:13:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-06 21:13:43 +0300 |
commit | 7266419e9c5d77a47050f30c6c9dac695c1c7191 (patch) | |
tree | 52c2b63bf26716ebda34a72a4e913418fc3e62b5 | |
parent | 0679531ee150ad79cf4f5e40f92d84d4b464f54f (diff) |
Update unit test projects to netstandard2.0 (#6295)
7 files changed, 21 insertions, 5 deletions
diff --git a/NuGet.config b/NuGet.config index 57feb087b..d93431bd1 100644 --- a/NuGet.config +++ b/NuGet.config @@ -2,6 +2,7 @@ <configuration> <packageSources> <clear/> + <add key="dotnetfeed" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" /> <add key="myget.org dotnet-buildtools" value="https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json" /> <add key="myget.org dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" /> <add key="myget.org dotnet-corefxlab" value="https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json" /> diff --git a/dir.targets b/dir.targets index 8d8b5e3f2..bb03d1d58 100644 --- a/dir.targets +++ b/dir.targets @@ -36,6 +36,21 @@ </PackageReference> </ItemGroup> + <!-- Set default references for netstandard2.0 --> + <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> + <NuGetTargetMoniker>.NETStandard,Version=v2.0</NuGetTargetMoniker> + <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier> + <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + </PropertyGroup> + <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> + <PackageReference Include="NETStandard.Library"> + <Version>2.0.3</Version> + </PackageReference> + </ItemGroup> + <ImportGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> + <Import Project="$(PackagesDir)netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('$(PackagesDir)netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets')" /> + </ImportGroup> + <!-- Set non-empty TargetFrameworkIdentifier to avoid defaulting to .NETPortable --> <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == ''"> <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier> diff --git a/src/ILCompiler.Compiler/tests/ILCompiler.Compiler.Tests.csproj b/src/ILCompiler.Compiler/tests/ILCompiler.Compiler.Tests.csproj index 6e2a7f7f4..765808b0b 100644 --- a/src/ILCompiler.Compiler/tests/ILCompiler.Compiler.Tests.csproj +++ b/src/ILCompiler.Compiler/tests/ILCompiler.Compiler.Tests.csproj @@ -4,7 +4,7 @@ <OutputType>Library</OutputType> <AssemblyName>ILCompiler.Compiler.Tests</AssemblyName> <RootNamespace>ILCompiler.Compiler.Tests</RootNamespace> - <TargetFramework>netstandard1.3</TargetFramework> + <TargetFramework>netstandard2.0</TargetFramework> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.DotNet.BuildTools.TestSuite"> diff --git a/src/ILCompiler.DependencyAnalysisFramework/tests/ILCompiler.DependencyAnalysisFramework.Tests.csproj b/src/ILCompiler.DependencyAnalysisFramework/tests/ILCompiler.DependencyAnalysisFramework.Tests.csproj index 37f6e2a40..895541c31 100644 --- a/src/ILCompiler.DependencyAnalysisFramework/tests/ILCompiler.DependencyAnalysisFramework.Tests.csproj +++ b/src/ILCompiler.DependencyAnalysisFramework/tests/ILCompiler.DependencyAnalysisFramework.Tests.csproj @@ -4,7 +4,7 @@ <OutputType>Library</OutputType> <AssemblyName>ILCompiler.DependencyAnalysisFramework.Tests</AssemblyName> <RootNamespace>ILCompiler.DependencyAnalysisFramework.Tests</RootNamespace> - <TargetFramework>netstandard1.3</TargetFramework> + <TargetFramework>netstandard2.0</TargetFramework> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\src\ILCompiler.DependencyAnalysisFramework.csproj" /> diff --git a/src/ILCompiler.MetadataTransform/tests/ILCompiler.MetadataTransform.Tests.csproj b/src/ILCompiler.MetadataTransform/tests/ILCompiler.MetadataTransform.Tests.csproj index 9de4e1df7..a577446e5 100644 --- a/src/ILCompiler.MetadataTransform/tests/ILCompiler.MetadataTransform.Tests.csproj +++ b/src/ILCompiler.MetadataTransform/tests/ILCompiler.MetadataTransform.Tests.csproj @@ -4,7 +4,7 @@ <OutputType>Library</OutputType> <AssemblyName>ILCompiler.MetadataTransform.Tests</AssemblyName> <RootNamespace>MetadataTransformTests</RootNamespace> - <TargetFramework>netstandard1.3</TargetFramework> + <TargetFramework>netstandard2.0</TargetFramework> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.DotNet.BuildTools.TestSuite"> diff --git a/src/ILCompiler.TypeSystem/tests/TypeSystem.Tests.csproj b/src/ILCompiler.TypeSystem/tests/TypeSystem.Tests.csproj index 3c4e78516..520d57c57 100644 --- a/src/ILCompiler.TypeSystem/tests/TypeSystem.Tests.csproj +++ b/src/ILCompiler.TypeSystem/tests/TypeSystem.Tests.csproj @@ -4,7 +4,7 @@ <OutputType>Library</OutputType> <AssemblyName>TypeSystem.Tests</AssemblyName> <RootNamespace>TypeSystem.Tests</RootNamespace> - <TargetFramework>netstandard1.3</TargetFramework> + <TargetFramework>netstandard2.0</TargetFramework> <!-- Don't warn if some dependencies were rolled forward --> <NoWarn>$(NoWarn);NU1603</NoWarn> </PropertyGroup> diff --git a/src/System.Private.Reflection.Metadata/tests/System.Private.Reflection.Metadata.Tests.csproj b/src/System.Private.Reflection.Metadata/tests/System.Private.Reflection.Metadata.Tests.csproj index 17e544899..153092dcd 100644 --- a/src/System.Private.Reflection.Metadata/tests/System.Private.Reflection.Metadata.Tests.csproj +++ b/src/System.Private.Reflection.Metadata/tests/System.Private.Reflection.Metadata.Tests.csproj @@ -6,7 +6,7 @@ <AssemblyName>System.Private.Reflection.Metadata.Tests</AssemblyName> <RootNamespace>System.Private.Reflection.Metadata.Tests</RootNamespace> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - <TargetFramework>netstandard1.3</TargetFramework> + <TargetFramework>netstandard2.0</TargetFramework> </PropertyGroup> <PropertyGroup> <NativeFormatCommonPath>..\..\Common\src\Internal\NativeFormat</NativeFormatCommonPath> |