尝试从 vmware fusion 进行 asp.net mvc 开发
问题是我的源托管在主机上(在本例中是 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您的想法是正确的,但需要为 Windows 7 编辑正确的密钥。
重新启动并你应该可以走了。 “Wow6432Node”允许您为 Windows 7 64 位 Visual Studio 进行设置。
You have the right idea, but need to edit the correct key for Windows 7.
Re-boot and you should be good to go. The "Wow6432Node" allows you to set this for Windows 7 64-bit Visual Studio.
看起来您现在可以在 web.config 中更改 FCNMode。他们可能在 .NET 4.5 中添加了它,找不到任何文档,但 这个,但它似乎有效。
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.
我不是文件系统/虚拟化专家,但我猜测运行开发服务器进程的帐户没有访问配置文件(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...).
如果代码存储库位于其他地方,我认为在虚拟机上保留代码的工作副本不会有问题。
I don't see a problem having the working copy of your code on a VM if the code repository is somewhere else.