SharpDX v4.0.1 sharpdx_direct3d11_effects_x64.dll DLLNotFoundException

Last year, I asked the question how to solve a DllNotFoundException for sharpdx_direct3d11_effects_x64.dll with SharpDX.Direct3D11.Effects.dll version 3

Now I'm trying the same thing with version 4.

I was expecting the two DLLs sharpdx_direct3d11_effects_x64.dll and sharpdx_direct3d11_effects_x32.dll to be added to the Visual Studio project but they are not.

enter image description here

Has the deployment mechanism for these two DLLs changed?

Upvotes: 1

Views: 1040

Answers (2)

OK I got this to work thanks to @Leo-MSFT's answer above.

  1. I had to download the NuGet package from here.
  2. Rename to *.zip and unzip
  3. Copy the folders runtime/win-x64/sharpdx_direct3d11_1_effects.dll and runtime/win-x86/sharpdx_direct3d11_1_effects.dll to my project and set to Copy Always

This didnt' work so I now copied win-x64/sharpdx_direct3d11_1_effects.dll to the project root and renamed as win-x64/sharpdx_direct3d11_1_effects_x64.dll and set to Copy Always and it worked.

enter image description here

I'm sure this isn't intentional so I've reported a bug to SharpDX on Github.

Upvotes: 1

Leo Liu
Leo Liu

Reputation: 76760

Has the deployment mechanism for these two DLLs changed?

Yes, the author of this package xoofx has changed deployment mechanism for these two DLLs from the version 4.0.0-ci120. You can check the the 4.0.0 release notes about Updated D3D11.Effects to the new project system..

Besides, you can download two version of this packages, check the different with NuGet Package Explorer:

enter image description here

According to the official document: Supporting multiple .NET framework versions:

If you have architecture-specific assemblies, that is, separate assemblies that target ARM, x86, and x64, you must place them in a folder named runtimes within sub-folders named {platform}-{architecture}\lib{framework} or {platform}-{architecture}\native.

So the change in the deployment mechanism is correct.

Upvotes: 2

Related Questions