Default platform target in Properties window is incorrect
See original GitHub issueFrom @davidmatson on August 28, 2017 19:40
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net47</TargetFramework>
</PropertyGroup>
</Project>
using System;
using System.Reflection;
class Program
{
static void Main(string[] args)
{
Console.WriteLine(Environment.Is64BitProcess);
ImageFileMachine b;
typeof(Program).Assembly.ManifestModule.GetPEKind(out PortableExecutableKinds a, out b);
Console.WriteLine($"{a}: {b}");
}
}
Actual output:
True
ILOnly: I386
But, properties window shows:
Copied from original issue: dotnet/project-system#2744
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:29 (22 by maintainers)
Top Results From Across the Web
Can't change target platform to "any CPU"
In the SolutionProperties -> ConfigurationManager for this second project, the "Any CPU" platform is not available and I can't add a new one, ......
Read more >MSBuild error MSB8037
In the Property Pages dialog, select Configuration Properties > General. Modify the Windows SDK Version or Target Platform Version.
Read more >XAF0006: Invalid target platform. Change the ...
Right-click the project in the Solution Explorer and select “Properties”. Navigate to the Build tab and set the Platform target property to “Any...
Read more >Cannot debug net6.0-macos Apps - Developer Community
This is a regression. I can no longer debug net6.0-macos apps. It also fails for net6.0-maccatalyst apps. When I hit debug, the following ......
Read more >Angular workspace configuration
Build targetlink. The architect/build section configures defaults for options of the ng build command. It has the following top-level properties.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
From @tannergooding on August 28, 2017 21:1
You can workaround the issue for the time being by explicitly specifying
<PlatformTarget>AnyCPU</PlatformTarget>
in your project file.@davkean, based on last comment, I was able to make the platform target set to x64 by explicitly setting all platform-like properties for net462 xunit project:
then in SLN, added x64 configurations like this:
After that, property page shows only one option:
Platform: Active (x64)
(which was the desired behavior)