Hello,
Just wanted to share some experience with a support of AutoCAD Plant 2025 in cases where you have to support multiple AutoCAD Plants' in a scope of one solution.
It is possible to have one project in a solution that works both with .NET Framework and .NET Core by doing this:
1) Upgrade your project to .NET (Core) 8.0. See the instructions above.
2) Open .csproj file
3) Change the <TargetFramework>net8.0<\TargetFramework> to <TargetFrameworks>net48;net8.0<\TargetFrameworks>
In case you will try to build this project, then you will have two output directories: "bin\net48" and "bin\net8.0". Accordingly, there will be two .dll files, one for each framework. This resolution works great as soon as there is no binary compatibility between AutoCAD Plant 2025 and older versions.
Afterwards, it will be possible to change .csproj to reference required .dll files based on a required configuration. For example:
<ItemGroup And '$(TargetFramework)' == 'net48'">
<!--Reference old AutoCAD Plant API .dll files-->
</ItemGroup>
<ItemGroup And '$(TargetFramework)' == 'net8.0'">
<!--Reference new AutoCAD Plant API .dll files-->
</ItemGroup>
The only drawback of this approach is that you will not be able to use new features of the C# language. (Sorry for the quality of the image):
