Created
June 28, 2015 12:31
-
-
Save nickdarnell/784fc6be135c8818fa17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void SolutionOpened() | |
{ | |
string slnFile = mdte.Solution.FullName; | |
string solutionDirectory = Path.GetDirectoryName(slnFile); | |
string pathfileName = Path.GetFileNameWithoutExtension(slnFile) + ".autoexp"; | |
string patchFile = Path.Combine(solutionDirectory, pathfileName); | |
if(File.Exists(patchFile)) | |
{ | |
string autoExpPatch = File.ReadAllText(patchFile); | |
string autoExpPath = Environment.ExpandEnvironmentVariables("%VS100COMNTOOLS%\..\Packages\Debugger\autoexp.dat"); | |
string blockBegin = "; BEGIN AEP [AutoExpand] (" + pathfileName + ")"; | |
string blockEnd = "; END AEP [AutoExpand] (" + pathfileName + ")"; | |
// What follows is a bunch string parsing code that's not relevant to the article. | |
// (1) We remove the previous auto expansion block we added, if we added one | |
// in another session. | |
// (2) We insert the new auto expansion patched section from our | |
// SOLUTIONFILE_NAME.autoexp file. | |
// (3) Save the new AutoExp.dat file. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment