mono / mono-addins

Mono.Addins is a generic framework for creating extensible applications, and for creating add-ins which extend those applications.
MIT License
164 stars 93 forks source link

Failed to run after migrating to netstandard2.1 and net6.0 #188

Closed haolvran closed 1 year ago

haolvran commented 1 year ago

Hi Guys,

We had TargetFramework set to net472, and the Mono.Addins works perfectly.

<PackageReference Include="Mono.Addins" Version="1.3.13" />

However, we are migrating to net6 project. it failed to load the dependencies although we did not change any code and addins. Do you guys know any reason? Thanks

The errors are as following: WARNING: [Client12Addins.Bootstrap,1.0] Could not load some add-in assemblies: Format of the executable (.exe) or library (.dll) is invalid. WARNING: The add-in 'Client12Addins.DotK.Application,1.0' could not be updated because some of its dependencies are missing or not compatible: missing: Client12Addins.Bootstrap,1.0

In Bootstrap project which is a net6.0 project, we have: <?xml version="1.0"?>

In the other project which is a netstandard2.1 project, we have this

<?xml version="1.0" encoding="utf-8" ?>

haolvran commented 1 year ago

The issue had been fixed by changing the exe to dll for running time. I changed the following:

  <Runtime>
    <Import assembly="Xyz.exe"/>
  </Runtime>

to:

  <Runtime>
    <Import assembly="Xyz.dll"/>
  </Runtime>

Of course, plus add nuget package Mono.Addins.CecilRefector