@ -230,6 +230,7 @@ namespace ICSharpCode.SharpDevelop.Project
MessageService . ShowError ( ex . Message ) ;
MessageService . ShowError ( ex . Message ) ;
return ;
return ;
}
}
AbstractProject . filesToOpenAfterSolutionLoad . Clear ( ) ;
try {
try {
string file = GetPreferenceFileName ( openSolution . FileName ) ;
string file = GetPreferenceFileName ( openSolution . FileName ) ;
if ( FileUtility . IsValidFileName ( file ) & & File . Exists ( file ) ) {
if ( FileUtility . IsValidFileName ( file ) & & File . Exists ( file ) ) {
@ -239,11 +240,24 @@ namespace ICSharpCode.SharpDevelop.Project
} catch ( Exception ex ) {
} catch ( Exception ex ) {
MessageService . ShowError ( ex ) ;
MessageService . ShowError ( ex ) ;
}
}
// Create project contents for solution
ParserService . OnSolutionLoaded ( ) ;
// preferences must be read before OnSolutionLoad is called to enable
// preferences must be read before OnSolutionLoad is called to enable
// the event listeners to read e.Solution.Preferences.Properties
// the event listeners to read e.Solution.Preferences.Properties
OnSolutionLoaded ( new SolutionEventArgs ( openSolution ) ) ;
OnSolutionLoaded ( new SolutionEventArgs ( openSolution ) ) ;
}
}
internal static void ParserServiceCreatedProjectContents ( )
{
foreach ( string file in AbstractProject . filesToOpenAfterSolutionLoad ) {
if ( File . Exists ( file ) ) {
FileService . OpenFile ( file ) ;
}
}
AbstractProject . filesToOpenAfterSolutionLoad . Clear ( ) ;
}
static void ApplyConfigurationAndReadPreferences ( )
static void ApplyConfigurationAndReadPreferences ( )
{
{
openSolution . ApplySolutionConfigurationToProjects ( ) ;
openSolution . ApplySolutionConfigurationToProjects ( ) ;
@ -396,7 +410,6 @@ namespace ICSharpCode.SharpDevelop.Project
static void OnSolutionLoaded ( SolutionEventArgs e )
static void OnSolutionLoaded ( SolutionEventArgs e )
{
{
ParserService . OnSolutionLoaded ( ) ;
if ( SolutionLoaded ! = null ) {
if ( SolutionLoaded ! = null ) {
SolutionLoaded ( null , e ) ;
SolutionLoaded ( null , e ) ;
}
}