Skip to content

Commit 1b09409

Browse files
authored
Merge pull request #13 from tompazourek/feature/dependency-update
Update packages and .NET to 4.8
2 parents 057cdd4 + 7cad42c commit 1b09409

File tree

6 files changed

+62
-68
lines changed

6 files changed

+62
-68
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image: Visual Studio 2019
1+
image: Visual Studio 2022
22

33
# Adds "+build.XXX" to MinVer's build metadata
44
environment:

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,34 @@ The library is also [published on NuGet.org](https://www.nuget.org/packages/Razo
2020
PM> Install-Package RazorHtmlMinifier.Mvc5
2121
```
2222

23-
<sup>RazorHtmlMinifier.Mvc5 is built for .NET v4.5 with a dependency on ASP.NET MVC 5.2.3 and `System.Web`.</sup>
23+
<sup>RazorHtmlMinifier.Mvc5 is built for .NET v4.8 with a dependency on ASP.NET MVC 5.2.7 and `System.Web`.</sup>
2424

2525
### Configuration
2626

2727
Find the **Web.config** with your Razor configuration (by default it's in `Views/Web.config`). You should see something like this inside:
2828

2929
```xml
30-
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
30+
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
3131
```
3232

3333
In order to start minifying views and partial views, replace it with (after the NuGet package is installed):
3434

3535
```xml
36-
<host factoryType="RazorHtmlMinifier.Mvc5.MinifyingMvcWebRazorHostFactory, RazorHtmlMinifier.Mvc5, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a517a17e203fcde4" />
36+
<host factoryType="RazorHtmlMinifier.Mvc5.MinifyingMvcWebRazorHostFactory, RazorHtmlMinifier.Mvc5, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a517a17e203fcde4" />
3737
```
3838

3939
Then rebuild your solution, which should also restart the app.
4040

4141
If you're using Razor `@helper` functions placed inside the `App_Code` folder, you have to do additional configuration in order to minify those. In the root `Web.config`, you should see something like this:
4242

4343
```xml
44-
<compilation debug="true" targetFramework="4.7.2" />
44+
<compilation debug="true" targetFramework="4.8" />
4545
```
4646

4747
Your `<compilation>` element might have different attributes. Leave the current attributes as-is, and add `<buildProviders>` like so:
4848

4949
```xml
50-
<compilation debug="true" targetFramework="4.7.2">
50+
<compilation debug="true" targetFramework="4.8">
5151
<buildProviders>
5252
<add extension=".cshtml" type="RazorHtmlMinifier.Mvc5.MinifyingRazorBuildProvider, RazorHtmlMinifier.Mvc5" />
5353
</buildProviders>

src/RazorHtmlMinifier.Mvc5/RazorHtmlMinifier.Mvc5.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup Label="Basic build">
4-
<TargetFrameworks>net45</TargetFrameworks>
4+
<TargetFrameworks>net48</TargetFrameworks>
55
<LangVersion>7.3</LangVersion>
66
<Deterministic>true</Deterministic>
77
</PropertyGroup>
@@ -41,8 +41,8 @@
4141
</PropertyGroup>
4242

4343
<ItemGroup>
44-
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.3" />
45-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
44+
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.7" />
45+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
4646
<PrivateAssets>all</PrivateAssets>
4747
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
4848
</PackageReference>

src/RazorHtmlMinifier.Sample/RazorHtmlMinifier.Sample.csproj

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
4-
<Import Project="..\..\packages\Microsoft.Net.Compilers.2.4.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\..\packages\Microsoft.Net.Compilers.2.4.0\build\Microsoft.Net.Compilers.props')" />
3+
<Import Project="..\..\packages\Microsoft.Net.Compilers.4.1.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\..\packages\Microsoft.Net.Compilers.4.1.0\build\Microsoft.Net.Compilers.props')" />
54
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
65
<PropertyGroup>
76
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -15,7 +14,7 @@
1514
<AppDesignerFolder>Properties</AppDesignerFolder>
1615
<RootNamespace>RazorHtmlMinifier.Sample</RootNamespace>
1716
<AssemblyName>RazorHtmlMinifier.Sample</AssemblyName>
18-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
17+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1918
<MvcBuildViews>false</MvcBuildViews>
2019
<UseIISExpress>true</UseIISExpress>
2120
<Use64BitIISExpress />
@@ -47,8 +46,8 @@
4746
<WarningLevel>4</WarningLevel>
4847
</PropertyGroup>
4948
<ItemGroup>
50-
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
51-
<HintPath>..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
49+
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
50+
<HintPath>..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.3.6.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
5251
</Reference>
5352
<Reference Include="Microsoft.CSharp" />
5453
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -61,22 +60,22 @@
6160
<Reference Include="System.ComponentModel.DataAnnotations" />
6261
<Reference Include="System.Core" />
6362
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
64-
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
63+
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll</HintPath>
6564
</Reference>
66-
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
67-
<HintPath>..\..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
65+
<Reference Include="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
66+
<HintPath>..\..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll</HintPath>
6867
</Reference>
6968
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
70-
<HintPath>..\..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
69+
<HintPath>..\..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll</HintPath>
7170
</Reference>
7271
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
73-
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
72+
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll</HintPath>
7473
</Reference>
7574
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
76-
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
75+
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
7776
</Reference>
7877
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
79-
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
78+
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
8079
</Reference>
8180
<Reference Include="System.Xml.Linq" />
8281
<Reference Include="System.Web" />
@@ -144,12 +143,13 @@
144143
</FlavorProperties>
145144
</VisualStudio>
146145
</ProjectExtensions>
146+
<Import Project="..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.3.6.0\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.targets" Condition="Exists('..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.3.6.0\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.targets')" />
147147
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
148148
<PropertyGroup>
149149
<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>
150150
</PropertyGroup>
151-
<Error Condition="!Exists('..\..\packages\Microsoft.Net.Compilers.2.4.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Net.Compilers.2.4.0\build\Microsoft.Net.Compilers.props'))" />
152-
<Error Condition="!Exists('..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
151+
<Error Condition="!Exists('..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.3.6.0\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.3.6.0\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.targets'))" />
152+
<Error Condition="!Exists('..\..\packages\Microsoft.Net.Compilers.4.1.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Net.Compilers.4.1.0\build\Microsoft.Net.Compilers.props'))" />
153153
</Target>
154154
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
155155
Other similar extension points exist, see Microsoft.Common.targets.
Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,36 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
32
<configuration>
4-
<system.web>
5-
<compilation debug="true" targetFramework="4.5">
6-
<buildProviders>
7-
<add extension=".cshtml" type="RazorHtmlMinifier.Mvc5.MinifyingRazorBuildProvider, RazorHtmlMinifier.Mvc5" />
8-
</buildProviders>
9-
</compilation>
10-
<httpRuntime targetFramework="4.5" />
11-
</system.web>
12-
<system.webServer>
13-
<validation validateIntegratedModeConfiguration="false" />
14-
</system.webServer>
15-
<runtime>
16-
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
17-
<dependentAssembly>
18-
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
19-
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
20-
</dependentAssembly>
21-
<dependentAssembly>
22-
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
23-
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
24-
</dependentAssembly>
25-
<dependentAssembly>
26-
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
27-
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
28-
</dependentAssembly>
29-
</assemblyBinding>
30-
</runtime>
31-
<system.codedom>
32-
<compilers>
33-
<compiler language="c#;cs;csharp" extension=".cs"
34-
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
35-
warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
36-
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
37-
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
38-
warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
39-
</compilers>
40-
</system.codedom>
3+
<system.web>
4+
<compilation debug="true" targetFramework="4.8">
5+
<buildProviders>
6+
<add extension=".cshtml" type="RazorHtmlMinifier.Mvc5.MinifyingRazorBuildProvider, RazorHtmlMinifier.Mvc5" />
7+
</buildProviders>
8+
</compilation>
9+
<httpRuntime targetFramework="4.8" />
10+
</system.web>
11+
<system.webServer>
12+
<validation validateIntegratedModeConfiguration="false" />
13+
</system.webServer>
14+
<runtime>
15+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
16+
<dependentAssembly>
17+
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
18+
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
19+
</dependentAssembly>
20+
<dependentAssembly>
21+
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
22+
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
23+
</dependentAssembly>
24+
<dependentAssembly>
25+
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
26+
<bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
27+
</dependentAssembly>
28+
</assemblyBinding>
29+
</runtime>
30+
<system.codedom>
31+
<compilers>
32+
<compiler extension=".cs" language="c#;cs;csharp" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
33+
<compiler extension=".vb" language="vb;vbs;visualbasic;vbscript" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008,40000,40008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
34+
</compilers>
35+
</system.codedom>
4136
</configuration>
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
32
<packages>
4-
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
5-
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
6-
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
7-
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.8" targetFramework="net45" />
8-
<package id="Microsoft.Net.Compilers" version="2.4.0" targetFramework="net45" developmentDependency="true" />
9-
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
3+
<package id="Microsoft.AspNet.Mvc" version="5.2.7" targetFramework="net48" />
4+
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net48" />
5+
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
6+
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="3.6.0" targetFramework="net48" />
7+
<package id="Microsoft.Net.Compilers" version="4.1.0" targetFramework="net48" developmentDependency="true" />
8+
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
109
</packages>

0 commit comments

Comments
 (0)