有人设法让 Visual Studio 2003 在 Windows 7 上运行吗?

发布于 2024-07-19 11:00:12 字数 306 浏览 10 评论 0原文

是的,我知道...我可以设置一个运行 XP 的虚拟机。 不幸的是,我们的构建环境需要同时运行 VC2003、2005 和 2008,如果我可以在 Windows 7 上本机运行 2003,以用于我们需要它的少数项目,那就方便多了。

我意识到有些东西可能在 IDE 中不可用,但我能够在 Windows Vista 下运行 2003,如果我能在 Windows 7 下获得相同的基本功能级别,我将非常高兴。

现在,我在将 vc2003 切换到 XP SP 2 的兼容模式下以管理员身份运行后进行编译时,打开 *.pdb 文件时出错。

谢谢!

Yes, I know... I could set up a virtual machine running XP. Unfortunately our build environment is such that we need to be running VC2003, 2005 and 2008 concurrently and it would be much more convenient if I could run 2003 natively on Windows 7 for the few projects we have that require it.

I realize some things may not be available in the IDE, but I was able to run 2003 under windows Vista and if I could get the same base level of functionality under Windows 7 I would be extremely happy.

Right now I get an error opening the *.pdb file when I compile after switching vc2003 to run as Administrator under compatibility mode for XP SP 2.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(16

海之角 2024-07-26 11:00:12

如果您无法让它以本机方式运行,请尝试 XP 模式。

http://www.microsoft.com/windows/virtual-pc/download.aspx

Give XP Mode a try if you can't get it to run natively.

http://www.microsoft.com/windows/virtual-pc/download.aspx

留一抹残留的笑 2024-07-26 11:00:12

我写了一个 博客文章关于此不久前,您可以查看 - http://technikhil.wordpress.com/2010/01/12/visual-studio-2003-and-windows-7-can-get-along-真的/

我现在唯一困惑的是 VS 2003 的全局搜索功能 - 它挂起应用程序。 我的解决方法是使用 Windows 7 搜索:-)。 除此之外 - 到目前为止一切顺利...

更新:我通过禁用 Aero 功能也使搜索正常工作 - 我已经更新了我的 博客文章 详细信息...

I wrote a blog entry about this a while back that you can check out - http://technikhil.wordpress.com/2010/01/12/visual-studio-2003-and-windows-7-can-get-along-really/

The only thing I am stuck on right now is the global search functionality of VS 2003 - it hangs the application. My workaround is to use windows 7 search :-). Other than that - so far so good...

Update: I got the search to work as well by disabling the Aero functionality - I have updated my blog post with the details...

不再让梦枯萎 2024-07-26 11:00:12

(其中大部分重复了上面已经写过的内容。)

我需要在 Win7 64 位下以管理员身份运行 VS2003,以支持旧项目(例如在原始 Xbox 上运行的项目)。 旧的XDK需要VS2003,所以升级不是一个选择。 我可以运行WinXP,但我更喜欢Win7。

Win7 下并未正式支持 VS2003,尝试这样做会产生一些相当烦人的问题:

在文件中查找导致 VS2003 挂起。
由于 PDB 文件句柄泄漏,链接失败。
通过使用“禁用视觉主题”可以解决“在文件中查找”挂起的问题。 导航到 VS2003 快捷方式(“开始”-->“Microsoft Visual Studio .NET 2003”),右键单击以获取上下文菜单,选择“兼容性”选项卡、“设置”窗格,然后选中“禁用视觉主题”。

当您通过调试器运行程序、停止它、修改文件并构建时,会发生链接器故障 (LNK1201)。 错误是 Visual Studio 持有 PDB 文件的句柄,而链接器尝试写入该文件。 您可以停止并重新启动 VS2003 来绕过该问题。 有效但很烦人。

