Visual Studio Express 2008 - Target Platform

  • Thread starter Thread starter Jono
  • Start date Start date
J

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
 
Jono said:
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?
 
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.
 
Here's my build options screen
http://img.photobucket.com/albums/v210/retrad/vcs2008options.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.
 
Jono said:
Here's my build options screen
http://img.photobucket.com/albums/v210/retrad/vcs2008options.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.
 
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
 
Jono said:
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
<PlatformTarget> element (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 said:
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
<PlatformTarget> element (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...

Thanks Jon, worked like a charm
 
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
 
Karl Mitschke said:
Hello Jono,


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.
 
And here's another gotcha. If you deploy using ClickOnce as "any cpu", and
then want to change it later, the automatic updates won't work -- the user
must deinstall and reinstall the application.

The reason for this is that the target platform is part of the manifest
identification.

So far, I haven't found a way around this, and I've been bitten big time by
it.

Our problem is that DirectX has to be targeted to 32-bit machines in order
to run on 64-bit machines. We have all of our DirectX stuff in a separate
project, marked as x86, but the main UI has to be targeted the same way in
order for it to run on a 64-bit machine. Argghhhhh.

RobinS.
GoldMail, Inc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top