Disabling the Visual Studio Source Server Security Warning Dialog

3 Comments February 12, 2011

The estimable Ed Blankenship posted a must read article for everyone using TFS 2010: Source Server and Symbol Server Support in TFS 2010. Bookmark that article because it’s the one stop shop for all the best practices for symbol server, source indexing, and everything related to them for VS and TFS 2010.

Once you get all the symbol server and source indexing hooked up as Ed describes, your life will be great except for one small problem. See this dialog below?

clip_image001

This is the Security Warning dialog that Visual Studio pops up every time it needs to run the version control command line tool the first time you need to access a file. The warning is reasonable but look closely at that dialog. Is there anything that lets you check something that says “don’t ask me again?” Nope! So after seeing this dialog over and over and over, you’ll be a little frustrated. Actually, you’ll be a lot frustrated. Probably frustrated enough to fly to Redmond and scream on Microsoft’s campus: “Make it stop!” Interestingly, WinDBG does have the check box on its security dialog so you can turn it off.

As my job is to save your frustrations, it’s actually very easy to turn off this dialog. You’ll have to create a text file to tell SYMSRV.DLL, which is the DLL doing your symbol server loading, that you trust the command. In <Visual Studio Install Directory\Common7\IDE, create a text file called SRCSRV.INI and put the following into it:

[trusted commands]

tf.exe=<Visual Studio Install Directory>\Common7\IDE\tf.exe

That’s it! Now Visual Studio will trust TF.EXE and never show the Security Warning again.


3 Comments

  • Gravatar Image
    don February 16, 2011 12:04 PM

    Those Redmondians ... Imaging making an option like that available but not telling anyone how to use it. What will they do next?!

  • Gravatar Image
    Valery August 4, 2011 7:12 AM

    Great post ! Just what I was looking for!

    You made me save a flight to Redmond :D

    V.

  • Gravatar Image
    Valery August 5, 2011 7:41 AM

    I had however issues from time to time with this "trusted commands". Sometimes, the sources related to some assemblies were not downloaded to the local SourceServer cache.
    To solve it, I had to delete the srcsrv.ini file and restart VS 2010.
    I found that using the following "trusted commands", I didn't experience such a weird behavior anymore:
    [trusted commands]
    tf.exe view
    It's maybe actually not related but I didn't find any other workaround. I double checked the pdb loaded from the Symbol Server cache. they were both correctly got from the symbol server and correctly indexed : I checked indeed with pdbstr -r that the tf command was in the TFS_EXTRACT_CMD tag.
    I thought I should try "tf.exe view" (instead of the full path) as a "trusted command" since I found this in the pdb stream :
    TFS_EXTRACT_CMD=tf.exe view /version:%var4% /noprompt "$%var3%" /server:%fnvar%(%var2%) /console &gt;%srcsrvtrg%

Have a Comment?

Archives

Blogs