您还可以使用 Microsoft SysInternals“handle.exe”实用程序查找并关闭特定文件上进程所持有的句柄。 编写一个脚本来调用handle.exe,并设置VS2003 项目以将该脚本作为预构建事件运行。 (请参阅此帖子。 )但是handle.exe需要以管理员身份运行。

假设您可以使用通常的步骤(例如作为兼容性设置)将handle.exe更改为以管理员身份运行,但随后handle.exe(显然)在嵌套shell中运行,然后标准输出文本不会到达调用脚本。

您可以使 VS2003 以管理员身份运行,在这种情况下,预构建脚本也以管理员身份运行,因此会执行handle.exe,并且可以正常工作。

剩下的技巧是让 VS2003 SLN 文件正确打开。 如果您只是让 VS2003 自动以管理员身份运行,那么 VS 版本选择器将无法运行 VS2003。 我不知道为什么,但事实就是如此。

您可以关联 SLN 文件以使用 VS2003 devenv.exe 而不是 VSLauncher.exe 打开。 这可行,但所有新的 SLN 文件(2005、2008、2010、2012...)都无法打开。

所以最后一步是让 VSLauncher.exe 以管理员身份运行。 从 KB2492386 开始,此操作失败 此线程表示。 卸载该更新是这个传奇的最后一步,让一切正常工作。

(Much of this repeats what's already been written above.)

I need to run VS2003 as adminstrator under Win7 64-bit, to support legacy projects (e.g. those that run on the original Xbox). The old XDK requires VS2003, so upgrading is not an option. I could run WinXP but I prefer Win7.

VS2003 is not officially supported under Win7 and trying to do so creates a couple of fairly annoying problems:

Find-in-files causes VS2003 to hang.
Linking fails due to a PDB file handle leak.
The Find-in-files hang is solved by using "Disable visual themes". Navigate to the VS2003 shortcut (Start-->Microsoft Visual Studio .NET 2003), right-click to get context menu, select Compatibility tab, Settings pane, and check "Disable visual themes".

The linker failure (LNK1201) happens when you run the program through the debugger, stop it, modify a file and build. The error is that a Visual Studio hold a handle to the PDB file, while the linker tries to write to that file. You can stop and restart VS2003 to bypass the issue. Works but is annoying.

You can also use the Microsoft SysInternals "handle.exe" utility to find, then close handles held by a process on a particular file. Write a script to call handle.exe and set up the VS2003 project to run that script as a Pre-Build Event. (See this thread.) But handle.exe requires running as admin.

You could hypothetically change handle.exe to run as admin using the usual steps (e.g. as a compatibility setting) but then handle.exe (apparently) runs in a nested shell, and then the stdout text does not get to the calling script.

You can make VS2003 run as admin, in which case the Pre-Build script also runs as admin, hence does handle.exe, and that works.

The remaining trick is to get VS2003 SLN files to open properly. If you simply make VS2003 run as admin automatically then the VS version selector fails to run VS2003. I don't know why, but it is the case.

You could associate SLN files to open using VS2003 devenv.exe instead of VSLauncher.exe. That works but then all new SLN files (2005, 2008, 2010, 2012, ...) fail to open.

So the final step then is to make VSLauncher.exe run as admin. This fails as of KB2492386 as this thread indicates. Uninstalling that update was the final step in this saga, to get everything to work.

夕嗳→ 2024-07-26 11:00:12

补丁现已推出
经过一些逆向工程,我发现错误的引用计数 COM 对象导致了泄漏(它减少了 1),并开发了一个稳定的补丁和相应的描述修复的文章。 这解决了使用 Windows 7 到 Windows 10 时遇到的问题。详细信息和下载可从以下位置获取:


http://bytepointer.com/articles/vs7.1_2003_on_win7_pdb_handle_leak_bug_unofficial_fix.htm

如果您想手动执行补丁,这些详细信息也包括在内。

注意:SysInternals Handle 工具解决方法不适用于网络共享上的文件。 尽管 Handle 工具声称 .PDB 已关闭,但 .PDB 并未完全解锁。 我的修复方法一劳永逸地消除了问题,并避免了任何副作用。

PATCH NOW AVAILABLE
After some reverse-engineering, I found the incorrectly refcounted COM object responsible for the leak (it was off by 1) and developed a stable patch and corresponding article describing the fix. This addresses problems encountered while using Windows 7 thru Windows 10. Details and download available at:


http://bytepointer.com/articles/vs7.1_2003_on_win7_pdb_handle_leak_bug_unofficial_fix.htm

If you want to perform the patch manually, those details are also included.

NOTE: The SysInternals Handle tool workaround did not work for files on a network-share. The .PDB was not completely unlocked although the Handle tool claimed it was closed. My fix eliminates the problem once and for all and avoids any side effects.

墨落画卷 2024-07-26 11:00:12

运行此安装。 您需要从安装目录运行它,CD 根目录下的 setup.exe 将不起作用。

D:\setup\SetUp.exe /NO_BSLN_CHECK

Run this install. You need to run it from the setup directory, the setup.exe on the root of the cd will not work.

D:\setup\SetUp.exe /NO_BSLN_CHECK

偏爱自由 2024-07-26 11:00:12

我在网上找到的解决方案有帮助:对于您的 Visual Studio,请使用应用程序兼容性 = Windows Vista SP2,而不是 WinXP SP3

Solution i found on the web which helped: For your visual studio, use application compatibility = windows vista SP2, and NOT WinXP SP3

土豪 2024-07-26 11:00:12

对于 pdb 问题,我有一个非常肮脏且可悲的解决方法。

下载并运行Sysinternals-ProceXP,按CTRL-F输入链接时无法创建的pdb名称(smt如($ProjectName).pdb)。 找到后双击。(如果找不到,请使用管理员权限运行 procexp)

然后您将看到 .pdb 文件在主屏幕的下部窗格中突出显示。 右键单击它并选择关闭句柄。 当您重试构建解决方案时,它不会引发错误。

我不知道这个解决方案是否可以编写脚本,但它至少比重新启动 Visual Studio 更好。

I have a really dirty and pathetic workaround for the pdb problem.

Download and run Sysinternals-ProceXP, press CTRL-F enter the name of pdb(smt like ($ProjectName).pdb) that can't be created while linking. Double click when it is found.(if it can't be found run procexp with administrator priviliges)

