I wonder if it is possible to use .net5 to develop plugins for revit since the native platform for developing a plug-in for Revit is net47.
A simple test case showing a message in 2 different ways, MessageBox
from PresentationFramework
and TaskDialog
from Revit api
public class RevitExternalCommand : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
//MessageBox.Show("net 5 test");
TaskDialog.Show("net 5 test", "Revit");
return Result.Succeeded;
}
}
When TaskDialog.Show("net 5 test", "Revit")
is used everything is ok. The message show when command starts.
MessageBox.Show("net 5 test")
do not work because "could not load file or assembly" error: