Skip to content

Instantly share code, notes, and snippets.

@nickdarnell
Created June 28, 2015 12:31
Show Gist options
  • Save nickdarnell/784fc6be135c8818fa17 to your computer and use it in GitHub Desktop.
Save nickdarnell/784fc6be135c8818fa17 to your computer and use it in GitHub Desktop.
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