Rbelliveau

I have a VB .NET app that I've been working on for quite some time. The app has been working fine with no problems. I have recently been charged with Internationalizing the app. Since I have never done this before I searched for information and came across a walkthrough (http://msdn2.microsoft.com/en-us/library/y99d1cd3(VS.71).aspx).

It seems straight forward enough so I began working on the project. The startup form was no problem, however the primary form is giving a "Common Language Runtime detected an invalid program" error immediately upon hitting the InitializeComponent line in Sub New. I reverted back to the original form and verified that all was well. I then set the Localizable property of the form to True. Without making any other changes I rebuilt the app and ran it. I got the same Common Language Runtime error.

Has anyone run into this before Any ideas on how to resolve this



Re: Architecture General Localization Causes Common Language Runtime detected an invalid program error

frederikm

Hi

did you create any culture specific resources

did you set the default culture in your site

Hope this helps you out






Re: Architecture General Localization Causes Common Language Runtime detected an invalid program error

Rbelliveau

I am posting what I found in case anyone else hits this problem. In my case the problem appears to be related to the context menus. I went through thousands of lines of code and then started deleting the controls one at a time until the error did not occur. Through much trial and error I found that once three of the context menus were eliminated the problem disappeared. The only thing that was different about the context menus that I deleted as compared to the others on the form is that the ones that were deleted had more than ten items on them. I did some experimenting. I started with the original form and deleted the three context menus. I then created three brand new context menus and added ten items to each menu. When I added an 11th item to any menu the CLR error returned.

It took me a long time to get to this and my workaround was to create the context menus programmatically.





Re: Architecture General Localization Causes Common Language Runtime detected an invalid program error

Panagiotis Kanavos

I can't get this to work in VS 2005. I created a clean form with three contect menus, one of them containing 11 item and assigned to the form itself. The form was localized to the default and another language.