I'm fairly new to XSharp and recently started working on a project that uses it.
Whenever I try to add a new XSharp class to a recently created XSharp project, Visual Studio often becomes unresponsive and displays a "Visual Studio is busy" message. I usually have to force close Visual Studio via Task Manager. When I reopen the solution and try to add the class again, I get a message saying that the file already exists and asking if I want to replace it. After confirming, the file is created as expected, and I can continue working—until I try to add the next class, and the issue repeats.
This is quite frustrating, and I hope someone can help me resolve it.
Below is a part of the stack trace that appears during the issue.
Best Regards
Johannes
[Managed to Native Transition]
> mscorlib.dll!System.Threading.WaitHandle.WaitAny(System.Threading.WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) Line 529 C#
Microsoft.Build.dll!Microsoft.Build.BackEnd.RequestBuilder.WaitWithBuilderThreadStart(System.Threading.WaitHandle[] handles, bool recursive, Microsoft.Build.Execution.LegacyThreadingData threadingData, int submissionId) Unknown
Microsoft.Build.dll!Microsoft.Build.Execution.BuildSubmission.Execute() Unknown
XSharp.ProjectBase2022.dll!Microsoft.VisualStudio.Project.ProjectNode.DoMSBuildSubmission(Microsoft.VisualStudio.Project.BuildKind buildKind, string target, ref Microsoft.Build.Execution.ProjectInstance projectInstance, Microsoft.VisualStudio.Project.MSBuildCoda uiThreadCallback) Line 3660 C#
XSharp.ProjectBase2022.dll!Microsoft.VisualStudio.Project.AssemblyReferenceNode.BuildInstance(Microsoft.VisualStudio.Project.ProjectNode projectNode, Microsoft.Build.Execution.ProjectInstance instance, string target, out Microsoft.Build.Execution.BuildSubmission submission) Line 440 C#
XSharp.ProjectBase2022.dll!Microsoft.VisualStudio.Project.AssemblyReferenceNode.ResolveAssemblyReference() Line 497 C#
XSharp.Project2022.dll!XSharp.Project.XSharpAssemblyReferenceNode.ResolveAssemblyReference() Line 153 C#
XSharp.ProjectBase2022.dll!Microsoft.VisualStudio.Project.AssemblyReferenceNode.CreateFromAssemblyName(System.Reflection.AssemblyName name) Line 254 C#
XSharp.Project2022.dll!XSharp.Project.XSharpReferenceContainerNode.CreateAssemblyReferenceNode(string fileName) Line 197 C#
XSharp.ProjectBase2022.dll!Microsoft.VisualStudio.Project.ReferenceContainerNode.CreateFileComponent(Microsoft.VisualStudio.Shell.Interop.VSCOMPONENTSELECTORDATA selectorData, string wrapperTool) Line 536 C#
XSharp.Project2022.dll!XSharp.Project.XSharpReferenceContainerNode.CreateFileComponent(Microsoft.VisualStudio.Shell.Interop.VSCOMPONENTSELECTORDATA selectorData, string _wrapperTool) Line 174 C#
XSharp.ProjectBase2022.dll!Microsoft.VisualStudio.Project.ReferenceContainerNode.CreateReferenceNode(Microsoft.VisualStudio.Shell.Interop.VSCOMPONENTSELECTORDATA selectorData, string wrapperTool) Line 456 C#
XSharp.ProjectBase2022.dll!Microsoft.VisualStudio.Project.ReferenceContainerNode.AddReferenceFromSelectorData(Microsoft.VisualStudio.Shell.Interop.VSCOMPONENTSELECTORDATA selectorData, string wrapperTool) Line 385 C#
XSharp.Project2022.dll!XSharp.Project.XSharpReferenceContainerNode.AddReferenceFromSelectorData(Microsoft.VisualStudio.Shell.Interop.VSCOMPONENTSELECTORDATA selectorData, string wrapperTool) Line 47 C#
XSharp.ProjectBase2022.dll!Microsoft.VisualStudio.Project.Automation.OAReferences.Add(string bstrPath) Line 99 C#
Microsoft.VisualStudio.TemplateWizard.dll!Microsoft.VisualStudio.TemplateWizard.Wizard.AddReferences(EnvDTE.Project project, System.Xml.XmlNodeList refAssemblies) Unknown
Microsoft.VisualStudio.TemplateWizard.dll!Microsoft.VisualStudio.TemplateWizard.Wizard.AddProjectReferences(EnvDTE.Project project, System.Xml.XmlNode referencesNode) Unknown
Microsoft.VisualStudio.TemplateWizard.dll!Microsoft.VisualStudio.TemplateWizard.Wizard.Execute(object application, System.IntPtr hwndOwner, ref object[] ContextParams, ref object[] CustomParams, ref EnvDTE.wizardResult retval) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
XSharp.ProjectBase2022.dll!Microsoft.VisualStudio.Project.ProjectNode.RunWizard(Microsoft.VisualStudio.Project.HierarchyNode parentNode, string itemName, string wizardToRun, System.IntPtr dlgOwner) Line 2120 C#
XSharp.Project2022.dll!XSharp.Project.XSharpProjectNode.RunWizard(Microsoft.VisualStudio.Project.HierarchyNode parentNode, string itemName, string wizardToRun, System.IntPtr dlgOwner) Line 830 C#
XSharp.ProjectBase2022.dll!Microsoft.VisualStudio.Project.ProjectNode.AddItemWithSpecific(uint itemIdLoc, Microsoft.VisualStudio.Shell.Interop.VSADDITEMOPERATION op, string itemName, uint filesToOpen, string[] files, System.IntPtr dlgOwner, uint editorFlags, ref System.Guid editorType, string physicalView, ref System.Guid logicalView, Microsoft.VisualStudio.Shell.Interop.VSADDRESULT[] result, bool bTrackChanges) Line 5540 C#
XSharp.ProjectBase2022.dll!Microsoft.VisualStudio.Project.ProjectNode.AddItemWithSpecific(uint itemIdLoc, Microsoft.VisualStudio.Shell.Interop.VSADDITEMOPERATION op, string itemName, uint filesToOpen, string[] files, System.IntPtr dlgOwner, uint editorFlags, ref System.Guid editorType, string physicalView, ref System.Guid logicalView, Microsoft.VisualStudio.Shell.Interop.VSADDRESULT[] result) Line 5489 C#
XSharp.ProjectBase2022.dll!Microsoft.VisualStudio.Project.ProjectNode.AddItem(uint itemIdLoc, Microsoft.VisualStudio.Shell.Interop.VSADDITEMOPERATION op, string itemName, uint filesToOpen, string[] files, System.IntPtr dlgOwner, Microsoft.VisualStudio.Shell.Interop.VSADDRESULT[] result) Line 5460 C#

