Skip to content

Commit

Permalink
Merge pull request #347 from laedit/switch-to-net6
Browse files Browse the repository at this point in the history
Switch to net6.0
  • Loading branch information
laedit authored May 17, 2022
2 parents 7a41f33 + 5fc392d commit c662464
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
nuget-
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v2
with:
dotnet-version: 3.1.x
dotnet-version: '6.0.x'

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.11
Expand Down Expand Up @@ -60,10 +60,10 @@ jobs:
- name: GendarmeAnalysis
run: |
nuget install mono.gendarme -ExcludeVersion -OutputDirectory tools
./tools/Mono.Gendarme/tools/gendarme.exe --xml GendarmeReport.xml --ignore gendarme.ignore .\src\NVika\bin\Release\netcoreapp3.1\NVika.exe
./tools/Mono.Gendarme/tools/gendarme.exe --xml GendarmeReport.xml --ignore gendarme.ignore .\src\NVika\bin\Release\net6.0\NVika.exe
- name: LaunchNVika
run: .\src\NVika\bin\Release\netcoreapp3.1\NVika.exe --debug --includesource inspectcodereport.xml ./src/NVika/bin/Release/netcoreapp3.1/static-analysis.sarif.json GendarmeReport.xml
run: .\src\NVika\bin\Release\net6.0\NVika.exe --debug --includesource inspectcodereport.xml ./src/NVika/bin/Release/net6.0/static-analysis.sarif.json GendarmeReport.xml

# - name: Create release notes
# run: |
Expand All @@ -74,13 +74,13 @@ jobs:
run: |
Copy-Item -Path resources/icon.png -Destination src\NVika.MSBuild\
mkdir src\NVika.MSBuild\tools\
Copy-Item -Path "src/NVika/bin/Release/netcoreapp3.1/publish/*" -Destination src\NVika.MSBuild\tools\
Copy-Item -Path "src/NVika/bin/Release/net6.0/publish/*" -Destination src\NVika.MSBuild\tools\
nuget pack src/NVika.MSBuild/NVika.MSBuild.nuspec -Version ${{ steps.gitversion.outputs.nuGetVersionV2 }} -OutputDirectory artifacts/nuget
- name: Create netcore packages
run: |
mkdir ./artifacts/zips
Compress-Archive -Path src/NVika/bin/Release/netcoreapp3.1/publish/* -DestinationPath "artifacts/zips/NVika.netcore.${{ steps.gitversion.outputs.nuGetVersionV2 }}.zip"
Compress-Archive -Path src/NVika/bin/Release/net6.0/publish/* -DestinationPath "artifacts/zips/NVika.netcore.${{ steps.gitversion.outputs.nuGetVersionV2 }}.zip"
Copy-Item -Path "src/NVika/bin/Release/NVika.${{ steps.gitversion.outputs.nuGetVersionV2 }}.nupkg" -Destination artifacts/nuget
- name: Create windows version
Expand Down
4 changes: 4 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 3.0.0 (2022-05-xx)

- [#347](https://github.com/laedit/vika/pull/347) - Switch to .NET 6 +breaking

# 2.3.0 (2022-05-17)

- [#343](https://github.com/laedit/vika/pull/343) - Include suggestions in GitHub output by [DanRigby](https://github.com/DanRigby) +enhancement
Expand Down
2 changes: 1 addition & 1 deletion src/NVika.Tests/BuildServers/AppVeyorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public void WriteIntegration_AppVeyorAPIError()

var logs = _loggerOutput.ToString();
Assert.NotNull(logs);
Assert.Contains("An error is occurred during the call to AppVeyor API: \"StatusCode: 403, ReasonPhrase: 'Forbidden', Version: 1.1, Content: <null>, Headers:", logs);
Assert.Contains("An error is occurred during the call to AppVeyor API: \"StatusCode: 403, ReasonPhrase: 'Forbidden', Version: 1.1, Content: System.Net.Http.EmptyContent, Headers:", logs);
}

private MockHttpClientFactory GetHttpClientFactory(HttpStatusCode responseStatusCode = HttpStatusCode.OK)
Expand Down
2 changes: 1 addition & 1 deletion src/NVika.Tests/NVika.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/NVika/NVika.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<ErrorLog>bin\$(Configuration)\$(TargetFramework)\static-analysis.sarif.json;version=2</ErrorLog>
<PackAsTool>true</PackAsTool>
<ToolCommandName>nvika</ToolCommandName>
Expand Down
2 changes: 1 addition & 1 deletion src/NVika/Parsers/SarifParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public override IEnumerable<Issue> Parse(string reportPath)

string filePath = null;
Region region = null;
if (result.Locations.Count > 0)
if (result.Locations?.Count > 0)
{
if (result.Locations[0].PhysicalLocation != null)
{
Expand Down

0 comments on commit c662464

Please sign in to comment.