Link to home
Start Free TrialLog in
Avatar of tomwalker1949
tomwalker1949Flag for United States of America

asked on

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

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!
SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tomwalker1949

ASKER

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!
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!