Skip to content

Commit 5b9d046

Browse files
committed
Fix NativeAOT warnings (without localization)
1 parent 4aa4021 commit 5b9d046

File tree

5 files changed

+16
-27
lines changed

5 files changed

+16
-27
lines changed

publish-hasher.bat

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
dotnet publish src\ImeSense.Launchers.Belarus.CryptoHasher\ImeSense.Launchers.Belarus.CryptoHasher.csproj ^
22
--configuration Release ^
3-
--runtime win-x86 ^
4-
--self-contained true ^
5-
-p:PublishSingleFile=true ^
6-
-p:IncludeAllContentForSelfExtract=true ^
7-
-p:EnableCompressionInSingleFile=true ^
8-
-p:DebugSymbols=false ^
9-
-p:DebugType=None
3+
--runtime win-x64 ^
4+
-p:PublishAot=true ^
5+
-p:InvariantGlobalization=true ^
6+
-p:IsAotCompatible=true
7+

publish-launcher.bat

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
dotnet publish src\ImeSense.Launchers.Belarus.Avalonia\ImeSense.Launchers.Belarus.Avalonia.csproj ^
22
--configuration Release ^
3-
--runtime win-x86 ^
4-
--self-contained true ^
5-
-p:PublishSingleFile=true ^
6-
-p:IncludeAllContentForSelfExtract=true ^
7-
-p:EnableCompressionInSingleFile=true ^
8-
-p:DebugSymbols=false ^
9-
-p:DebugType=None
3+
--runtime win-x64 ^
4+
-p:PublishAot=true ^
5+
-p:InvariantGlobalization=true ^
6+
-p:IsAotCompatible=true

publish-updater.bat

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
dotnet publish src\ImeSense.Launchers.Belarus.Updater\ImeSense.Launchers.Belarus.Updater.csproj ^
22
--configuration Release ^
3-
--runtime win-x86 ^
4-
--self-contained true ^
5-
-p:PublishSingleFile=true ^
6-
-p:IncludeAllContentForSelfExtract=true ^
7-
-p:EnableCompressionInSingleFile=true ^
8-
-p:DebugSymbols=false ^
9-
-p:DebugType=None
3+
--runtime win-x64 ^
4+
-p:PublishAot=true ^
5+
-p:InvariantGlobalization=true ^
6+
-p:IsAotCompatible=true

src/ImeSense.Launchers.Belarus.Avalonia/ViewLocator.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace ImeSense.Launchers.Belarus.Avalonia;
1111

1212
public class ViewLocator : IDataTemplate {
1313
public Control Build(object? data) {
14-
var name = data!.GetType().FullName!.Replace("ViewModel", "View");
14+
var name = $"{data!.GetType().FullName!.Replace("ViewModel", "View")}";
1515
var type = Type.GetType(name);
1616

1717
if (type != null) {

src/ImeSense.Launchers.Belarus.Core/Helpers/ApplicationHelper.cs

+2-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@ namespace ImeSense.Launchers.Belarus.Core.Helpers;
55

66
public static class ApplicationHelper {
77
public static string GetAppVersion() {
8-
var entryAssembly = Assembly.GetEntryAssembly();
9-
var version = entryAssembly!.GetName().Version;
10-
return $"{version!.Major}.{version.Minor}";
8+
return "2.1";
119
}
1210

1311
public static string? GetCompanyName() {
14-
var versionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly()!.Location);
15-
return versionInfo.CompanyName;
12+
return "ImeSense";
1613
}
1714
}

0 commit comments

Comments
 (0)