Skip to content

Commit

Permalink
Fix for #36. Version bump. Readme update.
Browse files Browse the repository at this point in the history
  • Loading branch information
stavroskasidis committed Nov 20, 2022
1 parent 0efc818 commit 18673f2
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,4 @@ __pycache__/


/artifacts/
*.pubxml
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,12 @@ This work was inspired by the post in https://github.com/dotnet/aspnetcore/issue

## Release Notes

<details open="open"><summary>2.1.0</summary>
<details open="open"><summary>2.2.0</summary>

>- Fix when publishing from Visual Studio [#36](https://github.com/stavroskasidis/BlazorWasmAntivirusProtection/issues/36)
</details>
<details><summary>2.1.0</summary>

>- Fix targeting .net 7.0 correctly
>- Changed default Xor key to be a bit more complex.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0" PrivateAssets="all" />
<PackageReference Include="BlazorWasmAntivirusProtection" Version="2.1.0-beta" />
<PackageReference Include="BlazorWasmAntivirusProtection" Version="2.2.0-beta" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
$(RestoreAdditionalProjectSources);
$(MSBuildThisFileDirectory)../../../artifacts/nuget
</RestoreAdditionalProjectSources>

<!--<DisableRenamingDlls>true</DisableRenamingDlls>-->
<!--<RenameDllsTo>blazor</RenameDllsTo>-->
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.0" />
<PackageReference Include="BlazorWasmAntivirusProtection" Version="2.1.0-beta" />
<PackageReference Include="BlazorWasmAntivirusProtection" Version="2.2.0-beta" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0" PrivateAssets="all" />
<PackageReference Include="BlazorWasmAntivirusProtection" Version="2.1.0-beta" />
<PackageReference Include="BlazorWasmAntivirusProtection" Version="2.2.0-beta" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.0" />
<PackageReference Include="BlazorWasmAntivirusProtection" Version="2.1.0-beta" />
<PackageReference Include="BlazorWasmAntivirusProtection" Version="2.2.0-beta" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0" PrivateAssets="all" />
<PackageReference Include="BlazorWasmAntivirusProtection" Version="2.1.0-beta" />
<PackageReference Include="BlazorWasmAntivirusProtection" Version="2.2.0-beta" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.0" />
<PackageReference Include="BlazorWasmAntivirusProtection" Version="2.1.0-beta" />
<PackageReference Include="BlazorWasmAntivirusProtection" Version="2.2.0-beta" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>8.0</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Brotli.NET" Version="2.1.1" />
<PackageReference Include="Microsoft.Build.Framework" Version="16.10.0" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.10.0" />
<PackageReference Include="System.Text.Json" Version="7.0.0" />
Expand Down
9 changes: 7 additions & 2 deletions src/BlazorWasmAntivirusProtection.Tasks/RenameDlls.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace BlazorWasmAntivirusProtection.Tasks
{
using Brotli;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System;
Expand Down Expand Up @@ -118,8 +119,12 @@ private void BrotliCompress(string bootJsonPath, string bootJsonBrPath)
var compressionLevel = Enum.TryParse<CompressionLevel>(CompressionLevel, out var level) ? level : System.IO.Compression.CompressionLevel.Optimal;
using var fileStream = File.OpenRead(bootJsonPath);
using var stream = File.Create(bootJsonBrPath);
using var destination = new BrotliStream(stream, compressionLevel);
fileStream.CopyTo(destination);
fileStream.CompressToBrotli(stream, compressionLevel switch
{
System.IO.Compression.CompressionLevel.Optimal => 11,
System.IO.Compression.CompressionLevel.Fastest => 5,
System.IO.Compression.CompressionLevel.NoCompression=> 0,
});
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageProjectUrl>https://github.com/stavroskasidis/BlazorWasmAntivirusProtection</PackageProjectUrl>
<Description>This package attempts to guard against false positives from antiviruses that flag Blazor Wasm as malware</Description>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<Version>2.1.0</Version>
<Version>2.2.0</Version>
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>
</PropertyGroup>

Expand Down

0 comments on commit 18673f2

Please sign in to comment.