开发者

Workaround for C1085 - failing to write precompiled headers on network shares

I am looking for an workaround for making the network share to work with Visual Studio 2010.

It look that if you try to build on a network share that was shared from an OS X machine, visual studio will fail to build.

Does anyone know some samba configuration tweaks to solve this problem?

It look that microsoft failed to provide any information regarding this, they just ask you to use local drives.

I'm using VirtualBox 4.0.12 on Lion, oops they just releas开发者_StackOverflowed 4.1 but I doubt it's a virtualization issue. Anyway I will upgrade.


From what you write it seems that you want to have your source code on your Lion partition and access it from the VirtualBox with Visual Studio. I finally got such a setup working with Lion. Please note, that in the following description some names may not be exact as I am using a German Windows XP version and do not always know the official English translation (or names in other Windows verions).

  1. Create a VirtualBox shared folder (with read/write access) in which your source code is located.
  2. Open "Network Environment", there the shared folder should be listed and if you hover the cursor over it a name like "\\Vboxsvr\name" should be displayed. You will need this name in the next step.
  3. In the Windows Explorer chose "Extras/Connect to network drive", chose a drive letter and use the name from the previous step ("\\Vboxsvr...").

If opening the Visual Studio solution now from that network drive with the mapped letter you should be able to compile the solution. A "Rebuild solution" may be required. If that is not sufficient and you can some errors about permissions or untrusted network drive, there is a command which has to be executed, but I would to have to google it again. Leave a comment if you are affected by this.

If you are using ASP.NET you might get an exeception when launching your application, saying that it failed to monitor changes to some file or directory. In this case you have to disable file monitoring. This is done by adding the key "HKLM\Software\Microsoft\ASP.NET\FCNMode" with value 1 as DWORD value in the registry. See also http://support.microsoft.com/kb/911272/en-us

Using Samba/SMB shares instead of VBox shared folders worked also with OS X prior to Lion. However, Apple replaced Samba with its own SMB implementation which seems to be a bit more buggy. If you really want to use Samba/SMB you probably have to install Samba manually. However, I wasn't successful getting Samba to work (although I got it compiled).


The only workaround I found was to replace Virtualbox shared folders by Samba ones. From Visual Studio: no more C1085 fatal errors! Phew...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