Bug 8.1.8 Visual Studio Designer SyntaxEdit

Get this exception in Visual Studio designer only for version 8.1.8 (not 8.1.0) for Sdk projects (not NET-Framework until 4.8) when placing SyntaxEdit on a form.


Microsoft Visual Studio

Failed to create component ‘SyntaxEdit’. The error message follows:

'Microsoft.DotNet.DesignTools.Client.DesignToolsServerException: Method not found: ‘Void System.Security.Cryptography.AsymmetricAlgorithm.FromXmlString(System.String)’.

at Microsoft.DotNet.DesignTools.Client.DesignToolsClient.d__49`1.MoveNext()

— End of stack trace from previous location where exception was thrown —

at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()

at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()

at Microsoft.DotNet.DesignTools.Protocol.Endpoints.DesignToolsEndpoints.DesignerHostsImpl.CreateComponent(SessionId sessionId, TypeIdentity type, String name, NameValuePairs defaultValues)

at Microsoft.WinForms.DesignTools.Client.Toolbox.WinFormsToolboxItem.CreateComponentsCore(IDesignerHost host, IDictionary defaultValues)

at System.Drawing.Design.ToolboxItem.CreateComponents(IDesignerHost host, IDictionary defaultValues)

at Microsoft.DotNet.DesignTools.Client.Designers.ComponentProxyDesigner.CreateTool(ToolboxItem tool, Nullable1 location, Nullable1 size, ObjectProxy toolboxSnapArgs)’

OK

Hi,

Thank you for reporting this problem.

Could you please send me (dmitry.medvedev@alternetsoft.com) this SDK project you have a problem with? Are you using .NET 6.0 or later and consuming a SyntaxEdit component directly from NuGet?

Most likely, this issue is related to some changes to our license checking for .NET Core projects, but we could not reproduce it on our end.

Could you also confirm that creating the SyntaxEdit component from the code works fine for you?

Kind regards,
Dmitry

I use version 8.1.8 from Nuget. I use Target framework: net6-windows. Very simple app, just one form, then i place a syntax edit on it. Then i’ll get the exception. Downgrading to version 8.1.0 the error disappears and a syntax edit is placed on the form.

2023-01-17 11_25_41-Alternet.Studio.AllDemos - Microsoft Visual Studio

Regards
Martin

Your demos for the 8.1.8 installation still use 8.1.0 package references. That’s why it works.

Hi Martin,

Thank you for providing these details. We will look at it and include the fix in the next minor update.

As license checking for .NET Core is only performed during design time, you can instantiate SyntaxEdit control from the code as a workaround.

Kind regards,
Dmitry