尝试从 vmware fusion 进行 asp.net mvc 开发

发布于 2024-08-21 00:00:26 字数 297 浏览 4 评论 0原文

问题是我的源托管在主机上(在本例中是 mac book pro),而 Visual Studio 希望能够监视 web.config 的更改,因此它会抛出错误:

加载配置文件时发生错误:无法开始监视对以下内容的更改:\path\to\web.config

我尝试添加 HKLM\Software\Asp.Net\FCNMode=1 但似乎不起作用。另外,由于版本控制问题,我认为将源移至 VHD 并不是一个可行的选择。

Windows 7 64 位 视觉工作室2008 VMWare Fusion 3.01

谢谢。

the issue is that my source is hosted on the host machine (in this case a mac book pro) and visual studio wants to be able to monitor the web.config for changes so it is throwing the error:

An error occurred loading a configuration file: Failed to start monitoring changes to: \path\to\web.config

I have tried to add the HKLM\Software\Asp.Net\FCNMode=1 but it doesn't seem to work. Also, I don't see moving the source to the VHD as a viable option due to version control issues.

Windows 7 64-bit
Visual Studio 2008
VMWare Fusion 3.01

Thanks.

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

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

发布评论

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

评论(4

情泪▽动烟 2024-08-28 00:00:26

您的想法是正确的,但需要为 Windows 7 编辑正确的密钥。

  • 打开 RegEdit
  • 导航到 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ASP.NET
  • 添加名为 FCNMode 的 REG_DWORD 注册表项并将其值设置为 1

重新启动并你应该可以走了。 “Wow6432Node”允许您为 Windows 7 64 位 Visual Studio 进行设置。

You have the right idea, but need to edit the correct key for Windows 7.

  • Open up RegEdit
  • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ASP.NET
  • Add a REG_DWORD registry entry called FCNMode and set its value to 1

Re-boot and you should be good to go. The "Wow6432Node" allows you to set this for Windows 7 64-bit Visual Studio.

树深时见影 2024-08-28 00:00:26

看起来您现在可以在 web.config 中更改 FCNMode。他们可能在 .NET 4.5 中添加了它,找不到任何文档,但 这个,但它似乎有效。

<system.web>        
    <httpRuntime fcnMode="Disabled"/>

It looks like you can now change FCNMode in your web.config. They probably added it in .NET 4.5, could not find any of documentation but this, but it seems to work.

<system.web>        
    <httpRuntime fcnMode="Disabled"/>
一笑百媚生 2024-08-28 00:00:26

我不是文件系统/虚拟化专家,但我猜测运行开发服务器进程的帐户没有访问配置文件(web.config)的权限。 OS X 也无法识别 VM 中的帐户,因此您无法更改权限以使其以这种方式工作。

我建议您添加 IIS 组件(通过“控制面板”->“程序”->“打开或关闭 Windows 组件”)(如果您尚未添加)。然后使用 VM 的 VHD 内的虚拟目录将应用程序添加到 IIS。现在要进行调试,首先将应用程序发布到新创建的 IIS 应用程序(类似于 http://localhost/MyNewIISApplication)将 VS 调试器附加到 IIS 工作进程 w3wp.exe(即“调试”->“附加到进程...”)。

I'm no filesystem/virtualization expert but I'm guessing that the account that the dev server process is running under does not have permissions to access the configuration file (web.config). The accounts within your VM won't recognized by OS X either so you won't be able to change the permissions to get it to work in this way.

What I would suggest would be to add the IIS component (via Control Panel->Programs->Turn Windows Components on or off) if you haven't already. Then add an application to IIS with the virtual directory within the VHD of your VM. Now to debug, first publish your application to the newly created IIS application (something like http://localhost/MyNewIISApplication) and attach the VS debugger to the IIS worker process w3wp.exe (i.e. Debug->Attach to Process...).

濫情▎り 2024-08-28 00:00:26

如果代码存储库位于其他地方,我认为在虚拟机上保留代码的工作副本不会有问题。

I don't see a problem having the working copy of your code on a VM if the code repository is somewhere else.

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