I've upgraded a VB6 project to C# and I'm trying to run a winforms project and I have the Interop.InetCtlsObjects.dll file in my project and I've added a reference to it, but when I'm trying to run it I'm getting this error:
Could not load file or assembly
'Interop.InetCtlsObjects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
or one of its dependencies.
The system cannot find the file specified.
But I can see the file and I added a reference to it's exect location...
So what am I missing here ???
Delete the reference, save the project and add it in again. It is possible that you are somehow referencing a different version and the compiler cannot find the right DLL because of it. If that doesn't work, check your app.config and make sure the versions for this particular DLL match.
Related
My application is running fine on local, after i publish to azure web apps it gives me the error
Could not load file or assembly 'Microsoft.Practices.ObjectBuilder2, Version=2.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
how do I fix this? I do not even have the objectBuilder2, if its something I have to reference where do I get it?Please help
Microsoft.Practices.ObjectBuilder2 is part of Enterprise Library. See here
Do you use this library? If not, try to remove references to it. If you use it, then add appropriate .dll to your installation.
For me Microsoft.Practices.Unity references was broken. I've just removed and added it again and worked. Maybe any refereces to Microsoft.Practices.* that would be broken can show this error.
Place Microsoft.Practices.ObjectBuilder2.dll in bin folder of your web application, this will work.
I'm getting the following exception when trying to use the Google Auth API:
System.IO.FileNotFoundException : Could not load file or assembly 'System.Net.Http.Primitives, Version=4.2.28.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
----> System.IO.FileNotFoundException : Could not load file or assembly 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
The exception happens in Google.Api.Core.dll.
If I check the /Bin folder I can see Sytem.Net.Http.Primitives.dll in there and the version is 4.2.28.0.
I have tried updating the Microsoft HTTP Client Libraries NuGet package but that didn't help.
Is the problem something to do with a mismatch of .dll versions? If so how can I resolve that? Or is it something else entirely?
Double check if the assembly file is there in the bin folder and if its there, then try removing the reference and again add it to your project.
The version should be the same as expected. Also check on your web.config too for what it has about this particular assembly.
In your error code, I can see two different versions for the same file. Means probably, you are getting a clash between the existing assembly and the referenced assembly. Check you web.config for which version is referenced there and make sure you have the same version added to your project.
This link might help :
Could not find assembly System.Net.Http.Primitives
I am adding reference to Interop.ADOX.dll in my class library project "ABCD" in C#. When I built the project it builds fine. I can also access classes and functions provided by Interop.ADOX.dll.
But when I run the exe which uses my dll "ABCD", it throw error :
"Could not load file or assembly 'Interop.ADOX, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
I tried creating a separate sample class library and adding reference to the Interop.ADOX.dll and that works fine. No errors. So there is nothing wrong with the Interop.ADOX.dll file.
Also I know somehow in my project structure it is not able to find the Interop.ADOX.dll file and hence unable to load it.
So far I tried copying them at all the possible locations that I thought it might be
trying to access it from but that did not work...
Any suggestions that I can try out?
I found out something. In the project properties, Build Tab, when I chose platform target as any CPU then it throws error. But if I chose x86 it works fine. Why?
I downloaded an open source project written in C# and I can build that project. However, I got the error like this during run time:
Could not load file or assembly 'Interop.ComUtilitiesLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
This means it couldn't load the Interop.ComUtilitiesLib.dll file, I have checked in project root directory as well as in the Window/System32, still couldn't find the Interop.ComUtilitiesLib.dll file.
Any suggestion for me to fix this problem!
Does the project include a ComUtilities.dll file? If so, it might be a COM object that needs to be registered via the command line:
regsvr32 ComUtilities.dll
i have create a c# form application for parsing Html using Winista.html parser.
Now i have created a setup project for this and when i install the setup and run it generates error
System.IO.FileNotFoundException: Could not load file or assembly 'Winista.HtmlParser,
Version=1.8.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The
system cannot find the file specified.
File name: 'Winista.HtmlParser, Version=1.8.0.0, Culture=neutral, PublicKeyToken=null'
at Investigator.Form1.googleNewsSearcher()
Why is this happening ? Why is it not finding the dll , i pasted the winistal.HTMLParser in the bin folder ,and add reference to it .Is there any thing missing please help this is very urgent , i have to submit this?
Thank you
YOu have to add a reference, when you create a setup project it doesn't look in the bin folder for assemblies it checks references. You should be able to add the assembly to the setup project. I would suggest that you add it as a reference though.
You might also need to re-add the primary project to the setup project once you do this, but I think a rebuild should solve it once you added the reference to the assembly.
Update
Try right clicking on the reference and select copy always. This will insure that the assembly is always coppied to the bin folder.