Skip to content

Commit

Permalink
Revert back to .NET Framework
Browse files Browse the repository at this point in the history
And use v4.6.2 to maximize portability as it's the earliest supported version (https://docs.microsoft.com/en-US/lifecycle/faq/dotnet-framework).

The only features we were missing are the init setters in Monitor.cs, but that's an easy change.

File size is under 400KB. On self-contained .NET Core it's over 150MB! Without trimming (dotnet/wpf#3811) on self-contained deployment, it's very hard to justify the file size, and not being self-contained isn't an option as Windows doesn't come with a system install of .NET Core.
  • Loading branch information
danielchalmers committed Jun 10, 2022
1 parent f3ca340 commit 712b2ee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ jobs:
- name: Build
run: dotnet publish -o "publish" \
-c Release \
-r win-x64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
-p:PublishReadyToRun=true
-r win-x64

- name: Create GitHub release
uses: softprops/action-gh-release@v1
Expand Down
6 changes: 3 additions & 3 deletions Network Monitor/Monitors/Monitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ protected Monitor()
/// <summary>
/// Name of the monitor.
/// </summary>
public string Name { get; protected init; }
public string Name { get; protected set; }

/// <summary>
/// Icon to show in the UI.
/// </summary>
public char Icon { get; protected init; }
public char Icon { get; protected set; }

/// <summary>
/// Icon color.
/// </summary>
public Brush IconBrush { get; protected init; }
public Brush IconBrush { get; protected set; }

/// <summary>
/// User-friendly text to show in the UI.
Expand Down
3 changes: 2 additions & 1 deletion Network Monitor/Network Monitor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net462</TargetFramework>
<UseWPF>true</UseWPF>
<LangVersion>latest</LangVersion>
<ApplicationIcon>Network Monitor.ico</ApplicationIcon>
<Copyright>© Daniel Chalmers</Copyright>
<Version>2.2.1</Version>
Expand Down
6 changes: 0 additions & 6 deletions global.json

This file was deleted.

0 comments on commit 712b2ee

Please sign in to comment.