简体   繁体   中英

How should I migrate my managed DirectX programs to Windows 7?

Recently I got a new PC with Windows 7 and installed C# 2010 Express. I have a LOT of software I wrote on my Vista machine in C# 2008 Express. When I tried to migrate the managed D3D apps to 2010, they all crashed on run with an error "is not a valid Win32 application." and after some troubleshooting I learned it's because MS no longer supports managed DirectX. What a drag. So it looks like I'll have to rewrite a ton of code to use one of the following alternatives:

*XNA
*Direct3D 10/11 API (like you would use in VC++)
*OpenGL
*Some other option, like maybe SlimDX

I'm looking for a solution that is:
*Backwards-compatible (ie, Vista and XP)
*Forwards compatible (I don't want to learn a new system just to have to drop it and learn another one in a year)
*OO-friendly -- I have thousands of lines of code to rewrite. I don't have a problem writing unmanaged code, but a similar OO solution would probably reduce the porting time.

I can't be the first person to run into this issue. What are some solutions other people found?

My guess would be that your applications are built as AnyCPU, referencing x86 assemblies, but your Win7 machine is x64. Building your applications as x86 might solve the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM