VB Express target x86 Platform?
-
Sunday, February 25, 2007 8:44 PMI need to target the X86 platorm to use quartz.dll and directshow filters in the syswow64 folder of my XP X64 system. If I start a project in VB5 and then upgrade to VB Express, I get "Configuration:" and "Platform: drop down list boxes. If I start a project in VB Express, I don't get these boxes. How can I get to choose platforms in VB Express?
Answers
-
Saturday, December 19, 2009 2:49 PM
To target x86 in the express editions:
Tools --> Options --> Projects and Solutions-->General Check "Show advanced build configurations"
If "Configuration Manager" doesn't show on the Buid menu, add it and click it.
Active Solution Platform --> New --> Type or select the new platform x86- Marked As Answer by JohnWeinMicrosoft Community Contributor Saturday, December 19, 2009 2:50 PM
All Replies
-
Sunday, February 25, 2007 9:06 PMModerator
You can add a <PlatformTarget>x86</PlatformTarget> property in your .vbproj file.
See http://msdn2.microsoft.com/en-gb/vstudio/aa718685.aspx for more info.
Best regards,
Johan Stenberg- Unmarked As Answer by JohnWeinMicrosoft Community Contributor Saturday, December 19, 2009 2:43 PM
-
Sunday, February 25, 2007 11:20 PM
Quite a document. Here's the answer to my question:
1.44 References to 32-bit COM components may not work in VB and C# Applications running on 64-bit platforms
Most existing COM components are only available for 32-bit platforms and will not run in a 64-bit process on a 64-bit platform (although they will run correctly in a 32-bit process on a 64-bit platform). VB and C# applications that reference these 32bit COM components will not run by default on a 64-bit platform because by default the application will launch as a 64-bit process.
The problem appears when a project with one or more COM references is:
1. Migrated to Visual Studio 2005 and executed on 64-bit platforms-or-
2. Created using Visual Studio 2005 on 64-bit platforms.
In Visual Studio 2005, the VB and C# compilers use the platform target property to determine if the.exe or .dll should run in 32-bit or 64-bit CPU architecture mode. The default setting for this property in Visual Studio 2005 is set to 'AnyCPU', which indicates that the application can run in either 32-bit or 64-bit mode, depending on the host platform. In this situation you may see a message such as "Cannot instantiate class..." when you debug or run these applications.To resolve this issue
Set the platform target property to 'X86' for your VB or C# projects that have references to COM components.
For C# Projects:
1. Right click the project in the solution explorer and open 'properties'
2. Choose the Build tab
3. Set the Platform Target property to 'X86'
For VB Projects:
1. Right click the project in the solution explorer and open 'properties'
2. Choose the Compile tab
3. Press the Advanced Compile Options... button
4. Set the Target CPU property to 'X86'
Express Editions:
The VB and C# Express products do not expose the Target property inside the development environment. You will need to carefully modify the project file using a text or XML editor.
1. Close the project and/or solution
2. Select Open File from the File menu
3. Navigate to the project directory, and highlight the project file
4. Press the Open button, the project file should open in the XML editor
5. Locate the first <PropertyGroup> section and add the following line:
<PlatformTarget>x86</PlatformTarget>
1. Save the project file
2. Reopen the project and/or solution using Open Project/Solution from the File menu
3. Continue with development, debugging, and testing
Alternatively, if the application is targeted to 64-bit platforms, you can ensure that the COM controls added to the application have 64-bit equivalents on the development and deployment computers.JohnWein added the following:
Using the above method targets the x86 platform, but it doesn't show the "Configuration:" and "Platform: " boxes on the Properties tabs. To get this feature, I made a template of one of the projects that shows these boxes. Now I can target a platform and know what platform I have targeted.
- Proposed As Answer by Michael Key Monday, May 10, 2010 7:54 AM
- Unproposed As Answer by JohnWeinMicrosoft Community Contributor Monday, May 10, 2010 8:01 AM
- Proposed As Answer by TmOHaR Wednesday, October 19, 2011 10:42 AM
-
Thursday, July 31, 2008 3:01 PM
I followed the steps in this doc on VB 2008 Express and I still get class not found errors on Vista 64. The error occurs when I try and call qbsession manager from the QB SDK 6 or 7. All of Intuits people say its because of the platforn target issue but that has been corrected and I still get it. I know it is a 32bit lib but I thought I should stll be able to use it on Vista 64 as long as I followed this procedure.
If you install the QBSDK, and run AddCustomer Sample from the VB.net samples section you can reproduce the error.
-
Friday, August 01, 2008 12:21 AMCCiecka said:
I followed the steps in this doc on VB 2008 Express and I still get class not found errors on Vista 64. The error occurs when I try and call qbsession manager from the QB SDK 6 or 7. All of Intuits people say its because of the platforn target issue but that has been corrected and I still get it. I know it is a 32bit lib but I thought I should stll be able to use it on Vista 64 as long as I followed this procedure.
If you install the QBSDK, and run AddCustomer Sample from the VB.net samples section you can reproduce the error.
Hi,Eh? Are you mixing Quick Basic SDK elements into VB.Net ?Regards,John
I have previously been, until recently, an MSP ( Microsoft Student Partner ). -
Sunday, April 26, 2009 12:03 PMwhat do i have to do if i want to change target platform under visual c++ 2008 express edition ?
i have a problem connected with importing a function from 32bit dll to a 64 bit application (described here: http://msdn.microsoft.com/en-us/library/k7137bfe(VS.80).aspx)
frankly, I shouldnt have had this error at all because visual c++ express is not compiling for x64 by default -
Saturday, December 19, 2009 11:47 AM
Express Editions:
The VB and C# Express products do not expose the Target property inside the development environment. You will need to carefully modify the project file using a text or XML editor.
1. Close the project and/or solution
2. Select Open File from the File menu
3. Navigate to the project directory, and highlight the project file
4. Press the Open button, the project file should open in the XML editor
5. Locate the first <PropertyGroup> section and add the following line:
<PlatformTarget>x86</PlatformTarget>
1. Save the project file
2. Reopen the project and/or solution using Open Project/Solution from the File menu
3. Continue with development, debugging, and testing
I want to run my Application on 64 bit, home edition of Windows 7(I am using the Jet database).
will your solution above help my situation? I think WOW64 cannot be used on the Home Edition of Win7.
any help on this issue would be appreciated.
When I opened the project file as stated above, I get this error message. what do I do now?
Warning 1 The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'ApplicationManifest' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Property' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. C:\64bitMits\MITS 2008.vbproj 21 6 Miscellaneous Files
I did find this in the file:<
PropertyGroup>
<
Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<
Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<
ProductVersion>9.0.21022</ProductVersion>
-
Saturday, December 19, 2009 12:46 PM" I think WOW64 cannot be used on the Home Edition of Win7."
Are you sure you don't have a SysWOW64 directory?
This thread in not the correct way to Target X86 for the express editions. Search the express editions for "johnwein target x86" for more recent threads. The express editions can target x86 in their Configuration Managers in the IDE.- Marked As Answer by JohnWeinMicrosoft Community Contributor Saturday, December 19, 2009 2:47 PM
- Unmarked As Answer by JohnWeinMicrosoft Community Contributor Saturday, December 19, 2009 2:48 PM
-
Saturday, December 19, 2009 2:49 PM
To target x86 in the express editions:
Tools --> Options --> Projects and Solutions-->General Check "Show advanced build configurations"
If "Configuration Manager" doesn't show on the Buid menu, add it and click it.
Active Solution Platform --> New --> Type or select the new platform x86- Marked As Answer by JohnWeinMicrosoft Community Contributor Saturday, December 19, 2009 2:50 PM
-
Sunday, December 20, 2009 8:06 PM
Jet is not supported on 64 bit from what I have found out.- Proposed As Answer by Somay Monday, January 04, 2010 7:47 PM
-
Tuesday, January 05, 2010 12:22 AM
To target x86 in the express editions:
Tools --> Options --> Projects and Solutions-->General Check "Show advanced build configurations"
If "Configuration Manager" doesn't show on the Buid menu, add it and click it.
Active Solution Platform --> New --> Type or select the new platform x86
yes, i found that and now it works.
thanks- Proposed As Answer by RockinRon399 Tuesday, January 05, 2010 12:22 AM
-
Thursday, February 11, 2010 7:43 AMI know this is old but I just wanted to say brilliant, just brilliant, an answer I was actually able to find without having to ask, thanks a lot.
I know old but still I was just simply amazed.
Anyways, if it's so easy to change it, then I don't really know why it's not in the express versions to be able to see it and change it normally...?
It wouldn't make the download much bigger, <1 second more. and plus u can change it anyways, it seems odd why it's not in the express version. -
Friday, February 12, 2010 1:00 AMWhat is not in the express version??
-
Saturday, February 13, 2010 11:44 PMThe ability to change the target platform from within the program, u can do it by editing the file though in only a few seconds, so I don't know why the option is not accessible in the program itself in the express version.
-
Saturday, February 13, 2010 11:54 PMHuh? See my post in this thread. Microsoft felt that it would simplify use of their programming languages if they limited the advanced settings for novice users.
-
Monday, February 15, 2010 11:10 PMConsidering finding it is not so easy in the first place, even through the use of going through the UI for novice users, considering I am one, they are just stupid, most of the settings I have no earthly idea what they do anyways.
Anyways, no way to change to an advanced settings view in VB Express as well, so more than likely users are going to ____ things up rather than make it work by editing the file, like I did at first, and I didn't know how to fix it, so I had to copy the code over to a new project window and re-make the UI since the UI no longer worked after I manually edited the file. -
Wednesday, April 21, 2010 8:35 PM
You can also simply use MSBuild to compile the VBProj at the cmd line and pass the Platform=x86 property and that should help you avoid manually editing the VBProject file also.- Proposed As Answer by vs2010junkieMicrosoft Community Contributor Thursday, May 06, 2010 11:13 PM
-
Friday, May 07, 2010 3:13 AMActually that's not a good solution either, some people like the command line ____ & such but not me, it's the whole reason windows is not DOS related at all anymore, it's all done through GUI, it seems much better solution just to change the file manually. It's not hard after you do it once and if it was explained well enough the first time then I wouldn't have messed up, it took me 2 tries to get it right.
-
Monday, May 10, 2010 4:50 AMThank you Thank you, Thank you, I can't thank you enough
-
Monday, July 26, 2010 1:41 PM
It worked for me after checking the "Show advanced build configurations" checkbox and adding the PlatformTarget tag with its value set to x64. In this case the solution was created on a x86 platform using Visual Studio 2010 Express, while the assembly was supposed to be created on a x64 platform. using SQL Server 2008 Standard version.
A big thank you!
-
Sunday, September 26, 2010 9:45 AM
To add more on here in Visual Basic 2010 Express edition, you must go the extra steps to Tools>>Settings>>Expert Settings.
This will even allow the Build menu to appear in the first place, you must still enable through the options to show the advanced build configurations though as well, doing only Expert Settings or only Show Advanced Build Configurations alone will not make the option appear, you must have both options checked for the Build tab to appear & have the option available to you.
- Proposed As Answer by Michael Key Sunday, September 26, 2010 9:45 AM
-
Wednesday, November 24, 2010 9:33 PM
To target x86 in the express editions:
Tools --> Options --> Projects and Solutions-->General Check "Show advanced build configurations"
If "Configuration Manager" doesn't show on the Buid menu, add it and click it.
Active Solution Platform --> New --> Type or select the new platform x86U r just superb man.
Thaaaaaaaannnnnnnkkkks a lot for that solution i was trying to learn Directx coding & thank for relying .
-
Friday, December 10, 2010 12:27 AM
To target x86 in the express editions:
Tools --> Options --> Projects and Solutions-->General Check "Show advanced build configurations"
If "Configuration Manager" doesn't show on the Buid menu, add it and click it.
Active Solution Platform --> New --> Type or select the new platform x86
Thanks a lot John, just saved me from alopecia -
Friday, January 14, 2011 2:36 AMThank you very much! now i can try my Application in VB express 2008 :)
-
Saturday, March 26, 2011 4:22 AM
To add more on here in Visual Basic 2010 Express edition, you must go the extra steps to Tools>>Settings>>Expert Settings.
This will even allow the Build menu to appear in the first place, you must still enable through the options to show the advanced build configurations though as well, doing only Expert Settings or only Show Advanced Build Configurations alone will not make the option appear, you must have both options checked for the Build tab to appear & have the option available to you.
By implementing this suggestion I was able to see the "Configuration Manager" selection on the "Build" drop down.
· Tools --> Options --> Projects and Solutions-->General Check "Show advanced build configurations"
· Tools>>Settings>>Expert Settings.
· Active Solution Platform --> New --> Type or select the new platform x86
-
Thursday, June 23, 2011 10:08 AM
Hi guys,
I know the topic is old, however the issue is persistent. The problem is, though i followed all the instructions above, I'm not able to run a flash-ocx-having winform application on my Windows 7 x64.
Let me clarify>>
I programmed a winform app which uses flash ocx and runs just fine on x86 (32-bit) PCs and development machine without problems. As i'm using Visual Basic Express (2005), changing platform to x86 DID NOT help by going build->configuration manager->Platform->x86.
When i launch the x86 targeted flash-having app on win7 x64, i get "class not registered" exception.
I can run flash fine on 64-bit machine if they were developed on that 64-bit machine, as excepted and IE8 is able to show flash movies just fine using 32-bit flash ocx resides on SysWow64 folder.
What's up with that?
Any help is greatly appreciated!
Best regards, Saygılarımla, Onur Güzel
Yazgeliştir Forumları VB.NET / C# Süper Moderatorü.
Microsoft Haber Grupları Profilim (VB.NET) -
Thursday, June 23, 2011 2:34 PM
The latest version of flash is now 64-bit compatible, please try & make sure you didn't include the 64-bit version when you included flash into your project, if you run it in 64-bit & it works you will know you chose the wrong one, since both 32-bit & 64-bit have to be included seperately you can't include both due to the 64-bit not existing on 32-bit & need 2 different versions for 32-bit & 64-bit. Anyways just try running it in 32-bit mode & 64-bit mode & see if either works, you may only need to un-include the flash from the project & re-add the reference if it still doesn't work.
-
Thursday, June 23, 2011 4:29 PM
The latest version of flash is now 64-bit compatible, please try & make sure you didn't include the 64-bit version when you included flash into your project, if you run it in 64-bit & it works you will know you chose the wrong one, since both 32-bit & 64-bit have to be included seperately you can't include both due to the 64-bit not existing on 32-bit & need 2 different versions for 32-bit & 64-bit. Anyways just try running it in 32-bit mode & 64-bit mode & see if either works, you may only need to un-include the flash from the project & re-add the reference if it still doesn't work.
Hi Michael,
I don't get it. I have no 64-bit flash installed.The flash activeX on my 64-bit windows is 32-bit, hence it resides on SysWow64 like all 32-bit libraries and Internet Explorer runs flash movies fine using this 32-bit flash ocx. Regarding to my flash-embedded project, I set x86 as target platform on my 32-bit development machine using VB 2005 Express, but it still fails on x64 machine resulting 'class not registered' exception.
So there is no solution.
Why is that?
Best regards, Saygılarımla, Onur Güzel
Yazgeliştir Forumları VB.NET / C# Süper Moderatorü.
Microsoft Haber Grupları Profilim (VB.NET) -
Monday, December 12, 2011 10:48 AM
Hi ,
can you tell me where is this ? i am not getting .
If "Configuration Manager" doesn't show on the Buid menu, add it and click it.
Active Solution Platform --> New -->
Deepak -
Monday, December 12, 2011 6:08 PM
At the top do this.
Select "Tools" --> Go to "Settings" --> Check the "Expert Settings" button by clicking the words. --- The menu will dissappear & things will change to accomodate this.
Select "Tools" again. --> Click the "Options" button in that drop-down list. --- A new window should've appeared with lots of different things to pick from. --> In the window that has popped up, click "Projects and Solutions" from the menu on the left side of this window. --- On the right side with all the options that should've changed to something different if the correct tab wasn't already clicked on the left there are 3 textbox's with information on location's & textbox's below that. --- You need to focus on the checkbox's below, the 3rd one is the one your looking for. --> This checkbox, the 3rd one counting down from the top will say "Show advanced build configurations" needs to be checked, if it's already checked, then under the "Build" menu should already have an option for "Configuration Manager..." listed which is used to target x86, x64, or both(x86 on x86 machines, x64 only on x64 machines).
NOTE: To get the build menu to appear at all or the "Configuration Manager..." to appear you need to create a project/open one, it doesn't show up when no project is loaded.
The options needed to make the "Configration Manager..." tab appear however are there to change even before opening a project & after having opened one.
Shortened/Not Explained Version (of how to make the "Configuration Manager..." button appear under the "Build" menu.)
Tools --> Settings --> Expert Settings (First part done.)
Tools --> Options (New window appears.)
Projects and Solutions (Setting that we need to change appears.)
Show advanced build configurations (This option needs a checkbox by it. --- Second part done.)
Build --> Configuration Manager... (You are in the options you need for targeting x86, x64, or both x86 & x64 platforms.)
NOTE: x86 programs will run on x64 machines, most already do for compatibility with add-ons, drivers & anything else which may not have upgraded to 64-bit.
---As a side note here, you shouldn't usually need to target a certain platform, Windows Media Player, Internet Explorer, Flash & other things have a 64-bit equivalent it can use (the flash support for 64-bit is new).
The only thing I can think of at the moment without 64-bit support is silverlight.
- Edited by Michael Key Monday, December 12, 2011 6:08 PM
-
Tuesday, December 13, 2011 12:36 PMthanks you very much for this details.
Deepak -
Tuesday, December 20, 2011 5:02 PMThank you Michael, John and all others. Thank you.
Be a good forum member. Make this forum a great place to meet and interact with others around the world.
Helpful Links: -
Saturday, February 04, 2012 10:01 AM
Thanks so much. Expert Settings was the piece I was missing. Once I did that, it all fell into place.

