Skip to content

Commit

Permalink
Disable "prefer 32 bit" build flag
Browse files Browse the repository at this point in the history
The build flag causes the application to run as a 32-bit app on 64-bit
systems, which we don't want.  We're still using "Any CPU" as the
platform target, so it will continue to work on 32-bit x86 systems;
we just no longer force it to always be 32-bit.

This only affects the main .NET Framework application executable.
The setting is not relevant for the libraries.

(Note to future self: the way things work changed with .NET Core,
which requires different executables for different targets, specified
with the RID.  The older .NET Framework is Windows-only, which makes
it easier to have a single multi-target EXE.)
  • Loading branch information
fadden committed May 9, 2024
1 parent 17bd80e commit d6cfc83
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Asm65/Asm65.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
Expand Down
2 changes: 2 additions & 0 deletions SourceGen/SourceGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -33,6 +34,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Res\SourceGenIcon.ico</ApplicationIcon>
Expand Down
3 changes: 2 additions & 1 deletion SourceGen/WpfGui/AboutBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ limitations under the License.
BorderThickness="0" HorizontalAlignment="Left"
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Click="WebSiteButton_Click"/>
<TextBlock Text="Copyright 2022 faddenSoft" Margin="0,0,0,0"/>
<TextBlock Text="Copyright 2024 faddenSoft" Margin="0,0,0,0"/>
<TextBlock Text="Created by Andy McFadden"/>
</StackPanel>

<StackPanel Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Margin="0,8,0,0">
<TextBlock Text="{Binding OsPlatform, FallbackValue=OS: blah blah blah}"/>
<TextBlock Text="{Binding RuntimeInfo, FallbackValue=RunTime: blah blah}"/>
<TextBlock Text="Assertions and extended validation are enabled"
Visibility="{Binding DebugMessageVisibility}"/>
<TextBlock Text="Legal stuff:" Margin="0,8,0,0"/>
Expand Down
12 changes: 12 additions & 0 deletions SourceGen/WpfGui/AboutBox.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Windows;

namespace SourceGen.WpfGui {
Expand All @@ -40,6 +41,17 @@ public string OsPlatform {
}
}

/// <summary>
/// Runtime information, for display.
/// </summary>
public string RuntimeInfo {
get {
return "Runtime: " + RuntimeInformation.FrameworkDescription + ", " +
"OS-arch " + RuntimeInformation.OSArchitecture + ", proc-arch " +
RuntimeInformation.ProcessArchitecture;
}
}

/// <summary>
/// Determines whether a message about assertions is visible.
/// </summary>
Expand Down

0 comments on commit d6cfc83

Please sign in to comment.