Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Visual Studio 2012 VB.NET program that will run on XP as Win32 app

Posted on 2012-12-27
6
3,675 Views
Last Modified: 2013-01-02
Hi Experts,

I have developed an app in VB.NET using Visual Studio 2012 Professional.  It runs fine from my Win7 x64 laptop (where it was developed) talking to SQL2005 on a Win2003 server.  It also runs fine when installed on the production Win2008 server running SQL2008.  However, it now needs to be installed on some WinXP client PC's for connection to the SQL2008 on Win2008 server.  Therein lies the problem.  

I am not "publishing" the app, but rather just copying the project \bin folder containing the .exe and other files.  When I do this on an XP box, I always get an error "<progname> is not a valid win32 application".  We have tried several different XP machines with no luck.  

I found some articles referring to a utility called dumpbin.exe, but none of the four versions I found on my laptop will run on XP (yep, not a valid win32 app).  

I have tried to research this on Experts-Exchange and Google, but have not come up with much.  The ability to target XP with your executable seems to have been removed by Microsoft in VS2012, but then added back if you work in C#.  But I use VB.  I did find the place in my project properties where you select target CPU and experimented with different settings.  The choices are "any cpu", "x86" or "x64", and there is also a checkbox for "Prefer 32-bit", but no winning combination to have it actually run on XP.

I am concerned that I will need to redevelop my project in an earlier version of Visual Studio, or perhaps even develop it on an XP platform.  I can get resources to do that if necessary, but don't want to give up just yet.

I use just a fraction (but growing) of the capabilities of Visual Studio 2012, but am not sure exactly where to go from here.  I almost always get the answers I need from searching EE, but not so this time.  Perhaps I'm closer to the cutting edge than usual.

Thanks in advance for all suggestions and help!
0
Comment
Question by:tomwalker1949
6 Comments
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 100 total points
ID: 38726203
With .NET, you don't target a version of Windows; rather you target a version of the Framework. Is the .NET Framework installed on the machines you are trying to run this application on? You need whichever version you targeted in your application to be installed on the target machine.

Windows 7 comes with .NET pre-installed, and Visual Studio will install a couple of versions during setup, so this is probably why you had no trouble on Win 7.
0
 
LVL 9

Assisted Solution

by:sognoct
sognoct earned 100 total points
ID: 38726371
I'm looking on ms site :
http://www.microsoft.com/visualstudio/eng/products/compatibility

vs 2012 is fully compatible with xp
just need to install  framework 4

framework 4.0
0
 
LVL 1

Assisted Solution

by:igordevelop
igordevelop earned 100 total points
ID: 38726487
Hi,

You just need to install .net framework 4.0 on your XP machine.
Your project is created in VS 2012 which runs on 4.0 and your XP machine probably doesn't has it. Different frameworks situation is a conflict.

Let me know if anything.

Regards,
Igor
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 70

Accepted Solution

by:
Éric Moreau earned 200 total points
ID: 38727286
if you created a brand new project with VS2012, you are surely targeting the .Net Framework 4.5 which cannot run on XP (as per http://msdn.microsoft.com/en-us/library/8z6watww.aspx).

You will need to open the properties of your project and target 4.0 or lower.
0
 

Author Comment

by:tomwalker1949
ID: 38735539
Sorry for dropping off the radar for the holiday -- good suggestions, all.  I will be onsite where they are trying to implement the project tomorrow morning -- I'll install .NET Framework 4 on the XP clients, recompile the program to target that environment, and give a report later tomorrow.  Thanks!
0
 

Author Comment

by:tomwalker1949
ID: 38738801
Sure enough, VS2012 defaults to .NET 4.5 which will not run on XP.  I re-targeted my project to .NET Framework 4, re-did the project build to get a new executable, made sure that the XP box had .NET 4 installed, and poof ... everything worked.  You guys are awesome -- thanks!
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question