Blog

Disabling the Visual Studio Source Server Security Warning Dialog

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?

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 DirectoryCommon7IDE, create a text file called SRCSRV.INI and put the following into it:

<p style="line-height:13pt;background-color:#c6d9f1;margin:0in 0in 0pt" class="Code"><font face="Courier New"><font style="font-size:11pt" color="#000000">[trusted commands]</font></font></p>  <p style="line-height:13pt;background-color:#c6d9f1;margin:0in 0in 0pt" class="Code"><font face="Courier New"><font style="font-size:11pt" color="#000000">tf.exe=&lt;Visual Studio Install Directory&gt;Common7IDEtf.exe</font></font></p>  <p>That’s it! Now Visual Studio will trust TF.EXE and never show the Security Warning again.
John Robbins

View Comments

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

  • 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 >%srcsrvtrg%

Recent Posts

8-Step AWS to Microsoft Azure Migration Strategy

Microsoft Azure and Amazon Web Services (AWS) are two of the most popular cloud platforms.…

3 days ago

How to Navigate Azure Governance

 Cloud management is difficult to do manually, especially if you work with multiple cloud…

1 week ago

Why Azure’s Scalability is Your Key to Business Growth & Efficiency

Azure’s scalable infrastructure is often cited as one of the primary reasons why it's the…

3 weeks ago

Unlocking the Power of AI in your Software Development Life Cycle (SDLC)

https://www.youtube.com/watch?v=wDzCN0d8SeA Watch our "Unlocking the Power of AI in your Software Development Life Cycle (SDLC)"…

1 month ago

The Role of FinOps in Accelerating Business Innovation

FinOps is a strategic approach to managing cloud costs. It combines financial management best practices…

1 month ago

Azure Kubernetes Security Best Practices

Using Kubernetes with Azure combines the power of Kubernetes container orchestration and the cloud capabilities…

2 months ago