Skip to content

Commit f59705b

Browse files
Updates for build pipeline update (#11)
* Lots of build updates to catch up to the last 5 years. * Better 'clean'; Update to correct Authenticode
1 parent a38f522 commit f59705b

File tree

29 files changed

+244
-61
lines changed

29 files changed

+244
-61
lines changed

.nuget/NuGet.Config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<add key="disableSourceControlIntegration" value="true" />
55
</solution>
66
<packageSources>
7-
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
7+
<clear />
8+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
89
</packageSources>
910
</configuration>

.nuget/NuGet.exe

6.13 MB
Binary file not shown.

Microsoft.AspNet.OutputCache.sln

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.27130.2036
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.4.33213.308
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.OutputCache.OutputCacheModuleAsync", "src\OutputCacheModuleAsync\Microsoft.AspNet.OutputCache.OutputCacheModuleAsync.csproj", "{3B446E33-7B1C-4A32-AEB8-92DC6CE94F77}"
77
EndProject
@@ -19,6 +19,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.OutputCach
1919
EndProject
2020
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.OutputCache.CosmosDBTableAsyncOutputCacheProvider.Test", "test\Microsoft.AspNet.OutputCache.CosmosDBTableAsyncOutputCacheProvider.Test\Microsoft.AspNet.OutputCache.CosmosDBTableAsyncOutputCacheProvider.Test.csproj", "{107EF28E-05AA-485E-A5C1-9A20A6DFE877}"
2121
EndProject
22+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "packages", "packages", "{D7769596-DE12-4BA1-9BE6-67D4D3FEBB51}"
23+
EndProject
24+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Packages", "src\packages\Packages.csproj", "{7EC5863F-7FF1-41C7-A384-8FFF81531E7A}"
25+
EndProject
26+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{43F85F24-FF0F-4076-845C-863079AF3EC7}"
27+
ProjectSection(SolutionItems) = preProject
28+
docs\OutputCacheModuleAsync.md = docs\OutputCacheModuleAsync.md
29+
docs\CosmosDBTableAsyncOutputCacheProvider.md = docs\CosmosDBTableAsyncOutputCacheProvider.md
30+
Readme.md = Readme.md
31+
docs\SQLAsyncOutputCacheProvider.md = docs\SQLAsyncOutputCacheProvider.md
32+
EndProjectSection
33+
EndProject
2234
Global
2335
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2436
Debug|Any CPU = Debug|Any CPU
@@ -49,6 +61,10 @@ Global
4961
{107EF28E-05AA-485E-A5C1-9A20A6DFE877}.Debug|Any CPU.Build.0 = Debug|Any CPU
5062
{107EF28E-05AA-485E-A5C1-9A20A6DFE877}.Release|Any CPU.ActiveCfg = Release|Any CPU
5163
{107EF28E-05AA-485E-A5C1-9A20A6DFE877}.Release|Any CPU.Build.0 = Release|Any CPU
64+
{7EC5863F-7FF1-41C7-A384-8FFF81531E7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
65+
{7EC5863F-7FF1-41C7-A384-8FFF81531E7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
66+
{7EC5863F-7FF1-41C7-A384-8FFF81531E7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
67+
{7EC5863F-7FF1-41C7-A384-8FFF81531E7A}.Release|Any CPU.Build.0 = Release|Any CPU
5268
EndGlobalSection
5369
GlobalSection(SolutionProperties) = preSolution
5470
HideSolutionNode = FALSE
@@ -60,6 +76,7 @@ Global
6076
{B2C127BD-077B-4B9A-8163-F77DF76CE6A8} = {BCF9496E-D71E-4F4A-814B-B37830A87FF3}
6177
{9FDBB781-C469-4D9E-B687-4087CD422B13} = {D256C480-BB19-4239-AD53-DF634A794F41}
6278
{107EF28E-05AA-485E-A5C1-9A20A6DFE877} = {BCF9496E-D71E-4F4A-814B-B37830A87FF3}
79+
{7EC5863F-7FF1-41C7-A384-8FFF81531E7A} = {D7769596-DE12-4BA1-9BE6-67D4D3FEBB51}
6380
EndGlobalSection
6481
GlobalSection(ExtensibilityGlobals) = postSolution
6582
SolutionGuid = {51897B01-673A-47FD-87BC-8FD7C01950E6}

MicrosoftAspNetOutputCache.msbuild

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
11
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
23
<ItemGroup>
34
<AssemblyProject Include="src\OutputCacheModuleAsync\Microsoft.AspNet.OutputCache.OutputCacheModuleAsync.csproj" />
45
<AssemblyProject Include="src\SQLAsyncOutputCacheProvider\Microsoft.AspNet.OutputCache.SQLAsyncOutputCacheProvider.csproj" />
56
<AssemblyProject Include="src\CosmosDBTableAsyncOutputCacheProvider\Microsoft.AspNet.OutputCache.CosmosDBTableAsyncOutputCacheProvider.csproj" />
67
</ItemGroup>
8+
79
<ItemGroup>
810
<TestProject Include="test\Microsoft.AspNet.OutputCache.SQLAsyncOutputCacheProvider.Test\Microsoft.AspNet.OutputCache.SQLAsyncOutputCacheProvider.Test.csproj" />
911
<TestProject Include="test\Microsoft.AspNet.OutputCache.OutputCacheModuleAsync.Test\Microsoft.AspNet.OutputCache.OutputCacheModuleAsync.Test.csproj" />
1012
<TestProject Include="test\Microsoft.AspNet.OutputCache.CosmosDBTableAsyncOutputCacheProvider.Test\Microsoft.AspNet.OutputCache.CosmosDBTableAsyncOutputCacheProvider.Test.csproj" />
1113
</ItemGroup>
14+
1215
<ItemGroup>
1316
<PackageProject Include="src\Packages\Packages.csproj" />
1417
</ItemGroup>
15-
18+
1619
<Target Name="Build" DependsOnTargets="BuildAssemblies;UnitTest;BuildPackages" />
17-
<Target Name="Clean" DependsOnTargets="CleanPackages;CleanAssemblies" />
20+
<Target Name="Clean" DependsOnTargets="CleanPackages;CleanTests;CleanAssemblies" />
1821
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
19-
22+
2023
<Target Name="BuildAssemblies" DependsOnTargets="RestorePackages">
21-
<MSBuild Targets="Build" Projects="@(AssemblyProject);@(TestProject)" />
22-
</Target>
24+
<MSBuild Targets="Build" Projects="@(AssemblyProject)" />
25+
</Target>
26+
27+
<Target Name="BuildTests" DependsOnTargets="RestorePackages">
28+
<MSBuild Targets="Build" Projects="@(TestProject)" />
29+
</Target>
2330

2431
<Target Name="CleanAssemblies">
25-
<MSBuild Targets="Clean" Projects="Microsoft.AspNet.OutputCache.sln" />
32+
<MSBuild Targets="Clean" Projects="@(AssemblyProject)" />
2633
</Target>
2734

28-
<Target Name="RebuildAssemblies" DependsOnTargets="Clean;Build" />
35+
<Target Name="CleanTests">
36+
<MSBuild Targets="Clean" Projects="@(TestProject)" />
37+
</Target>
2938

3039
<!-- Packages build -->
3140

@@ -43,7 +52,7 @@
4352
<Exec Command=".nuget\NuGet.exe restore" />
4453
</Target>
4554

46-
<Target Name="UnitTest">
55+
<Target Name="UnitTest" DependsOnTargets="BuildTests">
4756
<MSBuild Targets="XunitTest" Projects="@(TestProject)" />
4857
</Target>
4958

Readme.md

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,13 @@ OutputCacheModule is ASP.NET’s default handler for storing the generated outpu
33

44
## How to build
55
1. Open a [VS developer command prompt](https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs)
6-
2. Run build.cmd. This will build Nuget package and run all the unit tests.
6+
2. Run build.cmd. This will build Nuget packages and run all the unit tests.
77
3. All the build artifacts will be under AspNetOutputCache\bin\Release\ folder.
88

99
## How to contribute
1010
Information on contributing to this repo is in the [Contributing Guide](CONTRIBUTING.md).
1111

12-
## Settings of the module and providers
13-
14-
#### Microsoft.AspNet.OutputCache.SQLAsyncOutputCacheProvider
15-
16-
The settings of this provider is located in the following configuration section in web.config.
17-
```
18-
<caching>
19-
<outputCache defaultProvider="SQLAsyncOutputCacheProvider">
20-
<providers>
21-
<add name="SQLAsyncOutputCacheProvider" connectionStringName="DefaultConnection" UseInMemoryTable="[true|false]"
22-
type="Microsoft.AspNet.OutputCache.SQLAsyncOutputCacheProvider.SQLAsyncOutputCacheProvider, Microsoft.AspNet.OutputCache.SQLAsyncOutputCacheProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
23-
</providers>
24-
</outputCache>
25-
</caching>
26-
```
27-
28-
1. *UseInMemoryTable* - Indicates whether to use Sql server 2016 In-Memory OLTP for the provider.
12+
## The Following Packages Are Built In This Repo
13+
* [OutputCacheModuleAsync](docs/OutputCacheModuleAsync.md)
14+
* [SQLAsyncOutputCacheProvider](docs/SQLAsyncOutputCacheProvider.md)
15+
* [CosmosDBTableAsyncOutputCacheProvider](docs/CosmosDBTableAsyncOutputCacheProvider.md)

build.cmd

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
@ECHO OFF
22

33
setlocal
4+
set EnableNuGetPackageRestore=true
45

5-
set logOptions=/flp:Summary;Verbosity=diag;LogFile=msbuild.log /flp1:warningsonly;logfile=msbuild.wrn /flp2:errorsonly;logfile=msbuild.err
6+
set MSBUILDEXE=msbuild.exe
67

7-
echo Please build from VS 2015(or newer version) Developer Command Prompt
8+
set cfgOption=/p:Configuration=Release
9+
REM set cfgOption=/p:Configuration=Debug
10+
REM set cfgOption=/p:Configuration=Debug;Release
11+
if not "%1"=="" set cfgOption=/p:Configuration=
812

9-
:BUILD
10-
msbuild "%~dp0MicrosoftAspNetOutputCache.msbuild" %logOptions% /v:m /maxcpucount /nodeReuse:false %*
13+
set logOptions=/v:n /flp:Summary;Verbosity=diag;LogFile=msbuild.log /flp1:warningsonly;logfile=msbuild.wrn /flp2:errorsonly;logfile=msbuild.err
14+
REM set logOptions=/v:diag /flp:Summary;Verbosity=diag;LogFile=msbuild.log /flp1:warningsonly;logfile=msbuild.wrn /flp2:errorsonly;logfile=msbuild.err
15+
16+
%MSBUILDEXE% "%~dp0\MicrosoftAspNetOutputCache.msbuild" /t:Build %logOptions% /maxcpucount /nodeReuse:false %cfgOption%%*
1117

1218
endlocal

clean.cmd

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@ECHO OFF
2+
3+
setlocal
4+
5+
set MSBUILDEXE=msbuild.exe
6+
7+
set cfgOption=/p:Configuration=Release
8+
REM set cfgOption=/p:Configuration=Debug
9+
REM set cfgOption=/p:Configuration=Debug;Release
10+
if not "%1"=="" set cfgOption=/p:Configuration=
11+
12+
set logOptions=/v:n /flp:Summary;Verbosity=diag;LogFile=msbuild.log /flp1:warningsonly;logfile=msbuild.wrn /flp2:errorsonly;logfile=msbuild.err
13+
REM set logOptions=/v:diag /flp:Summary;Verbosity=diag;LogFile=msbuild.log /flp1:warningsonly;logfile=msbuild.wrn /flp2:errorsonly;logfile=msbuild.err
14+
15+
%MSBUILDEXE% "%~dp0\MicrosoftAspNetOutputCache.msbuild" /t:Clean %logOptions% /maxcpucount /nodeReuse:false %cfgOption%%*
16+
del /F msbuild.log
17+
del /F msbuild.wrn
18+
del /F msbuild.err
19+
20+
endlocal
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# How to use the CosmosDB OutputCache Provider
2+
1. Target your application to 4.6.2+.
3+
4+
The OutputCacheProviderAsync interface was introduced in .NET Framework 4.6.2, therefore you need to target your application to .NET Framework 4.6.2 or above in order to use the Async OutputCache Module. Download the [.NET Framework 4.6.2 Developer Pack](https://www.microsoft.com/en-us/download/details.aspx?id=53321) if you do not have it installed yet and update your application’s web.config targetFrameworks attributes as demonstrated below:
5+
```xml
6+
<system.web>
7+
<compilation debug="true" targetFramework="4.6.2"/>
8+
<httpRuntime targetFramework="4.6.2"/>
9+
</system.web>
10+
```
11+
12+
2. Add the [Microsoft.AspNet.OutputCache.OutputCacheModuleAsync](https://www.nuget.org/packages/Microsoft.AspNet.OutputCache.OutputCacheModuleAsync/) NuGet package.
13+
3. Add the [Microsoft.AspNet.OutputCache.CosmosDBTableAsyncOutputCacheProvider](https://www.nuget.org/packages/Microsoft.AspNet.OutputCache.CosmosDBTableAsyncOutputCacheProvider/) NuGet package.
14+
15+
Use the NuGet package manager to install the Microsoft.AspNet.OutputCache.CosmosDBTableAsyncOutputCacheProvider packages. This will add a reference to Microsoft.AspNet.OutputCache.CosmosDBTableAsyncOutputCacheProvider.dll and add the following configuration into the web.config file.
16+
```xml
17+
<system.web>
18+
<caching>
19+
<outputCache defaultProvider="CosmosDBTableAsyncOutputCacheProvider">
20+
<providers>
21+
<add name="CosmosDBTableAsyncOutputCacheProvider" connectionStringName="StorageConnectionStringForOutputCacheProvider" tableName="[TableName]"
22+
type="Microsoft.AspNet.OutputCache.CosmosDBTableAsyncOutputCacheProvider.CosmosDBTableAsyncOutputCacheProvider, Microsoft.AspNet.OutputCache.CosmosDBTableAsyncOutputCacheProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
23+
</providers>
24+
</outputCache>
25+
</caching>
26+
</system.web>
27+
```
28+
29+
1. *TableName* - The name of the table to use for the provider.
30+
31+
Now your applications will start using Async OutputCache Module with the CosmosDB OutputCache Provider.

docs/OutputCacheModuleAsync.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# How to use the Async OutputCache Module
2+
1. Target your application to 4.6.2+.
3+
4+
The OutputCacheProviderAsync interface was introduced in .NET Framework 4.6.2, therefore you need to target your application to .NET Framework 4.6.2 or above in order to use the Async OutputCache Module. Download the [.NET Framework 4.6.2 Developer Pack](https://www.microsoft.com/en-us/download/details.aspx?id=53321) if you do not have it installed yet and update your application’s web.config targetFrameworks attributes as demonstrated below:
5+
```xml
6+
<system.web>
7+
<compilation debug="true" targetFramework="4.6.2"/>
8+
<httpRuntime targetFramework="4.6.2"/>
9+
</system.web>
10+
```
11+
12+
2. Add the [Microsoft.AspNet.OutputCache.OutputCacheModuleAsync](https://www.nuget.org/packages/Microsoft.AspNet.OutputCache.OutputCacheModuleAsync/) NuGet package.
13+
14+
Use the NuGet package manager to install the Microsoft.AspNet.OutputCache.OutputCacheModuleAsync package. This will add a reference to the Microsoft.AspNet.OutputCache.OutputCacheModuleAsync.dll and add the following configuration into the web.config file.
15+
```xml
16+
<system.webServer>
17+
<modules>
18+
<remove name="OutputCache"/>
19+
<add name="OutputCache" type="Microsoft.AspNet.OutputCache.OutputCacheModuleAsync, Microsoft.AspNet.OutputCache.OutputCacheModuleAsync" preCondition="integratedMode"/>
20+
</modules>
21+
</system.webServer>
22+
```
23+
24+
Now your applications will start using Async OutputCache Module. If no outputcacheprovider is specified in web.config, the module will use a default synchronous in-memory provider, with that you won’t get the async benefits. Please consider using one of the OutputCache providers that builds on this package, or [implement an async OutputCache Provider of your own](https://devblogs.microsoft.com/dotnet/introducing-the-asp-net-async-outputcache-module/#how-to-implement-an-async-outputcache-provider).

docs/SQLAsyncOutputCacheProvider.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# How to use the SQLAsync OutputCache Provider
2+
1. Target your application to 4.6.2+.
3+
4+
The OutputCacheProviderAsync interface was introduced in .NET Framework 4.6.2, therefore you need to target your application to .NET Framework 4.6.2 or above in order to use the Async OutputCache Module. Download the [.NET Framework 4.6.2 Developer Pack](https://www.microsoft.com/en-us/download/details.aspx?id=53321) if you do not have it installed yet and update your application’s web.config targetFrameworks attributes as demonstrated below:
5+
```xml
6+
<system.web>
7+
<compilation debug="true" targetFramework="4.6.2"/>
8+
<httpRuntime targetFramework="4.6.2"/>
9+
</system.web>
10+
```
11+
12+
2. Add the [Microsoft.AspNet.OutputCache.OutputCacheModuleAsync](https://www.nuget.org/packages/Microsoft.AspNet.OutputCache.OutputCacheModuleAsync/) NuGet package.
13+
3. Add the [Microsoft.AspNet.OutputCache.SQLAsyncOutputCacheProvider](https://www.nuget.org/packages/Microsoft.AspNet.OutputCache.SQLAsyncOutputCacheProvider/) NuGet package.
14+
15+
Use the NuGet package manager to install the Microsoft.AspNet.OutputCache.SQLAsyncOutputCacheProvider packages. This will add a reference to Microsoft.AspNet.OutputCache.SQLAsyncOutputCacheProvider.dll and add the following configuration into the web.config file.
16+
```xml
17+
<system.web>
18+
<caching>
19+
<outputCache defaultProvider="SQLAsyncOutputCacheProvider">
20+
<providers>
21+
<add name="SQLAsyncOutputCacheProvider" connectionStringName="DefaultConnection" UseInMemoryTable="[true|false]"
22+
type="Microsoft.AspNet.OutputCache.SQLAsyncOutputCacheProvider.SQLAsyncOutputCacheProvider, Microsoft.AspNet.OutputCache.SQLAsyncOutputCacheProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
23+
</providers>
24+
</outputCache>
25+
</caching>
26+
</system.web>
27+
```
28+
29+
1. *UseInMemoryTable* - Indicates whether to use Sql server 2016 In-Memory OLTP for the provider.
30+
31+
Now your applications will start using Async OutputCache Module with the SQLAsync OutputCache Provider.

0 commit comments

Comments
 (0)