Skip to content

Commit f434135

Browse files
authored
Merge pull request #4 from reisenberger/master
Upgrade to msbuild15, netstandard1.3
2 parents 38fe62b + 4d3b03c commit f434135

File tree

23 files changed

+179
-607
lines changed

23 files changed

+179
-607
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.2-alpha
2+
3+
- Upgrade to msbuild15 build process
4+
- Upgrade to Polly v5.3.1
5+
16
## 0.1-alpha
27

38
- Stub repo for Polly.Caching.MemoryCache with first build script

GitVersionConfig.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
next-version: 0.1-alpha
1+
next-version: 0.2.0-alpha

build.cake

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var snkFile = srcDir + File(keyName);
4545

4646
var projectToNugetFolderMap = new Dictionary<string, string[]>() {
4747
{ "Net45" , new [] {"net45"} },
48-
{ "NetStandard10", new [] {"netstandard1.0"} },
48+
{ "NetStandard13", new [] {"netstandard1.3"} },
4949
{ "Net40Async" , new [] {"net40"} },
5050
};
5151

@@ -134,11 +134,11 @@ Task("__UpdateDotNetStandardAssemblyVersionNumber")
134134
// NOTE: TEMPORARY fix only, while GitVersionTask does not support .Net Standard assemblies. See https://github.com/App-vNext/Polly/issues/176.
135135
// This build Task can be removed when GitVersionTask supports .Net Standard assemblies.
136136
var assemblySemVer = gitVersionOutput["AssemblySemVer"].ToString();
137-
Information("Updating NetStandard10 AssemblyVersion to {0}", assemblySemVer);
138-
var replacedFiles = ReplaceRegexInFiles("./src/Polly.Caching.MemoryCache.NetStandard10/Properties/AssemblyInfo.cs", "AssemblyVersion[(]\".*\"[)]", "AssemblyVersion(\"" + assemblySemVer +"\")");
137+
Information("Updating NetStandard1.3 AssemblyVersion to {0}", assemblySemVer);
138+
var replacedFiles = ReplaceRegexInFiles("./src/Polly.NetStandard13/Properties/AssemblyInfo.cs", "AssemblyVersion[(]\".*\"[)]", "AssemblyVersion(\"" + assemblySemVer +"\")");
139139
if (!replacedFiles.Any())
140140
{
141-
Information("NetStandard1.0 AssemblyVersion could not be updated.");
141+
Information("NetStandard1.3 AssemblyVersion could not be updated.");
142142
}
143143
});
144144

@@ -161,7 +161,7 @@ Task("__BuildSolutions")
161161
settings
162162
.SetConfiguration(configuration)
163163
.WithProperty("TreatWarningsAsErrors", "true")
164-
.UseToolVersion(MSBuildToolVersion.NET46)
164+
.UseToolVersion(MSBuildToolVersion.VS2017)
165165
.SetVerbosity(Verbosity.Minimal)
166166
.SetNodeReuse(false));
167167
}
@@ -170,20 +170,29 @@ Task("__BuildSolutions")
170170
Task("__RunTests")
171171
.Does(() =>
172172
{
173-
XUnit2("./src/**/bin/" + configuration + "/*.Specs.dll", new XUnit2Settings {
173+
XUnit2("./src/**/bin/" + configuration + "/**/*.Net4*.Specs.dll", new XUnit2Settings {
174174
OutputDirectory = testResultsDir,
175175
XmlReportV1 = true
176176
});
177177
});
178178

179+
Task("__RunDotnetTests")
180+
.Does(() =>
181+
{
182+
DotNetCoreTest("./src/Polly.Caching.MemoryCache.NetStandard13.Specs/Polly.Caching.MemoryCache.NetStandard13.Specs.csproj", new DotNetCoreTestSettings {
183+
Configuration = configuration,
184+
NoBuild = true
185+
});
186+
});
187+
179188
Task("__CopyOutputToNugetFolder")
180189
.Does(() =>
181190
{
182191
foreach(var project in projectToNugetFolderMap.Keys) {
183192
var sourceDir = srcDir + Directory(projectName + "." + project) + Directory("bin") + Directory(configuration);
184193

185194
foreach(var targetFolder in projectToNugetFolderMap[project]) {
186-
var destDir = buildDir + Directory("lib") + Directory(targetFolder);
195+
var destDir = buildDir + Directory("lib");
187196

188197
Information("Copying {0} -> {1}.", sourceDir, destDir);
189198
CopyDirectory(sourceDir, destDir);
@@ -258,6 +267,7 @@ Task("Build")
258267
.IsDependentOn("__UpdateAppVeyorBuildNumber")
259268
.IsDependentOn("__BuildSolutions")
260269
.IsDependentOn("__RunTests")
270+
.IsDependentOn("__RunDotnetTests")
261271
.IsDependentOn("__CopyOutputToNugetFolder")
262272
.IsDependentOn("__CreateNugetPackage")
263273
.IsDependentOn("__StronglySignAssemblies")
Lines changed: 21 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,48 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{65062661-9E19-4FC6-859C-8B7811553E13}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>Polly.Caching.MemoryCache.Net40Async.Specs</RootNamespace>
11-
<AssemblyName>Polly.Caching.MemoryCache.Net40Async.Specs</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<NuGetPackageImportStamp>
15-
</NuGetPackageImportStamp>
3+
<TargetFramework>net45</TargetFramework>
4+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
165
</PropertyGroup>
176
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18-
<DebugSymbols>true</DebugSymbols>
197
<DebugType>full</DebugType>
20-
<Optimize>false</Optimize>
21-
<OutputPath>bin\Debug\</OutputPath>
22-
<DefineConstants>TRACE;DEBUG</DefineConstants>
23-
<ErrorReport>prompt</ErrorReport>
24-
<WarningLevel>4</WarningLevel>
8+
<DefineConstants>DEBUG;TRACE;NET45</DefineConstants>
259
</PropertyGroup>
2610
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2711
<DebugType>pdbonly</DebugType>
2812
<Optimize>true</Optimize>
29-
<OutputPath>bin\Release\</OutputPath>
30-
<DefineConstants>TRACE</DefineConstants>
31-
<ErrorReport>prompt</ErrorReport>
32-
<WarningLevel>4</WarningLevel>
13+
<DefineConstants>TRACE;RELEASE;NET45</DefineConstants>
3314
</PropertyGroup>
3415
<ItemGroup>
35-
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
36-
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
37-
<Private>True</Private>
38-
</Reference>
39-
<Reference Include="Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
40-
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
41-
<Private>True</Private>
42-
</Reference>
43-
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop, Version=1.0.168.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
44-
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
45-
<Private>True</Private>
46-
</Reference>
47-
<Reference Include="Nito.AsyncEx, Version=3.0.1.0, Culture=neutral, processorArchitecture=MSIL">
48-
<HintPath>..\packages\Nito.AsyncEx.3.0.1\lib\net45\Nito.AsyncEx.dll</HintPath>
49-
<Private>True</Private>
50-
</Reference>
51-
<Reference Include="Nito.AsyncEx.Concurrent, Version=3.0.1.0, Culture=neutral, processorArchitecture=MSIL">
52-
<HintPath>..\packages\Nito.AsyncEx.3.0.1\lib\net45\Nito.AsyncEx.Concurrent.dll</HintPath>
53-
<Private>True</Private>
54-
</Reference>
55-
<Reference Include="Nito.AsyncEx.Enlightenment, Version=3.0.1.0, Culture=neutral, processorArchitecture=MSIL">
56-
<HintPath>..\packages\Nito.AsyncEx.3.0.1\lib\net45\Nito.AsyncEx.Enlightenment.dll</HintPath>
57-
<Private>True</Private>
58-
</Reference>
59-
<Reference Include="Polly.Net40Async, Version=5.0.6.0, Culture=neutral, processorArchitecture=MSIL">
60-
<HintPath>..\packages\Polly.Net40Async.5.0.6\lib\net40\Polly.Net40Async.dll</HintPath>
61-
<Private>True</Private>
62-
</Reference>
6316
<Reference Include="System" />
6417
<Reference Include="System.Core" />
65-
<Reference Include="System.Net" />
66-
<Reference Include="System.Xml.Linq" />
67-
<Reference Include="System.Data.DataSetExtensions" />
68-
<Reference Include="Microsoft.CSharp" />
6918
<Reference Include="System.Data" />
19+
<Reference Include="System.Data.DataSetExtensions" />
20+
<Reference Include="System.Net" />
7021
<Reference Include="System.Net.Http" />
7122
<Reference Include="System.Xml" />
72-
<Reference Include="FluentAssertions, Version=4.17.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
73-
<HintPath>..\packages\FluentAssertions.4.17.0\lib\net45\FluentAssertions.dll</HintPath>
74-
<Private>True</Private>
75-
</Reference>
76-
<Reference Include="FluentAssertions.Core, Version=4.17.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
77-
<HintPath>..\packages\FluentAssertions.4.17.0\lib\net45\FluentAssertions.Core.dll</HintPath>
78-
<Private>True</Private>
79-
</Reference>
80-
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
81-
<HintPath>..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
82-
<Private>True</Private>
83-
</Reference>
84-
<Reference Include="xunit.assert, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
85-
<HintPath>..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll</HintPath>
86-
<Private>True</Private>
87-
</Reference>
88-
<Reference Include="xunit.core, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
89-
<HintPath>..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll</HintPath>
90-
<Private>True</Private>
91-
</Reference>
92-
<Reference Include="xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
93-
<HintPath>..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll</HintPath>
94-
<Private>True</Private>
95-
</Reference>
23+
<Reference Include="System.Xml.Linq" />
24+
<Reference Include="Microsoft.CSharp" />
25+
</ItemGroup>
26+
<ItemGroup>
27+
<PackageReference Include="FluentAssertions" Version="4.17.0" />
28+
<PackageReference Include="GitVersionTask" Version="3.1.2" />
29+
<PackageReference Include="Microsoft.Bcl" Version="1.1.10" />
30+
<PackageReference Include="Microsoft.Bcl.Async" Version="1.0.168" />
31+
<PackageReference Include="Microsoft.Bcl.Build" Version="1.0.21" />
32+
<PackageReference Include="Polly.Net40Async" Version="5.3.1" />
33+
<PackageReference Include="xunit" Version="2.1.0" />
34+
<PackageReference Include="xunit.extensibility.execution" Version="2.1.0" />
9635
</ItemGroup>
9736
<ItemGroup>
9837
<Compile Include="..\GlobalAssemblyInfo.cs">
9938
<Link>Properties\GlobalAssemblyInfo.cs</Link>
10039
</Compile>
101-
<Compile Include="Properties\AssemblyInfo.cs" />
10240
</ItemGroup>
10341
<ItemGroup>
104-
<ProjectReference Include="..\Polly.Caching.MemoryCache.Net40Async\Polly.Caching.MemoryCache.Net40Async.csproj">
105-
<Project>{D6A676C2-982D-42D1-AD21-FA53582A1C31}</Project>
106-
<Name>Polly.Caching.MemoryCache.Net40Async</Name>
107-
</ProjectReference>
42+
<ProjectReference Include="..\Polly.Caching.MemoryCache.Net40Async\Polly.Caching.MemoryCache.Net40Async.csproj"/>
10843
</ItemGroup>
10944
<ItemGroup>
110-
<None Include="packages.config" />
45+
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
11146
</ItemGroup>
11247
<Import Project="..\Polly.Caching.MemoryCache.SharedSpecs\Polly.Caching.MemoryCache.SharedSpecs.projitems" Label="Shared" />
113-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
114-
<Import Project="..\packages\GitVersionTask.3.1.2\build\dotnet\GitVersionTask.targets" Condition="Exists('..\packages\GitVersionTask.3.1.2\build\dotnet\GitVersionTask.targets')" />
115-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
116-
<PropertyGroup>
117-
<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>
118-
</PropertyGroup>
119-
<Error Condition="!Exists('..\packages\GitVersionTask.3.1.2\build\dotnet\GitVersionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitVersionTask.3.1.2\build\dotnet\GitVersionTask.targets'))" />
120-
<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'))" />
121-
</Target>
122-
<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')" />
123-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
124-
Other similar extension points exist, see Microsoft.Common.targets.
125-
<Target Name="BeforeBuild">
126-
</Target>
127-
<Target Name="AfterBuild">
128-
</Target>
129-
-->
13048
</Project>

src/Polly.Caching.MemoryCache.Net40Async.Specs/packages.config

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)