tags:

views:

67

answers:

2

Hi,

I'm trying to deploy an application written in wpf c#. I use an external library (irrklang). I added a reference in visual studio to that dll (it is placed in the same folder as the executable). It shows up in my application files, I deploy, install on a different machine and I get the file not found exception. I looked up the exe folder and the DLL is in the folder.

What am I doing wrong, the reference seems to be correct but the program isn't finding the dll at all

UPDATE: added solution below. Still same error:(

+3  A: 

Check the following points:

  • Properties of the DLL -> Use local copy = true
  • Project Properties -> ClickOnce Properties -> ApplicationFiles -> Check if your dll is enlisted and manually set "Include" on it.

Then try again. ClickOnce often has annoying bugs.

JanW
Thought those were set like you say, I'll try and let you know
internetmw
Just what I was typing, but VS took an age to start up so I was still double checking.
ChrisF
Nope still same error
internetmw
hmmm downloaded irrklang lib (4.0) and integrated it in a VS 2010 Wpf Project and built it -> the dll appears. Than i ran clickonce -> dll is within deploy. If you like i can send you the project
JanW
Yes the dll is in my deployment as well but when running the app, it says system notfound exception... Is there any way to view into this error more deeply so I can track where the program is looking?
internetmw
Awww. I misread your question sorry. I'll test a bit arround again
JanW
Maybe wise to add: installing app on dev machine works fine
internetmw
Okay. I got this work anyway. Also tested it on a remote machine. Both configurations: Win7 x64 Net.40 and visual studio 2010 installed. Maybe it has something todo with your environments. Check if net framework is installed on both in your build version. If you have a WPF application, dont build it with "Net X.0 Client Profile", but with the full profile. ClickOnce errors can be checked if you click the Details button when the ClickOnce fail dialog comes up. I still offer you to upload my vs2010 solution if you like it for comparison reasons.
JanW
Hmm still clueless in that case. I would be grateful if I could compare it to your project.
internetmw
I uploaded it to my ftp:http://upload.mymoep.de/ClickOnceTest.zipIt is a WPF application, which in the constructor instanciates a *AudioFormat* struct from the irrklang lib. than it reads the value of the BytesPerSecond property and shows it in a MessageBox.Hope the direct comparison can finally help you. Good Night,Jan
JanW
Thank you very much! I'll accept the answer for all your efforts :)
internetmw
I published your solution and installed it on a different machine which doesn't have visual studio but does have .net 4 and your app crashes and I suspect it's the same error.
internetmw
Hm very strange. Thank you for accepting. So for now the only thing you know now is, that it has something todo with your 2nd machine. Just tested it on 3 other remote computers. All worked fine. I suggest you to write a log file and evaluate how far the application comes. Maybe something else is missing or the .NET installation is corrupted.
JanW
I don't know how to write a very detailed log file. I currently have a messagebox showing me the innerexception but that only shows: System.IO.NotFoundException irrklangNET4.dll
internetmw
A: 

Found it, the external dll requires the visual studio redistributable.

internetmw