开发者

trying to do asp.net mvc development from vmware fusion

开发者 https://www.devze.com 2022-12-19 17:41 出处:网络
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:

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 开发者_JAVA技巧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.


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.


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"/>


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号