Skip to content

Commit

Permalink
Update to .NET 7 RC2 and Resharper EAP
Browse files Browse the repository at this point in the history
  • Loading branch information
bkoelman committed Oct 14, 2022
1 parent c167714 commit 882347b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"jetbrains.resharper.globaltools": {
"version": "2022.2.3",
"version": "2022.3.0-eap03",
"commands": [
"jb"
]
Expand Down
13 changes: 6 additions & 7 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function CheckLastExitCode {

function RunInspectCode {
$outputPath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'jetbrains-inspectcode-results.xml')
dotnet jb inspectcode JsonApiDotNetCore.sln --build --toolset=17.4.0-preview-22428-01+14c24b2d3 --dotnetcoresdk=7.0.100-rc.1.22431.12 --output="$outputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
dotnet jb inspectcode JsonApiDotNetCore.sln --build --dotnetcoresdk=7.0.100-rc.2.22477.23 --output="$outputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
CheckLastExitCode

[xml]$xml = Get-Content "$outputPath"
Expand Down Expand Up @@ -104,13 +104,12 @@ CheckLastExitCode
dotnet build -c Release
CheckLastExitCode

# Turned off because InspectCode fails in Windows cibuild on .NET 7 RC1 (but not locally, where the full VS Preview is installed):
# Failed to flush changes for project: JsonApiDotNetCoreExample, target framework: net7.0 Exception of type 'System.ArgumentOutOfRangeException' was thrown. (Parameter 'languageVersion') Actual value was CSharp11.
# https://youtrack.jetbrains.com/issue/RSRP-488628/Breaking-InspectCode-fails-with-Roslyn-Worker-process-exited-unexpectedly-after-update
#if ($env:APPVEYOR_BUILD_WORKER_IMAGE -ne 'Ubuntu') {
# RunInspectCode
# RunCleanupCode
#}
if ($env:APPVEYOR_BUILD_WORKER_IMAGE -ne 'Ubuntu') {
RunInspectCode
# Turned off because CleanupCode v2022.3.0-eap03 adds redundant line breaks at end of files
#RunCleanupCode
}

dotnet test -c Release --no-build --collect:"XPlat Code Coverage"
CheckLastExitCode
Expand Down
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project>
<PropertyGroup>
<TargetFrameworkName>net7.0</TargetFrameworkName>
<AspNetVersion>7.0.0-rc.1.22427.2</AspNetVersion>
<EFCoreVersion>7.0.0-rc.1.22426.7</EFCoreVersion>
<EFCorePostgresVersion>7.0.0-rc.1</EFCorePostgresVersion>
<AspNetVersion>7.0.0-rc.2.22476.2</AspNetVersion>
<EFCoreVersion>7.0.0-rc.2.22472.11</EFCoreVersion>
<EFCorePostgresVersion>7.0.0-rc.2</EFCorePostgresVersion>
<MicrosoftCodeAnalysisVersion>4.3.*</MicrosoftCodeAnalysisVersion>
<HumanizerVersion>2.14.1</HumanizerVersion>
<JsonApiDotNetCoreVersionPrefix>5.0.4</JsonApiDotNetCoreVersionPrefix>
Expand Down
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ for:

build_script:
- pwsh: |
Write-Output "Install .NET 7 RC1"
Write-Output "Install .NET 7 RC2 SDK"
# https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script
# https://help.appveyor.com/discussions/questions/40585-supporting-net-core-30-previews
# https://help.appveyor.com/discussions/problems/28035-unable-to-install-specific-version-of-net-core-on-ubuntu-images
if ($IsWindows) {
pwsh -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version 7.0.100-rc.1.22431.12 -InstallDir 'C:\Program Files\dotnet'"
pwsh -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Version 7.0.100-rc.2.22477.23 -InstallDir 'C:\Program Files\dotnet'"
}
else {
sudo curl -sSL https://dot.net/v1/dotnet-install.sh | sudo bash /dev/stdin --version 7.0.100-rc.1.22431.12 --install-dir /usr/share/dotnet
sudo curl -sSL https://dot.net/v1/dotnet-install.sh | sudo bash /dev/stdin --version 7.0.100-rc.2.22477.23 --install-dir /usr/share/dotnet
}
Write-Output ".NET version:"
Expand Down
6 changes: 3 additions & 3 deletions cleanupcode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ if ($revision) {

if ($baseCommitHash -eq $headCommitHash) {
Write-Output "Running code cleanup on staged/unstaged files."
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f staged,modified
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN --jb --dotnetcoresdk=7.0.100-rc.2.22477.23 -f staged,modified
VerifySuccessExitCode
}
else {
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash, including staged/unstaged files."
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f staged,modified,commits -a $headCommitHash -b $baseCommitHash
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN --jb --dotnetcoresdk=7.0.100-rc.2.22477.23 -f staged,modified,commits -a $headCommitHash -b $baseCommitHash
VerifySuccessExitCode
}
}
else {
Write-Output "Running code cleanup on all files."
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN --jb --dotnetcoresdk=7.0.100-rc.2.22477.23
VerifySuccessExitCode
}
2 changes: 1 addition & 1 deletion inspectcode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if ($LASTEXITCODE -ne 0) {

$outputPath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'jetbrains-inspectcode-results.xml')
$resultPath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'jetbrains-inspectcode-results.html')
dotnet jb inspectcode JsonApiDotNetCore.sln --build --output="$outputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
dotnet jb inspectcode JsonApiDotNetCore.sln --build --output="$outputPath" --dotnetcoresdk=7.0.100-rc.2.22477.23 --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal

if ($LASTEXITCODE -ne 0) {
throw "Code inspection failed with exit code $LASTEXITCODE"
Expand Down

0 comments on commit 882347b

Please sign in to comment.