How to solve warning “Referenced assembly targets a different processor than the application”

前端 未结 5 486
臣服心动
臣服心动 2021-01-03 19:06

I have been able to build my windows form application that access databases in SQL Server. All parts of the application are able to access the server apart from the part whe

5条回答
  •  迷失自我
    2021-01-03 20:10

    This error can also occur after a Windows 10 update if certain DLLs that you're using have been deregistered somehow. This is now the third time this has happened - and it causes normally fine CPU settings to appear broken.

    For me this keeps happening with Microsoft.mshtml - every major Windows 10 update!! - including the April 2018.

    Quick steps:

    • Open developer command prompt for visual studio (as administrator)
    • Run gacutil /l | find "Microsoft.mshtml"
    • Go to the folder C:\Windows\assembly\GAC\Microsoft.mshtml
    • Run dir and change to the directory
    • Run regasm Microsoft.mshtml.dll
    • Try to compile again

    http://techninotes.blogspot.com/2016/08/fixing-cannot-find-wrapper-assembly-for.html

提交回复
热议问题