363,925 Members | 2607 Browsing Online
Community for Developers & IT Professionals
Bytes IT Community

Visual Studio Express 2008 - Target Platform

=?Utf-8?B?Sm9ubw==?=
P: n/a
=?Utf-8?B?Sm9ubw==?=
I've developing on xp64, and from a couple other topics I'm supposed to
change my target platform to X86 if i wanna do some specific 32bit stuff.

However, the option is supposed to be in Project properties - build tab...
but it's not there, where did it go? Do I have to do something specific to
my project for it to show?

Thanks
Jan 4 '08 #1
Share this Question
Share on Google+
9 Replies


Jon Skeet [C# MVP]
P: n/a
Jon Skeet [C# MVP]
Jono <Jono@discussions.microsoft.comwrote:
I've developing on xp64, and from a couple other topics I'm supposed to
change my target platform to X86 if i wanna do some specific 32bit stuff.
>
However, the option is supposed to be in Project properties - build tab...
but it's not there, where did it go? Do I have to do something specific to
my project for it to show?
Hmm... on my box (x86) it's under "Define DEBUG constant" and "Define
TRACE constant" as a "Platform target: " dropdown. What's on your Build
tab?

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Jan 4 '08 #2

RobinS
P: n/a
RobinS
You don't see a dropdown box for "platform target" in the first section
(General)? What do you see in that section? What version of Visual Studio
are you using?

RobinS.
GoldMail, Inc.
---------------------------------
"Jono" <Jono@discussions.microsoft.comwrote in message
news:72C4C194-56A8-43B1-BF13-DFB5AD3F340D@microsoft.com...
I've developing on xp64, and from a couple other topics I'm supposed to
change my target platform to X86 if i wanna do some specific 32bit stuff.
>
However, the option is supposed to be in Project properties - build tab...
but it's not there, where did it go? Do I have to do something specific
to
my project for it to show?
>
Thanks
Jan 4 '08 #3

=?Utf-8?B?Sm9ubw==?=
P: n/a
=?Utf-8?B?Sm9ubw==?=
Here's my build options screen
http://img.photobucket.com/albums/v2...008options.jpg

Here's my about box
http://img.photobucket.com/albums/v210/retrad/about.jpg

I downloaded the VS Offline Install from here
http://www.microsoft.com/express/download/default.aspx

I'm using Windows XP 64bit edition

I installed the Visual C# and DirectX SDK (Nov 07) and am getting a not a
win32 application exception, but there's a post on here from about last week
saying I need to change my target platform option to x86 to do that kinda
stuff however... I can't. The help gives me a command line option to specify
the platform, but then goes on to say that this option is not valid inside
the IDE.

"Jon Skeet [C# MVP]" wrote:
Jono <Jono@discussions.microsoft.comwrote:
I've developing on xp64, and from a couple other topics I'm supposed to
change my target platform to X86 if i wanna do some specific 32bit stuff.

However, the option is supposed to be in Project properties - build tab...
but it's not there, where did it go? Do I have to do something specific to
my project for it to show?
>
Hmm... on my box (x86) it's under "Define DEBUG constant" and "Define
TRACE constant" as a "Platform target: " dropdown. What's on your Build
tab?
>
--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
>
Jan 4 '08 #4

Jon Skeet [C# MVP]
P: n/a
Jon Skeet [C# MVP]
Jono <Jono@discussions.microsoft.comwrote:
Here's my build options screen
http://img.photobucket.com/albums/v2...008options.jpg
>
Here's my about box
http://img.photobucket.com/albums/v210/retrad/about.jpg
>
I downloaded the VS Offline Install from here
http://www.microsoft.com/express/download/default.aspx
>
I'm using Windows XP 64bit edition
>
I installed the Visual C# and DirectX SDK (Nov 07) and am getting a not a
win32 application exception, but there's a post on here from about last week
saying I need to change my target platform option to x86 to do that kinda
stuff however... I can't. The help gives me a command line option to specify
the platform, but then goes on to say that this option is not valid inside
the IDE.
Hmm. My guess is that it's something which the Express edition doesn't
allow, but that's only a guess.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Jan 4 '08 #5

=?Utf-8?B?Sm9ubw==?=
P: n/a
=?Utf-8?B?Sm9ubw==?=
oh, i mean the command line parameter is not a valid option, it goes on to
say to use the options screen to change the target platform...

i guess i gotta get a virtual machine loaded somewhere and do my development
on there, which is really annoying

"Jon Skeet [C# MVP]" wrote:
Jono <Jono@discussions.microsoft.comwrote:
Here's my build options screen
http://img.photobucket.com/albums/v2...008options.jpg

Here's my about box
http://img.photobucket.com/albums/v210/retrad/about.jpg

I downloaded the VS Offline Install from here
http://www.microsoft.com/express/download/default.aspx

I'm using Windows XP 64bit edition

I installed the Visual C# and DirectX SDK (Nov 07) and am getting a not a
win32 application exception, but there's a post on here from about last week
saying I need to change my target platform option to x86 to do that kinda
stuff however... I can't. The help gives me a command line option to specify
the platform, but then goes on to say that this option is not valid inside
the IDE.
>
Hmm. My guess is that it's something which the Express edition doesn't
allow, but that's only a guess.
>
--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
>
Jan 4 '08 #6

Jon Skeet [C# MVP]
P: n/a
Jon Skeet [C# MVP]
Jono <Jono@discussions.microsoft.comwrote:
oh, i mean the command line parameter is not a valid option, it goes on to
say to use the options screen to change the target platform...
>
i guess i gotta get a virtual machine loaded somewhere and do my development
on there, which is really annoying
You may be able to put it in the project (.csproj) file, even if you
can't access it in the UI.

For instance, find a section like the one below, and include the
<PlatformTargetelement (which won't currently be there, I suspect):

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>

I *hope* this would work...

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Jan 4 '08 #7

=?Utf-8?B?Sm9ubw==?=
P: n/a
=?Utf-8?B?Sm9ubw==?=


"Jon Skeet [C# MVP]" wrote:
You may be able to put it in the project (.csproj) file, even if you
can't access it in the UI.
>
For instance, find a section like the one below, and include the
<PlatformTargetelement (which won't currently be there, I suspect):
>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
>
I *hope* this would work...
>
--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
>
Thanks Jon, worked like a charm
Jan 4 '08 #8

Karl Mitschke
P: n/a
Karl Mitschke
Hello Jono,
I've developing on xp64, and from a couple other topics I'm supposed
to change my target platform to X86 if i wanna do some specific 32bit
stuff.
>
However, the option is supposed to be in Project properties - build
tab... but it's not there, where did it go? Do I have to do something
specific to my project for it to show?
>
Thanks
Juno;

AFAIK, you cannot target 64bit with the express editions, so there is no
need for an option for x86.

Karl


Jan 8 '08 #9

Willy Denoyette [MVP]
P: n/a
Willy Denoyette [MVP]
"Karl Mitschke" <kmitschke@somestate.govwrote in message
news:7063857f21ea88ca202a28d73601@msnews.microsoft .com...
Hello Jono,
>
>I've developing on xp64, and from a couple other topics I'm supposed
>to change my target platform to X86 if i wanna do some specific 32bit
>stuff.
>>
>However, the option is supposed to be in Project properties - build
>tab... but it's not there, where did it go? Do I have to do something
>specific to my project for it to show?
>>
>Thanks
>
Juno;
>
AFAIK, you cannot target 64bit with the express editions, so there is no
need for an option for x86.
>
Karl

Unfortunately, the default target for a C# project is MSIL (AnyCPU) , which
means it will run as 64-bit on a 64-bit OS.
This is particularly bad, as you can't load a 32-bit DLL in a 64-bit
process, which is what the OP is trying to do.
Choosing MSIL as default target was a big mistake, the default target
should have been X86, which is valid for +99% of the systems targeting the
CLR.

Willy.



Jan 8 '08 #10

Post your reply

Help answer this question



Didn't find the answer to your C# / C Sharp question?

You can also browse similar questions: C# / C Sharp