Write addons in .net 5


is it current possibly to write add-ons also with .net 5 instead of .net-framework?
If not is it planned?

Thx & Regards

As I’ve understood, .NET 5 binaries are not backwards compatible with .NET framework (4.x) binaries.
All code would need to be compiled to target .NET 5, so the whole VC software would need to convert to use .NET 5 instead for such addons to work, and all old add-ons would cease to work as well.


So VC will long or forever stay on framework 4.x?

Do you think it works if an (working) 4.x addin has an reference to an .net 5 api. In my case that will happens soon in my case…

Thx & Regards

I think you won’t be able to use .NET 5 dlls in your add-ons. However, you might currently be able to use .NET Standard dlls, or even build your add-on targeting .NET Standard.


I think i will try to build the add-on targeting .net Standard 2.0 and Thema will Look further… -> Doesn’t work. -> I have to build the addon with dotnet5! :frowning:

Thx & Regards

If I do this I get following Error:

Unbehandelte Ausnahme aufgetreten:System.ComponentModel.Composition.CompositionException: Bei der Komposition ist ein Kompositionsfehler aufgetreten. Die Ursache wird unten angegeben. Die CompositionException.Errors-Eigenschaft liefert genauere Informationen.

  1. Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.

Ergebnis: Ausnahme beim Erstellen einer Instanz vom Typ “VisualComponents.Connectivity.Core.ConnectivityCore”.

Ergebnis: Teil “VisualComponents.Connectivity.Core.ConnectivityCore” kann nicht aktiviert werden.
Element: VisualComponents.Connectivity.Core.ConnectivityCore --> VisualComponents.Connectivity.Core.ConnectivityCore --> AssemblyCatalog (Assembly=“VisualComponents.Connectivity.Core, Version=, Culture=neutral, PublicKeyToken=31bc53bc7503b77a”)

Ergebnis: Export “VisualComponents.Connectivity.Core.ConnectivityCore (ContractName=“VisualComponents.UX.Shared.IPlugin”)” kann nicht aus dem Teil “VisualComponents.Connectivity.Core.ConnectivityCore” abgerufen werden.
Element: VisualComponents.Connectivity.Core.ConnectivityCore (ContractName=“VisualComponents.UX.Shared.IPlugin”) --> VisualComponents.Connectivity.Core.ConnectivityCore --> AssemblyCatalog (Assembly=“VisualComponents.Connectivity.Core, Version=, Culture=neutral, PublicKeyToken=31bc53bc7503b77a”)

bei System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
bei System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart part, ExportDefinition export, Boolean isSharedPart)
bei System.ComponentModel.Composition.Primitives.Export.get_Value()
bei System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
bei System.Lazy1.CreateValue() bei System.Lazy1.LazyInitValue()
bei System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() bei System.Linq.Enumerable.<CastIterator>d__971.MoveNext()
bei System.Collections.Generic.List1..ctor(IEnumerable1 collection)
bei System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
bei VisualComponents.UX.ShellViewModel.get_Plugins()
bei VisualComponents.UX.ShellViewModel.InitializePlugins()
bei VisualComponents.UX.Shell.AppBootstrapper.OnStartup(Object sender, StartupEventArgs e)
bei System.Windows.StartupEventHandler.Invoke(Object sender, StartupEventArgs e)
bei System.Windows.Application.OnStartup(StartupEventArgs e)
bei System.Windows.Application.<.ctor>b__1_0(Object unused)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Hope the compability of addons with dotnet5 will be adepted soon!?

Thx & Regards

So are you trying to make a Connection plugin using .NET 5 and your plugin is referencing the VisualComponents.Connectivity.Core.dll ?

If you absolutely must use code that is only available as .NET 5 binary, then only solution is probably to make it into a separate process and communicate with it using a VC plugin made with .NET Framework 4.

That is what I try to avoid!

I simply want to bring my existing AddIn:image
running in a .net5 or .netStandard Class Library… :frowning: