C# windows application Event: CLR20r3 on application start

前端 未结 5 759
生来不讨喜
生来不讨喜 2020-12-13 20:04

I created a C# application and installed it on my test box. My app works perfect on my dev box, but when I install in on a different machine it crashes in the Main(). I get

相关标签:
5条回答
  • 2020-12-13 20:49

    Have been fighting this all morning and now have it solved and why it happened. Posting with the hope it helps others

    I installed the Krypton.Toolkit which added the tools to the Visual studio toolbox automatically. I then added the tools to the designer, which automatically added the dll to the projrect references, however the toolkit was marked as CopyLocal=false

    I built an installer, using all dlls in the release build folder (of course the above dll wasn't there).

    Setting copylocal=true, then rebuilding the installer, everything worked fine.

    0 讨论(0)
  • 2020-12-13 20:51

    To solve CLR20r3 problem set - Local User Policy \ Computer Configuration \ Windows Settings \ Security Settings \ Local Policies \ Security Options - System cryptography: Use FIPS 140 compliant cryptographic algorithms, including encryption, hashing and signing - Disable

    0 讨论(0)
  • 2020-12-13 20:55

    I encountered the same problem when I built an application on a Windows 7 box that had previously been maintained on an XP machine.

    The program ran fine when built for Debug, but failed with this error when built for Release. I found the answer on the project's Properties page. Go to the "Build" tab and try changing the Platform Target from "Any CPU" to "x86".

    0 讨论(0)
  • 2020-12-13 20:59

    .NET has two CLRs 2.0 and 4.0. CLR 2.0 works till .NET framework 3.5. CLR 4.0 works from .NET 4.0 onwards. Its possible that your solution is using a different CLR than your reference assemblies. In your local development environment, you might have both the CLRs and hence you did not faced any problem. However when you moved to deployment environments, they might have a single CLR only and you got this error.

    0 讨论(0)
  • 2020-12-13 21:01

    I've seen this same problem when my application depended on a referenced assembly that was not present on the deployment machine. I'm not sure what you mean by "referencing DotNetBar out of the install directory" - make sure it's set to CopyLocal=true in your project, or exists at the same full path on both your development and production machine.

    0 讨论(0)
提交回复
热议问题