Then you will see that the .pdb file is highlighted in the lower pane of the main screen. Right click it and select Close Handle. When you retry building your solution it wont raise an error.

I dont know if this solution can be scripted but it is at least better than restarting visual studio.

⒈起吃苦の倖褔 2024-07-26 11:00:12

自从第一个 RC 版本发布以来,我一直在 win7 上使用 Visual studio 2003 :S
人们为什么会有问题?

I've been using Visual studio 2003 on win7 since the very first RC edition was released :S
why do people have issues?

-小熊_ 2024-07-26 11:00:12

我尝试使用虚拟 Windows XP 功能在 Windows 7 64 位上安装 VS2003。 我相当肯定这会成功。 我遇到的问题是安装程序需要安装 IIS,而 Virtual XP 提供的 XP 安装默认情况下没有启用该功能。

如果您转到“添加/删除组件”并尝试添加它,它会要求提供光盘,而我手头没有光盘。 一旦我拿到光盘,我就很确定它会运行得很好。

如果您还没有在其他应用程序中尝试过,Virtual XP 功能真的很简洁......

I have attempted to install VS2003 on Windows 7 64-bit using the Virtual Windows XP feature. I'm reasonably certain that this will be successful. The issue I ran into is that the installer wants IIS installed, and the XP installation provided by the Virtual XP doesn't have that enabled by default.

If you go to Add/Remove components, and try to add it, it will ask for the disc, which I didn't have on hand. Once I get my hands on the disc, I'm pretty sure that it will run fine.

If you haven't tried it for other apps, the Virtual XP feature is really neat...

春风十里 2024-07-26 11:00:12

我遇到了同样的问题; devenv.exe 在运行项目后使 pdb 文件保持打开状态。 我制作了一个批处理文件来解决这个问题,它会关闭由 devenv.exe 打开的所有 .pdb 文件:

handle.exe .pdb | awk "/devenv.exe/ { split($4, fd, \":\"); system(\"handle.exe -c \" fd[1] \" -y -p \" $3)}"

您需要在路径中包含 sysinternals 的 handle.exe 和 gnu 的 awk 才能使其正常工作。

使用风险自负。 关闭句柄可能会导致应用程序或系统不稳定。

I am experiencing the same issue; devenv.exe is leaving pdb files open after running the project. I have made a batch file to work around it, it closes all .pdb files open by devenv.exe:

handle.exe .pdb | awk "/devenv.exe/ { split($4, fd, \":\"); system(\"handle.exe -c \" fd[1] \" -y -p \" $3)}"

You will need to have handle.exe by sysinternals and awk by gnu in your path to make it work.

Use at your own risk. Closing handles can cause application or system instability.

噩梦成真你也成魔 2024-07-26 11:00:12

在Windows 7中,可执行属性中有兼容模式。
打开:C:\ Program Files \ Microsoft Visual Studio .NET 2003 \ Common7 \ IDE \
然后右键单击 devenv.exe 并选择属性。 在兼容性选项卡中,选择“以兼容模式运行”,然后在下拉列表中选择“Windows XP”。

尝试一下,我不确定它是否有效,但值得一试。

In windows 7, there is the compatabiliy mode in the executable properties.
open:C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\
then right click on the devenv.exe and select properties. In the compatability tab, select the "Run in compatability mode" and select "Windows XP" in the dropdown.

Try that, I am not sure if it works, but it is worth a shot.

小瓶盖 2024-07-26 11:00:12

我在 Windows 7 64 位上使用 Visual Studio 2003 没有任何问题。

  1. 导航到 VS2003 devenv.exe(可能是 C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.exe)
  2. 右键单击并选择“属性”
  3. 在“兼容性”选项卡中,选中“以兼容性方式运行此程序”模式:”并选择“Windows XP (Service Pack 3)” 选中
  4. “以管理员身份运行此程序”

I am having no problems with Visual Studio 2003 on Windows 7 64-bit.

  1. Navigate to VS2003 devenv.exe (probably C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.exe)
  2. Right-click and select Properties
  3. In the Compatibility tab, check "Run this program in compatibility mode for:" and select "Windows XP (Service Pack 3)"
  4. Check "Run this program as administrator"
合约呢 2024-07-26 11:00:12

通过执行一些高级步骤,我使 Visual Studio .NET 2003 在配备 I7 处理器和 12GB RAM、运行 Windows 7 Professional 64 位的 HP EliteBook Workstation 8760W 上​​运行良好。
操作步骤如下:

  1. 安装 IIS 7.0 的 FrontPage 2002 服务器扩展。
  2. 安装 Visual Studio .Net 2003。当安装程序命令您配置 Frontpage 2002 服务器扩展时,只需跳过即可。
  3. 安装 .Net Framework 1.1 Service Pack 1(在此处下载)。
  4. 转到控制面板> 管理工具> Internet 信息服务 (IIS) 管理器。 突出显示您的计算机,然后双击 ISAPI 和 CGI​​ 限制。 将 ASP .NET v1.1.4322 的设置更改为“允许”。

然后它将始终显示带有以下消息的警报

该程序存在兼容性问题...

请忽略它。 另外,不要在 IDE 的属性中将其置于兼容模式。

