Skip to content

Commit d9d9ad6

Browse files
committed
Downgrade launcher framework to .NET 4.0
1 parent d8d31da commit d9d9ad6

File tree

6 files changed

+13
-14
lines changed

6 files changed

+13
-14
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
uses: gittools/actions/gitversion/execute@v0
2727

2828
- name: Publish
29-
run: dotnet publish --configuration Release -p:DebugType=embedded -p:AssemblyVersion=$env:GitVersion_AssemblySemVer -p:FileVersion=$env:GitVersion_AssemblySemFileVer -p:InformationalVersion=$env:GitVersion_InformationalVersion
29+
run: dotnet publish --framework net40 --configuration Release -p:DebugType=embedded -p:AssemblyVersion=$env:GitVersion_AssemblySemVer -p:FileVersion=$env:GitVersion_AssemblySemFileVer -p:InformationalVersion=$env:GitVersion_InformationalVersion
3030

3131
- name: Zip
32-
run: 7z a -r ${{ format('CnCNet.LauncherStub-v{0}-net471.zip', env.GitVersion_SemVer) }} ./bin/Release/net471/publish/*.*
32+
run: 7z a -r ${{ format('CnCNet.LauncherStub-v{0}-net40.zip', env.GitVersion_SemVer) }} ./bin/Release/net40/publish/*.*
3333

3434
- name: Prerelease
3535
if: ${{ env.GitVersion_PreReleaseTag != '' }}

AdvancedMessageBoxViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public ObservableCollection<CommandViewModel> Commands
1212
set
1313
{
1414
commands = value;
15-
NotifyPropertyChanged();
15+
NotifyPropertyChanged("Commands");
1616
}
1717
}
1818

@@ -24,7 +24,7 @@ public string Title
2424
set
2525
{
2626
title = value;
27-
NotifyPropertyChanged();
27+
NotifyPropertyChanged("Title");
2828
}
2929
}
3030

@@ -36,7 +36,7 @@ public string Message
3636
set
3737
{
3838
message = value;
39-
NotifyPropertyChanged();
39+
NotifyPropertyChanged("Message");
4040
}
4141
}
4242
}

CnCNet.LauncherStub.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
22
<PropertyGroup>
3-
<TargetFramework>net471</TargetFramework>
3+
<TargetFrameworks>net40; net471</TargetFrameworks>
44
<LangVersion>12.0</LangVersion>
55
<OutputType>WinExe</OutputType>
66
<UseWPF>true</UseWPF>
@@ -25,7 +25,4 @@
2525
<ItemGroup>
2626
<Content Include="mainclienticon.ico" />
2727
</ItemGroup>
28-
<ItemGroup>
29-
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
30-
</ItemGroup>
3128
</Project>

CnCNet.LauncherStub.sln

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{31CF936D-B0E9-4B0B-9D87-255E3514164A}"
99
ProjectSection(SolutionItems) = preProject
1010
.github\workflows\publish.yml = .github\workflows\publish.yml
11-
.github\workflows\publishcustomicon.yml = .github\workflows\publishcustomicon.yml
1211
EndProjectSection
1312
EndProject
1413
Global

CommandViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public string Text
1212
set
1313
{
1414
text = value;
15-
NotifyPropertyChanged();
15+
NotifyPropertyChanged("Text");
1616
}
1717
}
1818

@@ -24,7 +24,7 @@ public ICommand Command
2424
set
2525
{
2626
command = value;
27-
NotifyPropertyChanged();
27+
NotifyPropertyChanged("Command");
2828
}
2929
}
3030
}

NotifyPropertyChangedBase.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
namespace CnCNet.LauncherStub;
22

33
using System.ComponentModel;
4-
using System.Runtime.CompilerServices;
54

65
public abstract class NotifyPropertyChangedBase : INotifyPropertyChanged
76
{
87
public event PropertyChangedEventHandler? PropertyChanged;
98

9+
#if NET45_OR_GREATER || NETSTANDARD || NET
1010
/// <summary>
1111
/// This method is called by the Set accessor of each property. <br/>
1212
/// The CallerMemberName attribute that is applied to the optional propertyName parameter causes the property name of the caller to be substituted as an argument.
1313
/// </summary>
1414
/// <param name="propertyName">The property name. Default to the caller.</param>
15-
internal void NotifyPropertyChanged([CallerMemberName] string propertyName = "") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
15+
internal void NotifyPropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = "") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
16+
#else
17+
internal void NotifyPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
18+
#endif
1619
}

0 commit comments

Comments
 (0)