0

I am new to deploying wpf in .net. I am building a form over a previous project. It contains 2 dll files for 32 bit and 64 bit machines. I can access the dll files when debugging. But when I deploy it, its not referenced at all. I tried to reference it by clcking add references i am getting the following error.

image of error message

can anyone help?

stuartd
  • 70,509
  • 14
  • 132
  • 163
khayin
  • 1
  • Without any further info, I suspect your dll might be built for a different .net framework version. At least that's when I usually get this error. The error is pretty common. You might want to look here for more ideas: https://stackoverflow.com/questions/3456758/a-reference-to-the-dll-could-not-be-added – Shrimperator Nov 16 '21 at 17:38
  • solved the issue. It was a post build command issue. Thanks for your comment. – khayin Nov 17 '21 at 10:10
  • Please post a solution as an answer so people coming across this later can see how you solved it :) – Shrimperator Nov 17 '21 at 13:27
  • set post-build event as `xcopy /d "$(ProjectDir)ReaderDLL\*.dll" "$(TargetDir)"` in project properties -> Build Events. i.e., copying the dlls to the target directory – khayin Nov 17 '21 at 15:19

0 Answers0