Skip to content

Commit

Permalink
Fix NativeAOT warnings (without localization)
Browse files Browse the repository at this point in the history
  • Loading branch information
Drombeys committed Feb 29, 2024
1 parent 4aa4021 commit e6cb3e1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 20 deletions.
8 changes: 1 addition & 7 deletions publish-hasher.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
dotnet publish src\ImeSense.Launchers.Belarus.CryptoHasher\ImeSense.Launchers.Belarus.CryptoHasher.csproj ^
--configuration Release ^
--runtime win-x86 ^
--self-contained true ^
-p:PublishSingleFile=true ^
-p:IncludeAllContentForSelfExtract=true ^
-p:EnableCompressionInSingleFile=true ^
-p:DebugSymbols=false ^
-p:DebugType=None
--runtime win-x64
8 changes: 1 addition & 7 deletions publish-launcher.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
dotnet publish src\ImeSense.Launchers.Belarus.Avalonia\ImeSense.Launchers.Belarus.Avalonia.csproj ^
--configuration Release ^
--runtime win-x86 ^
--self-contained true ^
-p:PublishSingleFile=true ^
-p:IncludeAllContentForSelfExtract=true ^
-p:EnableCompressionInSingleFile=true ^
-p:DebugSymbols=false ^
-p:DebugType=None
--runtime win-x64
2 changes: 1 addition & 1 deletion src/ImeSense.Launchers.Belarus.Avalonia/ViewLocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace ImeSense.Launchers.Belarus.Avalonia;

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

if (type != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ namespace ImeSense.Launchers.Belarus.Core.Helpers;

public static class ApplicationHelper {
public static string GetAppVersion() {
var entryAssembly = Assembly.GetEntryAssembly();
var version = entryAssembly!.GetName().Version;
return $"{version!.Major}.{version.Minor}";
return "2.1";
}

public static string? GetCompanyName() {
var versionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly()!.Location);
return versionInfo.CompanyName;
return "ImeSense";
}
}

0 comments on commit e6cb3e1

Please sign in to comment.