Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add thirdparty library to Bonsai package leads to installation failure #2064

Open
GlassesSmith opened this issue Nov 28, 2024 · 1 comment
Open

Comments

@GlassesSmith
Copy link

Hi there,
I am developing a Bonsai.Source package for a thirdparty camera, which provides several non-managed library files. It goes all well in Visual Studio both debug and release mode. And the thirdparty dll files are also autocopied to the bin output folder with MSBuild by adding items in csproj.
However, while i try to install the package in Bonsai.exe with package manager, it complains somthing about thrid party dll files missing assembly manifest, as follows,
Screenshot 2024-11-28 135642
Can you guys provide some suggestion about how to tackle such problem? Or any suggestion that the thirdparty dll can be auto-copied to the same folder as package's lib{framework} when installing from package manger?

@J-M-White
Copy link

Hi,

When I was trying to get third-party dlls working for Bonsai.SpikeGLX, I found that I had to both include them and add a post-build command to copy them into the target directory. I've directly copied the relevant lines from the .csproj below:

<ItemGroup>
	<None Include="$(ProjectDir)..\..\modules\SpikeGLX-CPP-SDK\API\*.dll" Pack="true" PackagePath="runtimes\win-x64\native" />
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
	<Exec Command="xcopy /d /y &quot;$(ProjectDir)..\..\modules\SpikeGLX-CPP-SDK\API\*.dll&quot; &quot;$(TargetDir)&quot;" />
</Target>

Are you currently doing both of those things?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants