InvalidCastException thrown after install on new machine

六月ゝ 毕业季﹏ 提交于 2019-12-04 18:04:50

Found it! I started stepping through my code and found that the two identical assemblies were actually different instances. I've been using the program as a class library for a web site. So in the working directory was a .dll of the project along with the .exe created when beginning the debug process.

On load, the program was loading both the .dll, and the .exe. All I had to do was go into the working directory, and delete them both. Then the error went away.

I understand your problem i think your code is not a managed code Your code should target the CLR. if you done that correctly your code can work anywhere No matter whether it is 32 bit or a 64 bit machine.

I may be wrong but try managed code in c# you will get Solution.

All the best

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!