Skip to content

Commit

Permalink
Upgrade to .NET 8, build for ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
tip2tail committed Jan 5, 2025
1 parent 4eb6cee commit e2d8b9b
Show file tree
Hide file tree
Showing 14 changed files with 137 additions and 15 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
bin/*
obj/*
bin/
obj/
.vs/
publish/
3 changes: 1 addition & 2 deletions Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ static class Extensions
/// <returns>DateTime</returns>
public static DateTime GetLinkerTimestampUtc(this Assembly assembly)
{
var location = assembly.Location;
return GetLinkerTimestampUtcLocation(location);
return GetLinkerTimestampUtcLocation(Environment.ProcessPath);
}

/// <summary>
Expand Down
11 changes: 3 additions & 8 deletions HexPrintFile.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

<!-- Deterministic needs to be false for the build date functionality to work -->
<Deterministic>false</Deterministic>
<AssemblyVersion>1.1.1</AssemblyVersion>

<AssemblyVersion>1.2.0</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="3.0.0" />
</ItemGroup>

</Project>
</Project>
6 changes: 6 additions & 0 deletions HexPrintFile.csproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_LastSelectedProfileId>C:\Repos\HexPrintFile\Properties\PublishProfiles\SelfContained_win-x64.pubxml</_LastSelectedProfileId>
</PropertyGroup>
</Project>
25 changes: 25 additions & 0 deletions HexPrintFile.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HexPrintFile", "HexPrintFile.csproj", "{5595A06A-DCA0-4137-87CD-F78E4EA75498}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5595A06A-DCA0-4137-87CD-F78E4EA75498}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5595A06A-DCA0-4137-87CD-F78E4EA75498}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5595A06A-DCA0-4137-87CD-F78E4EA75498}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5595A06A-DCA0-4137-87CD-F78E4EA75498}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {42B8452C-6163-4F4C-B57B-ABC2F227C532}
EndGlobalSection
EndGlobal
3 changes: 0 additions & 3 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ private enum ReturnCode
[Description("Read block size cannot be more than 64 bytes")]
CHUNK_MORE_THAN_MAXIMUM = 11,
}

// Read in 16 byte chunks
private const int ChunkSize = 16;

private static readonly string[] ControlChars =
{
Expand Down
18 changes: 18 additions & 0 deletions Properties/PublishProfiles/SelfContained_linux-arm64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>publish\linux-arm64\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>linux-arm64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>false</PublishTrimmed>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<History>True|2025-01-05T02:25:58.9812476Z||;True|2025-01-05T02:13:51.9002923+00:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
18 changes: 18 additions & 0 deletions Properties/PublishProfiles/SelfContained_linux-x64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>publish\linux-x64\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>false</PublishTrimmed>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<History>True|2025-01-05T02:26:05.1317394Z||;True|2025-01-05T02:13:55.4856065+00:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
19 changes: 19 additions & 0 deletions Properties/PublishProfiles/SelfContained_win-arm64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>publish\win-arm64\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>false</PublishTrimmed>
<PublishReadyToRun>false</PublishReadyToRun>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<History>True|2025-01-05T02:26:11.8641866Z||;True|2025-01-05T02:25:53.0312352+00:00||;True|2025-01-05T02:21:57.0884576+00:00||;True|2025-01-05T02:19:48.8915590+00:00||;True|2025-01-05T02:18:14.9772544+00:00||;True|2025-01-05T02:14:04.8817266+00:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
19 changes: 19 additions & 0 deletions Properties/PublishProfiles/SelfContained_win-x64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>publish\win-x64\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>false</PublishReadyToRun>
<PublishTrimmed>false</PublishTrimmed>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions Properties/PublishProfiles/SelfContained_win-x64.pubxml.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<History>True|2025-01-05T02:26:17.2502768Z||;True|2025-01-05T02:14:14.5259563+00:00||;True|2025-01-05T02:13:42.9838012+00:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>

0 comments on commit e2d8b9b

Please sign in to comment.