Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
4.04/5 (4 votes)
See more:
I have a project where I want to create a Component (Windows Forms).
Inside this Component I need to access methods from a Wrapper-DLL.
Every time I want to do this I get the message that the referenced DLL could not be found - at DesignTime !
If I use the same methods at Runtime all works fine.

I need a Suggestion ... ;)


Additional [26.06.16] :
Now I am a step further and also not ...
I created the Source-Code from the DLL (with ILSpy) and isolated one of the easier methods from it.
Now I know, that the issue comes from DLLImport - it seem that this command only work at RunTime-mode and not at DesignTime. Is there any possibility for a work-around or another way to solve the problem ?

What I have tried:

Find an answer with Google - without success ...
Posted
Updated 27-Jun-16 8:45am
v3
Comments
Bernhard Hiller 24-Jun-16 3:27am    
Do you enter the path to the dll as a fully qualified path or a relative path?
Is it a 64bit or 32bit dll, and what about your application?
Do you actually require the dll's functionality during design time?
Ralf Meier 24-Jun-16 3:35am    
I don't have the ability to change something inside the Wrapper-DLL - it's a 3rd-Party product.
I have a 32bit-application and (of course) I only could reference the Wrapper-DLL.
And Yes - I require the DLL's functionality during DesignTime.
Ralf Meier 26-Jun-16 4:21am    
Sometimes I like to know, how votings are made ...
No one answers this question ... but someone felt free to make a downvote.
If this question is to simple why isn't it answered ...?

1 solution

OK ... 3 days passed and many tries.
Now I have the solution.
In this case (like I described) the DLL-File must be placed (for example) in the Directory from the developing system - here "\Program Files\Microsoft Visual Studio\Common7\IDE"
It seems that the Engine makes a difference between RunTime (DLL must be placed in the Executable Directory) and DesignTime ...
 
Share this answer
 
Comments
phil.o 27-Jun-16 15:13pm    
Thanks for sharing your solution. Don't know why your question had been downvoted in the first place.
Ralf Meier 28-Jun-16 6:51am    
Thanks a lot for upvoting my question and also for the voting of my solution ... :)
phil.o 28-Jun-16 6:58am    
Oh, you're very welcome :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900