[ACCEPTED]-C# windows application Event: CLR20r3 on application start-file-not-found

Accepted answer
Score: 22

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

Score: 3

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

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

Score: 3

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

Score: 0

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

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

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

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

More Related questions