You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
I had a blocker issue with ICSharpCode.SharpDevelop.Project.MSBuildBasedProject.LoadProjectExtensions() method throwing exception on some of my projects. #D loads last solution after start and if loads fails - then SD fails completely.
It happened on attempt to load SharpDevelopExtensions section from solution/project when this section was not there.
The exception thrown at return XElement.Parse(existing[name]); when existing[name] returned empty string.
My local fix was to treat empty element as null, I'm not sure if it's the best/right place to do it though :)
public override XElement LoadProjectExtensions(string name)
{
lock (SyncRoot) {
ProjectExtensionsElement existing = GetExistingProjectExtensionsElement();
if (existing != null) {
string xml = existing[name];
if(!string.IsNullOrWhiteSpace(xml))
return XElement.Parse(existing[name]);
}
existing = projectFile.CreateProjectExtensionsElement();
return new XElement(name);
}
}
In fact there are 2 issues here:
exception when loading a solution at startup kills SharpDevelop process
SharpDevelopExtensions project extensions element might be absent/empty
I had a blocker issue with
ICSharpCode.SharpDevelop.Project.MSBuildBasedProject.LoadProjectExtensions()method throwing exception on some of my projects. #D loads last solution after start and if loads fails - then SD fails completely.It happened on attempt to load SharpDevelopExtensions section from solution/project when this section was not there.
The exception thrown at
return XElement.Parse(existing[name]);when existing[name] returned empty string.My local fix was to treat empty element as null, I'm not sure if it's the best/right place to do it though :)
In fact there are 2 issues here: