大厦C#为Windows 7 32位平台上的Windows 7 64位机 [英] Building C# for Windows 7 32 bit platform on Windows 7 64 bit machine

查看:281
本文介绍了大厦C#为Windows 7 32位平台上的Windows 7 64位机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请告诉我打造的设置安装了Windows窗体应用程序来安装并运行Windows 7的32位计算机上正确的方法,使用Visual Studio 2010在Windows 7 64位计算机上?

Whats the correct way to build the setup installers for a Windows Forms app to install and run on a Windows 7 32 bit machine, using Visual Studio 2010 on a Windows 7 64 bit machine ?

我刚刚刷去灰尘,一个3YR老Visual Studio 2008中的应用,建立在Windows XP中,使用SQL防爆preSS 2005年。

I've just brushed the dust off a 3yr old Visual Studio 2008 app, built on Windows XP, using SQL Express 2005.

我已经更新到Visual Studio 2010,SQL防爆preSS 2008年,并重建它在Windows 7 64位计算机上。它需要在Windows 7 32位平台上运行。

I've updated it to VS2010, SQL Express 2008, and rebuilt it on a Windows 7 64 bit machine. It needs to run on a Windows 7 32 bit platform.

安装项目数据库一直没有运行时(在启动时),他说,其只对在x64机器。 (该设置的应用程序运行正常并安装。)

The setup project for database keeps failing (on startup) when run, saying its only for an x64 machine. (The setup for the app runs ok and installs.)

我已经通过在解决方案中的每个项目,并设置它来建立使用86(而不是任何CPU)。我已经删除了所有preRequisites。唯一犯罪嫌疑人留在有一个DB CustomAction项目(运行数据库脚本)。

I've been through every project in the solution and set it to build using x86 (as opposed to Any CPU). I've removed all PreRequisites. The only thing suspect left in there is a DB CustomAction project (which runs the db scripts).

从谷歌搜索在我看来,与任何CPU生成64位计算机上,意味着它应该产生将通过WOW运行32位计算机上安装文件?而无需使所有更改我一直都在做什么?我失去了一些东西bleedingly明显?

From googling it seems to me building on a 64 bit machine with 'Any CPU', means it should produce setup files that will run on a 32 bit machine via WOW ? and without having to make all the changes Ive been making ? Am I missing something bleedingly obvious ?

感谢。

推荐答案

我一直觉得对面的同样的问题我有一个从未有过的决议发布的帖子令人沮丧的到来。所以我会后我在案例中发现它,甚至一些,如果它是利用他人的一天。我发现了很多其他开发商报告的漫无目的的Windows 7程序已停止工作消息。

I always find it frustrating coming across posts of the same question I have that never had a resolution posted. So I'll post what I found in case it, or even some if it, is of use to others one day. I found a lot of other developers reporting the aimless Windows 7 program 'has stopped working' message.

顺便说一句,我发现,测试部署应用程序最简单的方法和安装是建立一个虚拟PC机相同的配置,该平台将最终运行。然后复制的复制虚拟PC,并试运行。这样一来,我可以删除该副本在任何时间,从原来的再复制,并开始了,很快。

By the way, I found the easiest way to test deploying the app and the installers was to build a Virtual PC machine with the same configuration as the platform will eventually run on. Then copy that Virtual PC, and test run on the copy. That way, I can just delete the copy at any time, recopy from the original and start over, quickly.

是的,科斯明表示,该解决方案的TargetPlatform属性也需要设置为86。无论如何,didnt解决这个问题,应用程序仍所产生的已停止工作消息。

Yes, as Cosmin said, the TargetPlatform Property of the solution also needs setting to x86. Anyway, didnt fix the the problem, the app still produced the 'has stopped working' message.

接下来,我检查了SQL日志错误日志文件(C:\ Program Files文件\ Microsoft SQL Server的\ MSSQL10.SQLEx preSS \ MSSQL \ Log),但它是报告应用程序试图使用混合模式身份验证登录,而SQL设置为Windows Authenication。现在我知道我选择混合模式,当我安装了SQL防爆preSS,因为我的应用程序使用它我的数据库安装程序创建的帐户为SQL服务帐户。所以,在某种程度上,是由一些改变(不知道是什么?)。要通过SQL Server Management Studio中设置为混合模式,你只需右键单击该实例,选择安全,并更改服务器身份验证。如果没有Management Studio中,您需要编辑注册表HKEY_LOCAL_MACHINE /软件/微软/ Microsoft SQL Server的//的MSSQLServer,和编辑键LoginMode = 2的混合。再次,didnt解决问题,应用程序仍所产生的已停止工作消息。

Next I checked the SQL logs ERRORLOG file (c:\Program Files\Microsoft SQL Server\MSSQL10.SQLExpress\MSSQL\Log) and it was reporting the app was trying to logon using Mixed Mode authentication, whereas SQL was set for Windows Authenication. Now I KNOW I selected Mixed mode when I installed SQL Express, as my app uses a sql service account which my db installer creates the account for. So somehow that was changed by something (dont know what?). To set to Mixed mode via SQL Server Management Studio you just right click on the instance, select Security, and change Server Authentication. Without Management Studio, you need to edit the registry HKEY_LOCAL_MACHINE/Software/Microsoft/Microsoft SQL Server//MSSQLServer, and edit key LoginMode = 2 for Mixed. Once again, didnt fix the problem, the app still produced the 'has stopped working' message.

接下来,一个偶然的机会我遇到了一些帖子偶然发现有关此消息可以在启动过程中加载在Windows 7上我把提示消息框32位应用程序引起的,并尝试/抓的第一行我可以,他们从来没有得到显示,而被抓没有错误。

Next, by chance I stumbled across some posts about this message can be caused during startup by loading 32 bit apps on Windows 7. I put MessageBoxes, and Try/Catchs on the first lines I could, and they never got displayed, and no error was caught.

接下来的事情我想是到了我的exe文件运行DependencyWalker。据报道2×32位的文件丢失:IEShims.dll和GPSVC.​​dll。还有来自其他开发者的职位遇到此,而最终的结果是我发现他们在C:\ WINDOWS \ winsxs文件(GPSVC.​​dll被称为x86_microsoft-windows-g..licy-base.resources_31bf3856ad364e35_6.1.7600.16385_en-us_c10af1bed239c523_gpsvc.dll.mui_0c160ac2).我放弃了他们为C:\ Windows \ System32下,重新编译我的应用程序,其部署到我的测试机,它终于跑了

The next thing I tried was to run DependencyWalker over my exe. It reported 2 x 32 bit files missing: IEShims.dll and GPSVC.dll. There are posts from other devs encountering this, and the end result was I found them in C:\Windows\winsxs (GPSVC.dll was called x86_microsoft-windows-g..licy-base.resources_31bf3856ad364e35_6.1.7600.16385_en-us_c10af1bed239c523_gpsvc.dll.mui_0c160ac2). I dropped them into C:\Windows\System32, recompiled my app, deployed it to my test machine, and it finally ran !

还有不明白为什么只是把它们到System32目录我开发中所做的试验机上的应用程序运行?但无论如何,它解决了这一问题,并希望这是帮助别人。

Still dont understand why just putting them into the System32 dir on my dev box made the app run on the test machine ? But anyway, it fixed the problem, and hope this is of help to others.

这篇关于大厦C#为Windows 7 32位平台上的Windows 7 64位机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