2

Ok, I'm in a world of pain at the moment.

We'd been developing with VS2008 (VB.NET, mostly WinForms, also ASP.NET and Windows services) on Win7 x64, with specific requirements (that we can't get rid of yet), to target x86 and framework 3.5.

We recently upgraded to VS2010, and quite soon, fell foul of this ResGen.exe incompatibility issue. Basically, we can't compile the WinForms app at all with VS2010. None of the workarounds suggested by Microsoft or others have worked for either myself or the other member of my team.

So we attempted to revert to VS2008 using the technique described here (ie hack the solution file), and also by creating a brand new VS2008 solution, and adding the projects to it. This seemed fine for a short while, but now we discover that when debugging the application, unhandled exceptions are not caught in the IDE, which makes development virtually impossible.

A brand new test application created with VS2008 (compiled for x86 and .NET 3.5) does not exhibit this failure to catch exceptions.

I've had to resort to developing on VS2010 on a Win7 (32 bit) VM inside the main computer for now, and it does work... but it's slowwwwwwww!

Any ideas for a way out of this would be gratefully appreciated!!

Update:

Ok, so it's not an actual solution, but as a workaround it's not a complete disaster...

Thanks to Noah for his comment, which prompted me to explore the various virtualisation solutions around. I've now discovered (probably the last person here!) VirtualBox. Not only is it quite a bit slicker in use than VMWare Player and the various incarnations of Microsoft/Windows Virtual PC, it also has Seamless mode, where apps running on the VM appear as separate windows in the host. So I now have an x86 guest running VS2010, compiling for x86 and Framework 3.5. Since there's no x64/x86 conflict in the guest, there's no Resgen.exe problem, and my dev envt just appears as a window on my host desktop. It's still slower than running it natively would be, but I can live with it for now.

Would still appreciate any actual solutions (or, failing that, a fix from Microsoft!!)

Community
  • 1
  • 1
ChrisA
  • 4,163
  • 5
  • 28
  • 44
  • It isn't a fix for your issue, but there are a few things you can try to make VS2010 faster on a VM. In Tools->Options->Environment->General, make sure "Enable rich client visual experience" and "Use hardware graphics acceleration if available" are off. – Noah Richards Oct 14 '10 at 17:06

2 Answers2

0

Well I gave up.

VirtualBox was Ok for a while, but the slowness of the VM was annoying, and forever having to manage moving stuff between the host and guest was driving me crazy.

So I've rebuilt the whole machine with Windows 7 x86.

Completely disgusted with Microsoft's apparent indifference to the problem, but I guess I'm not the first to feel that.

ChrisA
  • 4,163
  • 5
  • 28
  • 44
0

You can just make Make ResGen.exe 32-bit by: 1. Cd “%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.0A\Bin” 2. Corflags /32Bit+ /Force ResGen.exe

Save your previous resgen.exe before this change.

After this change you would need to modify all of your projects to tell Resgen to run in 32bitmanaged mode

  1. Adding Managed32Bit to a PropertyGroup in the project file of any project that generates resources targeting .NET 3.5 – since the corflags trick affects the bitness of ResGen.exe on a system-wide level, the property must be set for all affected projects as well.

  2. OR If running MSBuild.exe directly, passing it using the global property switch: ‘/p:ResGenToolArchitecture=Managed32Bit’

The solution is posted at http://tune-up-pc.com/blog/?p=10790

ssingh3
  • 125
  • 1
  • 8
  • Well yes. Two of us had a go (independently) at implementing this workaround, which is documented in a number of places. It didn't seem to work for either of us. I'm not ruling out the possibility that we did something wrong, but as you see in my (non-)answer, I've reverted to Win7 x86 now. Thanks though. I'd quite like to go back to x64 sometime, so maybe I'll have a go at the workaround with a VM. – ChrisA Apr 16 '11 at 19:09
  • Well..i ran into the same issue and this solution has been working for me ever since – ssingh3 Jun 13 '11 at 06:35