0

Hi I have just created an application with VS2003 targeting .Net framework 1.1.

I just can't run/launch this application as it fails to start .. following is the error I get:

enter image description here

When I select "No" for debugging it throws the following exception in the console.

Unhandled Exception: System.TypeInitializationException: [Resource lookup failed

- infinite recursion detected. Resource name: TypeInitialization_Type] ---> Sy stem.NullReferenceException: [Resource lookup failed - infinite recursion detect ed. Resource name: Arg_NullReferenceException] at System.Resources.ResourceReader.StripVersionField(String typeName) at System.Resources.ResourceReader.InitSafeToDeserializeArray() at System.Resources.ResourceReader.ReadResources() at System.Resources.ResourceReader..ctor(Stream stream, Hashtable table) at System.Resources.RuntimeResourceSet..ctor(Stream stream) at System.Resources.ResourceManager.CreateResourceSet(Stream store) at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo cultur e, Boolean createIfNotExists, Boolean tryParents) at System.Resources.ResourceManager.GetString(String name, CultureInfo cultur e) at System.Environment.GetResourceString(String key) at System.Globalization.CultureInfo..ctor(Int32 culture, Boolean useUserOverr ide) at System.Globalization.CultureInfo..ctor(Int32 culture) at System.Globalization.CultureInfo..cctor() [Resource lookup failed - infinite recursion detected. Resource name: Except ion_EndOfInnerExceptionStack] at System.Globalization.CultureInfo.get_UserDefaultUICulture() at System.Threading.Thread.get_CurrentUICulture()

Same application if I build with VS 2005 or any other version it works fine. I have tried to reinstall VS2003 and the Microsoft .NET version 1.1 but it does not help. If I rename the folder C:\Windows\Microsoft.NET\Framework\v1.1.4322 Then the program runs fine(apparently it falls back to higher version of .Net Runtime).

I am not able to figure out what changed in the system to trigger this and how to fix this issue. Things were working fine till a few weeks ago. This is Win7 64 bit machine.

6
  • You can't run an application targeting an old runtime unless that runtime is installed on the machine. .NET 1.1 is very old, way beyond deprecated and won't be found on any machine unless you install it. The Visual Studio version has nothing to do with this Commented Aug 31, 2015 at 8:46
  • Why did you create an application using VS 2003 anyway? .NET 1.1 isn't supported any more and all current versions of Windows work just fine with the latest runtime versions Commented Aug 31, 2015 at 8:48
  • Thanks . agree it's quite old. But I do have Framework 1.1 installed and the application was working fine till some time back. Commented Aug 31, 2015 at 8:48
  • "Same application if I build with VS 2005 or any other version it works fine." sounds like you solved your problem. Commented Aug 31, 2015 at 8:49
  • 1
    The exception mentions an infinite recursion while trying to retrieve the current culture. Did you change your machine's or user's locale? Did you change the application's UI culture explicitly to one not supported by 1.1 ? Have you done anything to change how the fallback culture is determined? Commented Aug 31, 2015 at 8:53

1 Answer 1

1

The exception call stack shows an error occurs when you try to retrieve the current UI culture. While the error message mentions an infinite recursion, the actual exception is a NullReferenceException. The most likely reason is that you changed the application's UI culture has changed to a culture that wasn't supported by .NET 1.1.

The UI culture matches the OS and/or user's display language by default, which means that you probably changed the OS display language recently.

The UI culture can also change through configuration settings or programmatically.

Sign up to request clarification or add additional context in comments.

1 Comment

This is what was causing issue for me. The format in my regional settings was changed to "English [India]" . I had visited this in the past also but ignored the '[India] ' part. I just checked the locale was still English. Anyways I confirmed this now .. If I switch the format back to 'English[US]' .my console app works and when I switch it to 'English[India] ' it does not work. Note that my console based application is just a hello world application that is doing Console.WriteLine("Hello World").

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.