How do I target .NET 4.0.3 on XP using Visual Studio 2012? Application fails to run with “not a valid Win32 application”

前端 未结 6 1409
庸人自扰
庸人自扰 2020-12-14 17:54

I have a large application targeting .NET 4.0.3 that needs to run on XP. It builds fine using Visual Studio 2010 SP1 and runs properly on XP.

Building using Visual S

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-14 18:36

    It's possible to set the target system requirements under the Project Properties -> Publish -> Prerequisites panel (VS2012 with Update 1). Even though you're building for .NET 4 (Project Properties -> Application -> Target Framework) you'll need to change the prerequisites from 4.5 to 4 as it wont drop the requirements automatically.

    Building with a target of 4 but prereq of 4.5 will start the installer but fail on system checks

提交回复
热议问题