I'm trying to create multiple files from inside a VSPackage plugin. When the code runs, each time a new file is created, the environment tries to load it into a default designer. This considerably (and needlessly) slows down the plugin's execution.
I tried setting DTE.SuppressUI
property to true
, but it didn't have any effects.
public void Generate()
{
_dte.SuppressUI = true;
try
{
_innerGenerator.Generate();
}
finally
{
_dte.SuppressUI = false;
}
}
What else am I supposed to do to prevent the UI to refresh itself?