I have built a small project to show a MetroAppForm of Dotnetbar and it run fine when I run with .net-2.0. But when I run it with .net-4.0 or 4.5 it will thrown an "InvalidProgramException: Common Language Runtime detected an invalid program".
How can I fix this problem, I have tried some way but it not work.
Asked
Active
Viewed 1,153 times
0

dangquang1020
- 496
- 3
- 7
- 23
1 Answers
0
It looks like a bug of 4.5 and 4.5.1. You could try to install a newer version of .Net.

Boris Sokolov
- 1,723
- 4
- 23
- 38
-
1*"It looks like a bug of 4.5 and 4.5.1"* I highly doubt that, do you have anything to back that up? I'm guessing its an incompatibility with Dotnetbar and 4.0 or 4.5. – Ron Beyer Oct 26 '15 at 18:29
-
There were similar problems with 4.5 on x64 systems. Newest version of DotNet Bar is compatible with VS 2015 and fresh versions of .Net. However, it would be nice to know the DotNet Bar version as well) – Boris Sokolov Oct 26 '15 at 18:42
-
I would cite your source, since I can't find anything showing that big of a bug getting through. You may want to say "install a newer version of **Dotnetbar**, not .NET. I'm assuming its an older version if its 2.0 compatible. – Ron Beyer Oct 26 '15 at 18:43
-
I think, dangquang1020 could try to update the .Net Framework. And if it wouldn't help - add some more info. I don't think Dotnetbar Metro is too old. For .net 2.0 they had only Office-like ribbons – Boris Sokolov Oct 26 '15 at 18:57
-
I have updated the .Net framework but not resolve the problem, I am using Dotnetbar 12.1 and it run fine at x86 but not x64. When I change to use .net-2.0 the issue is disappearance. – dangquang1020 Oct 26 '15 at 19:44
-
Are you able to share the sources for your prototype – Boris Sokolov Oct 26 '15 at 21:17
-
I guess that due to the incompatible between Dotnetbar and .NetFr-4.0. Because when I remove the MetroStatusBar control from my form, the issue is not occur. I will share the source on Git. – dangquang1020 Oct 27 '15 at 02:46
-
Here is the source demo on Github: [MetroBill](https://github.com/dangquang1020/MetroBill) – dangquang1020 Oct 27 '15 at 03:37
-
Ron was right. You should switch to the DotnetBar 12.5. I have replaced Dll in your project and it worked fine – Boris Sokolov Oct 27 '15 at 17:52