I got Visual Studio .NET 2003 Working just fine on my HP EliteBook Workstation 8760W with an I7 processor and 12GB of RAM running Windows 7 Professional 64 bit by doing some advanced steps.
They go as follows:

  1. Install FrontPage 2002 Server Extensions for IIS 7.0.
  2. Install Visual Studio .Net 2003. Just skip when the installer command you to configure Frontpage 2002 Server Extensions.
  3. Install .Net Framework 1.1 Service Pack 1 (download here).
  4. Go to Control Panel > Administrative Tools > Internet Information Services (IIS) Manager. Highlight your machine, then double-click on ISAPI and CGI Restrictions. Change setting for ASP .NET v1.1.4322 to Allowed.

Then it will always show an alert with the following message

This program has compatibility issues...

just ignore that. Also, don't put it in compatibility mode in the properties of the IDE.

甜中书 2024-07-26 11:00:12

我确实在 Windows 7 32 位上安装了 VS2003。 然而,我必须使用一些 IIS 技巧才能运行我的 ASP.NET 项目。 安装VS2003时Web开发组件无法选择。 基本上,您必须首先将 VS2003 ASP.NET v1.1 放入 C:\inetpub\wwwroot\project_name 并使其作为独立的 Web 门户自行运行。 这是我所做的步骤。

  1. 在 Windows 7 上安装 IIS

在此处输入图像描述

  1. 将 VS2003 项目复制到 C:\inetpub\wwwroot\project_name。 右键单击您的项目名称并转换为应用程序。
    以下是我的自定义问题,即使我的 web.config 中没有相关设置,在启用 Windows 身份验证之前该问题也不起作用。 选择您的项目名称> 认证> 启用匿名和 Windows 身份验证。

输入图片此处描述

  1. 在 ISAPI 和 CGI​​ 限制中启用 ASP.NET 1.1,并确保在 ISAPI 过滤器下添加 ASP.NET
    输入图片此处描述
    输入图片此处描述
  2. 一旦我能够在浏览器中启动我的 ASP.NET 项目,就可以从您的项目位置打开项目,在我的例子中是 C:\inetpub\wwwroot\MHSScoreOrg\MHSScoreOrg.sln。 只有当我的项目完全集成到 IIS 上时,我才能运行它。

I did managed to install VS2003 on Windows 7 32 bit. However I had to do some IIS tricks in order to be able to run my ASP.NET project. When you install VS2003 Web Development component can't be selected. Basically you have to drop your VS2003 ASP.NET v1.1 into C:\inetpub\wwwroot\project_name and make it working on it's own as a standalone web portal first. Here is the steps I did.

  1. Install IIS on Windows 7

enter image description here

  1. Copy your VS2003 project to C:\inetpub\wwwroot\project_name. Right click on your project_name and Convert to application.
    Following was my custom issue that didn't work until I enabled Windows Authentication even if I had no related settings in my web.config. Select your project_name > Authentication > enable both Anonymous and Windows Authentications.

enter image description here

  1. Enable ASP.NET 1.1 in ISAPI and CGI Restrictions and make sure ASP.NET is added under ISAPI filters
    enter image description here
    enter image description here
  2. Once I'm able to fire up my ASP.NET project in a browser go ahead and open project from your project location in my case is C:\inetpub\wwwroot\MHSScoreOrg\MHSScoreOrg.sln. I was able to run my project only when it was fully integrated on IIS.
_畞蕅 2024-07-26 11:00:12

抱歉,您的构建环境要求同时运行 VC 2003、2005 和 2008? 我真的敢打赌,您最好将精力花在将构建环境整合到一个环境上。

I'm sorry, your build environment requires you to have VC 2003, 2005, AND 2008 running concurrently? I would really bet that your efforts would be better spent simply consolidating your build environment to just one environment.

不气馁 2024-07-26 11:00:12

您是否考虑过将解决方案升级到 vs2005,使用 MSBEE 来定位 .net 1.1?

Have you considered upgrading your solutions to vs2005, using MSBEE to target .net 1.1?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文