Locations of visitors to this page


Onteora Software - 64 bit

Onteora Software

Ken Tucker's Blog

About the author

Author Name is someone.
E-mail me Send mail

Recent posts

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Changing the target cpu in VB express 2008

When you are running a VB express 2008 on a 64 bit operating system there are times you need to compile the app as a 32bit.   One example is if you need to open an access database.  There is not a 64 bit version of jet. To force your app to use the 32 bit version you need to compile the app for the x86 version of the framework.

 

Unfortunately there is no built in way to change the target cpu in VB express 2008.  Your best bet is get a copy of Visual studio but if this is not an option you can change it with notepad.  Make sure you back up your applications project file before you make any changes.

 

Open up Notepad and open the YourProject.vbproj and you will find a section like this

 

 

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
  <DebugSymbols>true</DebugSymbols>
  <DebugType>full</DebugType>
  <DefineDebug>true</DefineDebug>
  <DefineTrace>true</DefineTrace>
  <OutputPath>bin\Debug\</OutputPath>
  <DocumentationFile>LinqToDataSet.xml</DocumentationFile>
  <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
  <DebugType>pdbonly</DebugType>
  <DefineDebug>false</DefineDebug>
  <DefineTrace>true</DefineTrace>
  <Optimize>true</Optimize>
  <OutputPath>bin\Release\</OutputPath>
  <DocumentationFile>LinqToDataSet.xml</DocumentationFile>
  <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>

To change the target cpu add

<PlatformTarget>x86</PlatformTarget>

just before </PropertyGroup> in the Debug and Release sections

It should look like this when done

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <DebugSymbols>true</DebugSymbols>
   <DebugType>full</DebugType>
   <DefineDebug>true</DefineDebug>
   <DefineTrace>true</DefineTrace>
   <OutputPath>bin\Debug\</OutputPath>
   <DocumentationFile>LinqGroupBy.xml</DocumentationFile>
   <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
   <PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
   <DebugType>pdbonly</DebugType>
   <DefineDebug>false</DefineDebug>
   <DefineTrace>true</DefineTrace>
   <Optimize>true</Optimize>
   <OutputPath>bin\Release\</OutputPath>
   <DocumentationFile>LinqGroupBy.xml</DocumentationFile>
   <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
   <PlatformTarget>x86</PlatformTarget>
</PropertyGroup>

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: VB | 64 bit
Posted by Ken Tucker on Friday, December 07, 2007 5:35 AM
Permalink | Comments (2) | Post RSSRSS comment feed