Running Visual Studio in Parallels for mac - probl

2019-01-28 19:21发布

I've installed parallels desktop on my MacBook to be able to run Visual Studio 2008 in a XP installation. Everything works great except when I decided to put my websites in my sites folder in the os x file system (Which by default automatically happens because the My Documents folder is mapped to the Mac's Documents folder, and I'd rather put my code there so that both OS's can easily access it.).

When trying to build or debug I get this error:

Failed to start monitoring changes to 'Z:\xxx...'

How do I get it so that I can get it to work under Parallels, from the shared drive?

7条回答
ゆ 、 Hurt°
2楼-- · 2019-01-28 19:27

I recently flipped over to putting my source code onto my Mac volume, so I could use Time Machine to back it up and immediately got this same problem with my ASP.NET app. Other, procedural applications, built just fine, by the way.

I tried all sorts of things, including using Samba on the Mac side to share the directory, which led into the "too many BIOS commands" error described elsewhere. Unfortunately for me, the Registry hacks to fix that problem never worked for some reason.

I finally found another solution that avoids Samba and just uses the regular Parallels Shared Folders. It too is a Registry hack, but this one simply turns off file change monitoring for ASP.NET. It is a bit heavy-handed, but gets my builds to work again.

The reference for this change is here:

http://support.microsoft.com/kb/911272

The downside to this approach, I am finding, is that you need to be more deliberate about recompiling, or restarting the web server, as changes during development don't just magically appear anymore. I am still deciding whether that is a useful tradeoff.

UPDATE: After several days of this, development was just too difficult and, sadly, what I reverted to was keeping my source inside the Parallels virtual disk. To enable Time Machine backups and Spotlight searches, I used a lightweight MS utility called SyncToy to push stuff out of Parallels and out to my Mac drive several times a day. Despite the high hack factor, it is working well.

查看更多
啃猪蹄的小仙女
3楼-- · 2019-01-28 19:37

I definately recommend Live Mesh as a way to keep directories in sync. Just keep the VM's directory in sync with the Mac's directory.

查看更多
ら.Afraid
4楼-- · 2019-01-28 19:37

Or use SVN to hold copies in both machines and do commit/update as appropriate. That way you get versioning, history and if your project grows bigger, you can share with other devs.

I know dropbox also has history and sharing, but not check in/check out/conflicts and all the other advantages of a real source control.

Oh, if you have money you can also go for TFS. I would but it is just too expensive :)

查看更多
Bombasti
5楼-- · 2019-01-28 19:40

Parallels uses network drives to simulate folders on OS X, and Windows can't monitor changes to network drives, so if you do this directly, it'll be broken.

If you want to keep them in sync though, use Live Mesh (http://www.mesh.com) and install it on both the host and guest. A little roundabout, but it'll make it so both copies are maintained (and Live Mesh is handy for other things too)

查看更多
太酷不给撩
6楼-- · 2019-01-28 19:40

.NET has funny issues trying to debug the objects on a network drive.

make sure that you have full trust on your local network between your Mac and XP install.

Check out: http://msdn.microsoft.com/en-us/library/aa302361.aspx

If at the end of that research, I"m afraid you will have to look into the option of keeping it on the VMDisk and moving it when you need it.

I see a similar problem on my machine connected to the windows domain. My documents is mapped to a network share and I can't debug|run|etc. I had to eventually move to my local disk for debugging.

查看更多
做自己的国王
7楼-- · 2019-01-28 19:41

Try moving the project on to the VMs C drive. Its not an ideal situation, but you can access the VMs C drive from OS X.

I have a similar problem with a php site that uses an MS Access database (its a clients system). I have alias's that point to the php site on the VM so that I can still do all of my coding in OS X. To do this I created a network share on the VM and then connected to it from OS X. Once connected make the alias's. If the network drive is not open and you open a file in OS X it will try to reconnect. It means the VM will need to be running to get to the files, but this isn't normally a problem since the VM is hosting the site anyways.

查看更多
登录 后发表回答