Skip to content

Commit ea33565

Browse files
committed
Support for run test in VS2017 version 15.7.x
1 parent 46e553c commit ea33565

File tree

5 files changed

+48
-7
lines changed

5 files changed

+48
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,4 @@ Generated_Code #added for RIA/Silverlight projects
106106
_UpgradeReport_Files/
107107
Backup*/
108108
UpgradeLog*.XML
109+
.vs/

test/WebApi.OutputCache.Core.Tests/WebApi.OutputCache.Core.Tests.csproj

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\..\packages\NUnit.3.10.1\build\NUnit.props" Condition="Exists('..\..\packages\NUnit.3.10.1\build\NUnit.props')" />
4+
<Import Project="..\..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props')" />
35
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
46
<PropertyGroup>
57
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -13,6 +15,8 @@
1315
<FileAlignment>512</FileAlignment>
1416
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
1517
<RestorePackages>true</RestorePackages>
18+
<NuGetPackageImportStamp>
19+
</NuGetPackageImportStamp>
1620
</PropertyGroup>
1721
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1822
<DebugSymbols>true</DebugSymbols>
@@ -32,8 +36,8 @@
3236
<WarningLevel>4</WarningLevel>
3337
</PropertyGroup>
3438
<ItemGroup>
35-
<Reference Include="nunit.framework">
36-
<HintPath>..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
39+
<Reference Include="nunit.framework, Version=3.10.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
40+
<HintPath>..\..\packages\NUnit.3.10.1\lib\net45\nunit.framework.dll</HintPath>
3741
</Reference>
3842
<Reference Include="System" />
3943
<Reference Include="System.Core" />
@@ -58,6 +62,13 @@
5862
</ItemGroup>
5963
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
6064
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
65+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
66+
<PropertyGroup>
67+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
68+
</PropertyGroup>
69+
<Error Condition="!Exists('..\..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props'))" />
70+
<Error Condition="!Exists('..\..\packages\NUnit.3.10.1\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\NUnit.3.10.1\build\NUnit.props'))" />
71+
</Target>
6172
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
6273
Other similar extension points exist, see Microsoft.Common.targets.
6374
<Target Name="BeforeBuild">
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="NUnit" version="2.6.3" targetFramework="net45" />
3+
<package id="NUnit" version="3.10.1" targetFramework="net45" />
4+
<package id="NUnit3TestAdapter" version="3.10.0" targetFramework="net45" />
45
</packages>

test/WebApi.OutputCache.V2.Tests/WebApi.OutputCache.V2.Tests.csproj

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\..\packages\NUnit.3.10.1\build\NUnit.props" Condition="Exists('..\..\packages\NUnit.3.10.1\build\NUnit.props')" />
4+
<Import Project="..\..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props')" />
35
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
46
<PropertyGroup>
57
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -14,6 +16,8 @@
1416
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
1517
<RestorePackages>true</RestorePackages>
1618
<TargetFrameworkProfile />
19+
<NuGetPackageImportStamp>
20+
</NuGetPackageImportStamp>
1721
</PropertyGroup>
1822
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1923
<DebugSymbols>true</DebugSymbols>
@@ -50,9 +54,24 @@
5054
<HintPath>..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
5155
<Private>True</Private>
5256
</Reference>
53-
<Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
54-
<SpecificVersion>False</SpecificVersion>
55-
<HintPath>..\..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
57+
<Reference Include="nunit.core, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
58+
<HintPath>..\..\packages\NUnitTestAdapter.WithFramework.2.0.0\lib\nunit.core.dll</HintPath>
59+
<Private>False</Private>
60+
</Reference>
61+
<Reference Include="nunit.core.interfaces, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
62+
<HintPath>..\..\packages\NUnitTestAdapter.WithFramework.2.0.0\lib\nunit.core.interfaces.dll</HintPath>
63+
<Private>False</Private>
64+
</Reference>
65+
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
66+
<HintPath>..\..\packages\NUnitTestAdapter.WithFramework.2.0.0\lib\nunit.framework.dll</HintPath>
67+
</Reference>
68+
<Reference Include="nunit.util, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
69+
<HintPath>..\..\packages\NUnitTestAdapter.WithFramework.2.0.0\lib\nunit.util.dll</HintPath>
70+
<Private>False</Private>
71+
</Reference>
72+
<Reference Include="NUnit.VisualStudio.TestAdapter, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac, processorArchitecture=MSIL">
73+
<HintPath>..\..\packages\NUnitTestAdapter.WithFramework.2.0.0\lib\NUnit.VisualStudio.TestAdapter.dll</HintPath>
74+
<Private>False</Private>
5675
</Reference>
5776
<Reference Include="System" />
5877
<Reference Include="System.Core" />
@@ -122,6 +141,13 @@
122141
</ItemGroup>
123142
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
124143
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
144+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
145+
<PropertyGroup>
146+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
147+
</PropertyGroup>
148+
<Error Condition="!Exists('..\..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\NUnit3TestAdapter.3.10.0\build\net35\NUnit3TestAdapter.props'))" />
149+
<Error Condition="!Exists('..\..\packages\NUnit.3.10.1\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\NUnit.3.10.1\build\NUnit.props'))" />
150+
</Target>
125151
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
126152
Other similar extension points exist, see Microsoft.Common.targets.
127153
<Target Name="BeforeBuild">

test/WebApi.OutputCache.V2.Tests/packages.config

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" userInstalled="true" />
77
<package id="Moq" version="4.0.10827" targetFramework="net45" userInstalled="true" />
88
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" userInstalled="true" />
9-
<package id="NUnit" version="2.6.2" targetFramework="net45" userInstalled="true" />
9+
<package id="NUnit" version="3.10.1" targetFramework="net45" userInstalled="true" />
10+
<package id="NUnit3TestAdapter" version="3.10.0" targetFramework="net45" />
11+
<package id="NUnitTestAdapter.WithFramework" version="2.0.0" targetFramework="net45" />
1012
</packages>

0 commit comments

Comments
 (0)