I have an addon that needs to use a library (managed DLL). Currently I do this by adding a reference to it in the .csproj of the project using the addon, like this:
<ItemGroup Condition="Exists('lib\MyLibrary.dll')">
<Reference Include="MyLibrary">
<HintPath>lib\MyLibrary.dll</HintPath>
</Reference>
</ItemGroup>
However, this is quite inconvenient, since anyone using my plugin will have to copy-paste that into their own .csproj manually. And it gets worse when dealing with managed libraries that depend on native libraries, since I'll need to add platform dependent condition-checks => more to copy!
Is there way to add this dependency to the addon directly, so that users can just add my addon to their project without having to do any extra work? Can addons somehow define their own .csproj files? (ideally without users having to manually include my .csproj from theirs)
Thanks!