Skip to content

Commit

Permalink
Minor: Add .Net 7 as target framework
Browse files Browse the repository at this point in the history
  • Loading branch information
mingyaulee committed Apr 21, 2022
1 parent 30c7827 commit 53e7b44
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 19 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/WebExtensions.Net-Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x
include-prerelease: true
- name: Setup Chrome and Chrome Driver
uses: nanasess/setup-chromedriver@master
- name: Checkout
Expand Down Expand Up @@ -77,7 +78,7 @@ jobs:
run: |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"WebExtensions.Net" /o:"mingyaulee" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /v:"v${{ needs.version.outputs.FullSemVer }}" /d:sonar.cs.vstest.reportsPaths="test/TestResults/*.trx" /d:sonar.cs.opencover.reportsPaths="test/TestResults/**/*.opencover.xml"
dotnet build --no-restore --configuration Release
.\.coverlet\console\coverlet ./test/WebExtensions.Net.BrowserExtensionIntegrationTest/bin/Release/net6.0/browserextension/framework --include "[WebExtensions.Net]*" --target "dotnet" --targetargs "test . --no-restore --no-build --configuration Release" --format opencover --output ./test/TestResults/coverage --verbosity detailed
.\.coverlet\console\coverlet ./test/WebExtensions.Net.BrowserExtensionIntegrationTest/bin/Release/net7.0/browserextension/framework --include "[WebExtensions.Net]*" --target "dotnet" --targetargs "test . --no-restore --no-build --configuration Release" --format opencover --output ./test/TestResults/coverage --verbosity detailed
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
tag:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/WebExtensions.Net-Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x
include-prerelease: true
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- Build properties. -->
<PropertyGroup>
<TargetFrameworks>net6.0;net5.0</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;net5.0</TargetFrameworks>
<GenerateDependencyFile>false</GenerateDependencyFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsShippingPackage>true</IsShippingPackage>
Expand All @@ -29,7 +29,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="JsBind.Net.Extensions.DependencyInjection" Version="0.3.2" PrivateAssets="contentfiles" />
<PackageReference Include="JsBind.Net.Extensions.DependencyInjection" Version="0.4.0" PrivateAssets="contentfiles" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<!-- Change the default location where NuGet will put the build output -->
<OutDir>BuildOutput</OutDir>
Expand All @@ -26,10 +26,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0-*" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0-*" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0-*" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0-*" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/WebExtensions.Net/WebExtensions.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- Build properties. -->
<PropertyGroup>
<TargetFrameworks>net6.0;net5.0</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;net5.0</TargetFrameworks>
<GenerateDependencyFile>false</GenerateDependencyFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsShippingPackage>true</IsShippingPackage>
Expand All @@ -29,7 +29,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="JsBind.Net" Version="0.3.2" PrivateAssets="contentfiles" />
<PackageReference Include="JsBind.Net" Version="0.4.0" PrivateAssets="contentfiles" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<BlazorEnableCompression>false</BlazorEnableCompression>
<!-- Disable caching so that we can skip integrity check. This is for coverlet to inject the hits counter into the assembly which will change the integrity hash. -->
<BlazorCacheBootResources>false</BlazorCacheBootResources>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Blazor.BrowserExtension" Version="0.7.*" />
<PackageReference Include="Blazor.BrowserExtension" Version="0.8.*" />
<PackageReference Include="FluentAssertions" Version="5.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.*" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="6.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.*-*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.*-*" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="7.*-*" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion test/WebExtensions.Net.IntegrationTestsRunner/Runner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public async Task RunTests()
var configuration = "release";
#endif

var extensionPath = $"{solutionDirectory}\\test\\WebExtensions.Net.BrowserExtensionIntegrationTest\\bin\\{configuration}\\net6.0\\browserextension";
var extensionPath = $"{solutionDirectory}\\test\\WebExtensions.Net.BrowserExtensionIntegrationTest\\bin\\{configuration}\\net7.0\\browserextension";

if (!Directory.Exists(resultsPath))
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
<OutDir>BuildOutput\$(Configuration)</OutDir>
</PropertyGroup>
Expand Down

0 comments on commit 53e7b44

Please sign in to comment.