gritter Posted March 6, 2015 Share Posted March 6, 2015 (edited) This is a set-up issue. I need to include everything for using AutoIt in the Visual Studio solution folder so it's portable. I created a physical folder called "AutoItDLL" in the Test project of the application's solution file tree. In it I copied AutoItX3.Assembly.dll, AutoItX3.Assembly.xml, AutoItX3.dll, AutoItX3_x64.dll, along with most of the other files in the original AutoItX folder in the Program Files from a different VM. I created a reference to AutoItX3.Assembly.dll in my Test project. In my C# class file where I want to use AutoIt, I added a "using AutoIt;" statement. Within my function I tried to execute: AutoItX.WinWaitActive("file Upload", "", 5); AutoItX.Send(_filename); AutoItX.Sent("{Enter"}); The first statement throw a DllNotFoundException, saying that it can't find AutoItX3.dll. Like I noted above, AutoItX3.dll is in the same folder as the referenced AutoItX3.Assembly.dll within the Test project. Where do I need to put AutoItX3.dll? VS won't let create a direct reference to it? Do I need to add it as existing file to the project? #### Update ####### I tried moving AutoItX3.Assembly.dll, AutoItX3.dll and AutoItX3_x64.dll to the root folder of the Test project. I recreated the reference to AutoItX3.Assembly.dll at the new location and I added the other 2 dll to the project as files. I got the same result...a DllNotFoundException, saying that it can't find AutoItX3.dll. Edited March 6, 2015 by gritter Link to comment Share on other sites More sharing options...
Solution gritter Posted March 6, 2015 Author Solution Share Posted March 6, 2015 I just solved my problem myself. I was so close the last time. In addition to adding the 2 dll's to the project as files, I need to change their VS properties so they are copied to the output folder. By default, they are not copied. Maybe most everyone already knows that. I didn't. IMHO, it would be a nice addition to the documentation. verycoogreg 1 Link to comment Share on other sites More sharing options...
verycoogreg Posted April 12, 2016 Share Posted April 12, 2016 Hello "gritter", i have done the same as you did, but still get an error while running in TFS 2012 via MTM and Test Agent on VMs. The error would say that AutoItX3.dll could not be found. I have DLLs deployed to the output folder and see them there, but still no luck. What else am i missing ? Your help will be greatly appreciated. Regards, Greg. AutoItX3_DLL_Issue_VS2012.pdf AutoItX3_DLL_Issue_VS2012_Drop_Folder.pdf Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now