Friday, April 19, 2013

Visual Studio 2010

I am not a fan of Visual Studio. Unfortunately I must use it for some projects. Recently I was forced to upgrade to Windows 7 and Visual Studio 2010. Not wanting to duplicate all my files, I decided to leave them on a network drive and just access them via the network.

Seems like a good idea, after all, why have a network if you store everything locally? Well, it seems that Visual Studio does not like that.

For some settings it will decide to find a suitable local directory for you. For some other settings it leaves you high and dry.

For example, when I try and build my program I get the error:

Error    1    error C1033: cannot open program database '\\server\share\working\project\debug\vc100.pdb'    \\server\share\working\project\stdafx.cpp    1    1    project

The internet was of little use which is why I thought I would put it in my blog.

This goes a long way to explain my criticism of Visual Studio. After installing several gig of software, is that the best error message it can come up with? Well I will try the help, Oh, that is online only. After jumping through some hoops, the help tells me that:

This error can be caused by disk error.

Well, no disks errors here. Perhaps it means that it does not like saving the .pdb on a network share. What is a .pdb anyway???

In the end, my solution (can I call it that or as Visual Studio hijacked that word?) was to save intermediate files locally:
  • Open Project -> Properties...
  • Select Configuration Properties\General
  • Select Intermediate Directory
  • Select <Edit...>
  • Expand Macros>>
  • Edit the value (by double clicking on the macros or just typing in):
$(TEMP)\$(ProjectName)\Debug\
  • Select OK
  • Select OK

And that seems to sort it out.

4 comments:

  1. Thank you for your sharing. Thanks to this article I can learn more things. Expand your knowledge and abilities. Actually the article is very practical. Thank you!
    lucky patcher ,
    color switch

    ReplyDelete
  2. The article you have shared here very awesome. I really like and appreciated your work. I read deeply your article, the points you have mentioned in this article are useful
    Bad Ice Cream

    ReplyDelete
  3. Key Details of Microsoft Visual Studio 2010 Ultimate. Create, deploy and debug applications on a wide array of platforms with the industry ...

    download hotstar apkxyz

    ReplyDelete