Skip to content

Commit 15a3c70

Browse files
author
Cory Thompson
committed
Add missing dependencies to Test project
1 parent a02cfde commit 15a3c70

File tree

8 files changed

+102
-22
lines changed

8 files changed

+102
-22
lines changed

src/WebPush.csproj

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<TargetFrameworkProfile />
15+
<NuGetPackageImportStamp>
16+
</NuGetPackageImportStamp>
1517
</PropertyGroup>
1618
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1719
<DebugSymbols>true</DebugSymbols>
@@ -93,13 +95,16 @@
9395
</ItemGroup>
9496
<ItemGroup />
9597
<ItemGroup>
98+
<None Include="app.config" />
9699
<None Include="packages.config" />
97100
</ItemGroup>
98101
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
99-
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
100-
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
101-
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
102-
<Error Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
102+
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
103+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
104+
<PropertyGroup>
105+
<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>
106+
</PropertyGroup>
107+
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
103108
</Target>
104109
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
105110
Other similar extension points exist, see Microsoft.Common.targets.

src/app.config

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<runtime>
4+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5+
<dependentAssembly>
6+
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
7+
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
8+
</dependentAssembly>
9+
<dependentAssembly>
10+
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
11+
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
12+
</dependentAssembly>
13+
<dependentAssembly>
14+
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
15+
<bindingRedirect oldVersion="0.0.0.0-2.2.29.0" newVersion="2.2.29.0" />
16+
</dependentAssembly>
17+
</assemblyBinding>
18+
</runtime>
19+
</configuration>

src/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<package id="BouncyCastle" version="1.8.1" targetFramework="net40" />
44
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net40" />
55
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
6-
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
6+
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net40" />
77
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net40" />
88
<package id="Newtonsoft.Json" version="6.0.1" targetFramework="net40" />
99
</packages>

test/VapidHelperTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Collections.Generic;
33
using System.Linq;
44
using NUnit.Framework;
5-
using WebPush;
65
using WebPush.Util;
76

87
namespace WebPush.Test

test/WebPush.Test.csproj

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
<IsCodedUITest>False</IsCodedUITest>
1818
<TestProjectType>UnitTest</TestProjectType>
1919
<TargetFrameworkProfile />
20+
<NuGetPackageImportStamp>
21+
</NuGetPackageImportStamp>
2022
</PropertyGroup>
2123
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2224
<DebugSymbols>true</DebugSymbols>
@@ -38,26 +40,50 @@
3840
<ItemGroup>
3941
<Reference Include="BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
4042
<HintPath>..\packages\BouncyCastle.1.8.1\lib\BouncyCastle.Crypto.dll</HintPath>
41-
<Private>True</Private>
4243
</Reference>
43-
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
44-
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
45-
<Private>True</Private>
44+
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
45+
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
46+
</Reference>
47+
<Reference Include="Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
48+
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
49+
</Reference>
50+
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop, Version=1.0.168.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
51+
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
52+
</Reference>
53+
<Reference Include="nunit.framework, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
54+
<HintPath>..\packages\NUnit.3.6.1\lib\net40\nunit.framework.dll</HintPath>
4655
</Reference>
4756
<Reference Include="System" />
48-
<Reference Include="System.Net.Http" />
57+
<Reference Include="System.IO, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
58+
<HintPath>..\packages\Microsoft.Bcl.1.1.10\lib\net40\System.IO.dll</HintPath>
59+
</Reference>
60+
<Reference Include="System.Net" />
61+
<Reference Include="System.Net.Http, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
62+
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net40\System.Net.Http.dll</HintPath>
63+
</Reference>
64+
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
65+
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net40\System.Net.Http.Extensions.dll</HintPath>
66+
</Reference>
67+
<Reference Include="System.Net.Http.Primitives, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
68+
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net40\System.Net.Http.Primitives.dll</HintPath>
69+
</Reference>
70+
<Reference Include="System.Net.Http.WebRequest, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
71+
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net40\System.Net.Http.WebRequest.dll</HintPath>
72+
</Reference>
73+
<Reference Include="System.Runtime, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
74+
<HintPath>..\packages\Microsoft.Bcl.1.1.10\lib\net40\System.Runtime.dll</HintPath>
75+
</Reference>
76+
<Reference Include="System.Threading.Tasks, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
77+
<HintPath>..\packages\Microsoft.Bcl.1.1.10\lib\net40\System.Threading.Tasks.dll</HintPath>
78+
</Reference>
4979
</ItemGroup>
5080
<Choose>
5181
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
5282
<ItemGroup>
5383
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
5484
</ItemGroup>
5585
</When>
56-
<Otherwise>
57-
<ItemGroup>
58-
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" />
59-
</ItemGroup>
60-
</Otherwise>
86+
<Otherwise />
6187
</Choose>
6288
<ItemGroup>
6389
<Compile Include="ECKeyHelperTest.cs" />
@@ -67,15 +93,18 @@
6793
<Compile Include="VapidHelperTest.cs" />
6894
<Compile Include="WebPushClientTest.cs" />
6995
</ItemGroup>
96+
<ItemGroup>
97+
<None Include="app.config" />
98+
<None Include="packages.config">
99+
<SubType>Designer</SubType>
100+
</None>
101+
</ItemGroup>
70102
<ItemGroup>
71103
<ProjectReference Include="..\src\WebPush.csproj">
72104
<Project>{3cf6e7ef-b44d-48d7-8579-f28c593f2f47}</Project>
73105
<Name>WebPush</Name>
74106
</ProjectReference>
75107
</ItemGroup>
76-
<ItemGroup>
77-
<None Include="packages.config" />
78-
</ItemGroup>
79108
<Choose>
80109
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
81110
<ItemGroup>
@@ -96,6 +125,13 @@
96125
</Choose>
97126
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
98127
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
128+
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
129+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
130+
<PropertyGroup>
131+
<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>
132+
</PropertyGroup>
133+
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
134+
</Target>
99135
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
100136
Other similar extension points exist, see Microsoft.Common.targets.
101137
<Target Name="BeforeBuild">

test/WebPushClientTest.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Net.Http;
5-
using System.Text;
6-
using System.Threading.Tasks;
75
using NUnit.Framework;
86
using WebPush;
97

test/app.config

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<runtime>
4+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5+
<dependentAssembly>
6+
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
7+
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
8+
</dependentAssembly>
9+
<dependentAssembly>
10+
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
11+
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
12+
</dependentAssembly>
13+
<dependentAssembly>
14+
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
15+
<bindingRedirect oldVersion="0.0.0.0-2.2.29.0" newVersion="2.2.29.0" />
16+
</dependentAssembly>
17+
</assemblyBinding>
18+
</runtime>
19+
</configuration>

test/packages.config

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="BouncyCastle" version="1.8.1" targetFramework="net40" />
4-
<package id="NUnit" version="2.6.4" targetFramework="net40" />
4+
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net40" />
5+
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
6+
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net40" />
7+
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net40" />
8+
<package id="NUnit" version="3.6.1" targetFramework="net40" />
59
</packages>

0 commit comments

Comments
 (0)