Skip to content

Commit

Permalink
Merge pull request #5 from arakis/upgrade-to-net7
Browse files Browse the repository at this point in the history
Upgrade to net7
  • Loading branch information
arakis authored May 1, 2023
2 parents 55d99dd + cc5a4d3 commit 01034c5
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/bin/Debug/net5.0/gcaliper.dll",
"program": "${workspaceFolder}/src/bin/Debug/net7.0/gcaliper.dll",
"args": [],
"cwd": "${workspaceFolder}/src",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ git clone https://github.com/Arakis/gcaliper.git
cd gcaliper
```

You need the [.NET5 SDK](https://dotnet.microsoft.com/download/dotnet/5.0). Run within the `src` directory:
You need the [.NET7 SDK](https://dotnet.microsoft.com/download/dotnet/5.0). Run within the `src` directory:
```
dotnet build
```
Expand Down
2 changes: 1 addition & 1 deletion contrib/win/gcaliper.iss
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ArchitecturesInstallIn64BitMode=x64
; Name: "german"; MessagesFile: "compiler:Languages\German.isl"

[Files]
Source: "..\..\src\bin\{#MyConfiguration}\net5.0\win-x64\publish\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "..\..\src\bin\{#MyConfiguration}\net7.0\win-x64\publish\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Expand Down
6 changes: 3 additions & 3 deletions publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ dotnet publish -c Release -r win-x64 /p:PublishWindows=true
dotnet publish -c Release -r linux-x64

#set version=1.1.2
& "C:\Program Files (x86)\Inno Setup 6\iscc.exe" contrib/win/gcaliper.iss /DMyConfiguration=Release /DMyConfiguration=Release /DMyAppVersion=1.1.2
& "C:\Program Files (x86)\Inno Setup 6\iscc.exe" contrib/win/gcaliper.iss /DMyConfiguration=Release /DMyConfiguration=Release /DMyAppVersion=1.2.1

$compress = @{
Path = "src\bin\Release\net5.0\win-x64\publish\*"
Path = "src\bin\Release\net7.0\win-x64\publish\*"
CompressionLevel = "Optimal"
DestinationPath = "GCaliper-Win-x64.zip"
}
Compress-Archive @compress

$compress = @{
Path = "src\bin\Release\net5.0\linux-x64\publish\*"
Path = "src\bin\Release\net7.0\linux-x64\publish\*"
CompressionLevel = "Optimal"
DestinationPath = "GCaliper-Linux-x64.zip"
}
Expand Down
25 changes: 23 additions & 2 deletions src/gcaliper.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<OutputType>WinExe</OutputType>
<StartupObject>gcaliper.Program</StartupObject>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand All @@ -18,7 +18,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GtkSharp" Version="3.22.25.128" />
<PackageReference Include="GtkSharp" Version="3.24.24.38" />
<PackageReference Include="GtkSharp.Dependencies" Version="1.1.0" Condition="$(PublishWindows) == 'true'" />
</ItemGroup>
<ItemGroup>
Expand All @@ -44,4 +44,25 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Update="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="Microsoft.CodeQuality.Analyzers" Version="3.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="Microsoft.NetFramework.Analyzers" Version="3.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="Serilog" Version="2.12.0" />
<PackageReference Update="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Update="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Update="StyleCop.Analyzers" Version="1.2.0-beta.435">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>

0 comments on commit 01034c5

Please sign in to comment.