-
December 3rd, 2016, 11:46 AM
#1
Build targets
I'm pretty experienced with C++ (MSVC) but up until today I've had no experience with C#. However, earlier today someone gave me a C# project to experiment with (i.e. a Visual Studio project). One thing struck me immediately...
When building with C++ I need to define different build targets for building as either 32-bit or 64-bit. But in the C# project I can't immediately see anything similar. It kinda looks like the same executable will run on both (which seems counter-intuitive to me). Am I just misunderstanding something?
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
December 3rd, 2016, 05:40 PM
#2
Re: Build targets
What version of visual studio?
-
December 4th, 2016, 03:09 AM
#3
Re: Build targets
I'm running Visual Studio 2015 (Community Edition) but it looks like the VS project that I got given must have come from VS 2013.
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
December 4th, 2016, 06:22 AM
#4
Re: Build targets
In case it helps, the .sln files for my C++ projects contain entries like this:-
Code:
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{80208D6F-AD26-4CF3-980E-363F27246AD0}.Debug|Win32.ActiveCfg = Debug|Win32
{80208D6F-AD26-4CF3-980E-363F27246AD0}.Debug|Win32.Build.0 = Debug|Win32
{80208D6F-AD26-4CF3-980E-363F27246AD0}.Release|Win32.ActiveCfg = Release|Win32
{80208D6F-AD26-4CF3-980E-363F27246AD0}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
whereas the C# .sln file looks more like this:-
Code:
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0A5CF6D4-A6AB-400F-8772-E1C698A0D727}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A5CF6D4-A6AB-400F-8772-E1C698A0D727}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A5CF6D4-A6AB-400F-8772-E1C698A0D727}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A5CF6D4-A6AB-400F-8772-E1C698A0D727}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
December 5th, 2016, 12:56 AM
#5
Re: Build targets
There's build settings that target 32 or 64 bit or All. There is also a prefer 32 bit (for All when running on 64 bit systems).
Right click on the project in the solution explorer and select the build settings.
-
December 5th, 2016, 05:30 AM
#6
Re: Build targets
I found them Arjay, thanks. That makes more sense now!
"A problem well stated is a problem half solved.” - Charles F. Kettering
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|