locked
VS2010, Network Shares and Offline Files RRS feed

  • Question

  • Now, I've read a few posts dealing with "Trusted" projects etc, but none of them seem to target my specific problem, since I can load and build projects correctly.

    • Windows 7
    • VS2010 SP1
    • Using a Network Folder (folder is on a corporate server and is private)
    • Network Folder is also "Always Available Offline" and is linked through the W7 Libraries

    My main problem right now is that Intellisense is having a hard time. When in my project, I try to type <xmlns:local= and I expect my assemblies to display in the list, but they don't: I can only see the microsoft stuff.

    Then I copy my whole project folder to my desktop and try again, and it works like a charm.

    Why can't VS2010 behave correctly from a network share??

    The workaround of creating a symbolik link seem to work, but i'm not sure how good of a trick it is. Is there an official way to solve this problem that doesn't involve waiting for VS2012?

    Thank you!

    EDIT: The symbolik link stuff works, but when you include it as a Windows Library, it defaults back to the network location. So what I did is to create a placeholder local directory (mkdir) that I linked in the library. Then I deleted the placeholder folder (rmdir) and created the symbolik link (mklink /D): w7 libraries didn't catch the trick, it's now acting as if it was pointing to the local drive (yay!). Preliminary tests seem to work when working offline as well, hopefully it will hold up together.

    • Edited by muik Tuesday, April 10, 2012 4:39 PM Workaround Works
    • Moved by Alexander Sun Thursday, April 12, 2012 5:40 AM Move to more appropriate forum (From:Visual Studio Setup and Installation)
    Monday, April 9, 2012 9:31 PM

Answers

  • Hi Lucy,

    Thanks for the time. Unfortunately my question is about "how to use VS2010 when your project resides in a network share". I hope you understand that getting rid of the share is not a solution if the share is important for me.

    The solution to this issue is to trick Visual Studio in thinking that he's working off a local hard drive even though it is not. Here are concise steps for anyone else who needs a workaround to this issue (which is apparently widespread judging from the amount of posts related to LAN shares and VS2010). The workaround requires Windows 7 and Libraries and the trick is in the creation of a placeholder folder (and frankly, Microsoft should be aware of this trick and offer it as an alternative to anyone having the same issue as I have):

    1. Create a placeholder directory anywhere on your local drive. I personally used C:\Development.
    2. Add this new location to your Windows 7 Libraries.
    3. Open a command line prompt window.
    4. Navigate to the folder and delete it using rmdir (in my case: rmdir C:\Development)
    5. Create a symbolic link that points to your network share, don't forget to use the same folder name (Development)
    6. (to create the link: mklink /D C:\Development U:\myNetworkShareLocation)

    From this point on, if you access the location through your Library, it will show as "C:\Development" and this is also what VS2010 sees. Intellisense is back and everything starts working again.

    You can use this trick to add a non-indexed location to your Windows 7 libraries, too. This is pretty awesome when you lack the HDD space to make everything "Available Offline" or if you want to link to public areas on the LAN. It's weird that W7 blocks this feature when you try to set it up in a legit way; it clearly supports it and it's not slow at all.

    And it works hand-in-hand with offline files too.

    Hopefully this will help some other folks!

    Thanks!

    • Marked as answer by muik Tuesday, April 24, 2012 7:46 PM
    Tuesday, April 24, 2012 7:46 PM

All replies

  • Hi Muik,

    Welcome to the MSDN forum.

    Thank you for sharing your solution. Your problem is related to intellisense which is a feature in Visual Studio Editor, so I will move it to Visual Studio Editor forum for better support.

    Sorry for any inconvenience.

    Best  Regards,


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, April 12, 2012 5:39 AM
  • Hi muik,
    What type of your project?
    If it is a WPF/Silverlight project, I think this issue is caused by the WPF/Silverlight Designer, which will (mistakenly) prevent the WPF and Silverlight designer in Visual Studio 2010 from correctly loading projects which are hosted on a LAN share such as the one you are using. We are currently investigating this but cannot make any comment on when or whether a fix may be available at this time.
    As you mentioned, if you copy your whole project folder to your desktop and try again, and it works like a charm. So I think the only workaround is to moving your project to a local drive.
    Related thread:
    http://social.msdn.microsoft.com/Forums/nl-NL/vswpfdesigner/thread/75c4cc8d-9a81-4bda-84f0-f619f7493b3b


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by lucy-liuModerator Tuesday, April 17, 2012 7:37 AM
    • Unmarked as answer by muik Tuesday, April 24, 2012 7:26 PM
    Thursday, April 12, 2012 7:22 AM
    Moderator
  • Hi muik,

    I temporary make my last reply as answer. You can unmark it if they provide no help.

    Thank you for your understanding!


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, April 17, 2012 8:10 AM
    Moderator
  • Hi Lucy,

    Thanks for the time. Unfortunately my question is about "how to use VS2010 when your project resides in a network share". I hope you understand that getting rid of the share is not a solution if the share is important for me.

    The solution to this issue is to trick Visual Studio in thinking that he's working off a local hard drive even though it is not. Here are concise steps for anyone else who needs a workaround to this issue (which is apparently widespread judging from the amount of posts related to LAN shares and VS2010). The workaround requires Windows 7 and Libraries and the trick is in the creation of a placeholder folder (and frankly, Microsoft should be aware of this trick and offer it as an alternative to anyone having the same issue as I have):

    1. Create a placeholder directory anywhere on your local drive. I personally used C:\Development.
    2. Add this new location to your Windows 7 Libraries.
    3. Open a command line prompt window.
    4. Navigate to the folder and delete it using rmdir (in my case: rmdir C:\Development)
    5. Create a symbolic link that points to your network share, don't forget to use the same folder name (Development)
    6. (to create the link: mklink /D C:\Development U:\myNetworkShareLocation)

    From this point on, if you access the location through your Library, it will show as "C:\Development" and this is also what VS2010 sees. Intellisense is back and everything starts working again.

    You can use this trick to add a non-indexed location to your Windows 7 libraries, too. This is pretty awesome when you lack the HDD space to make everything "Available Offline" or if you want to link to public areas on the LAN. It's weird that W7 blocks this feature when you try to set it up in a legit way; it clearly supports it and it's not slow at all.

    And it works hand-in-hand with offline files too.

    Hopefully this will help some other folks!

    Thanks!

    • Marked as answer by muik Tuesday, April 24, 2012 7:46 PM
    Tuesday, April 24, 2012 7:46 PM