1

I have a .NET 2.0 targeted C# windows forms application that is running fine on XP when .NET 3.5 is installed. However, when .NET 2.0 only is installed I get the error:

"WindowsFormsApplication1.exe - .NET Framework Initialization Error" - "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll could not be loaded"

I have tried this with a basic default windows forms application and encounter this error on XP SP1, SP2 and SP3 with .NET 2.0 installed.

Could there be some other step that I am missing?

Alan Spark
  • 8,152
  • 8
  • 56
  • 91

3 Answers3

1

I solved this by using .NET 2.0 SP1 rather than .NET 2.0.

Alan Spark
  • 8,152
  • 8
  • 56
  • 91
0

Yeah, you possibly use .NET 3.5 features. Ergo the 2.0 requirement is "fake" as in you ned 3.5 installed.

TomTom
  • 61,059
  • 10
  • 88
  • 148
  • Though I had hoped that Visual Studio would have told me about any .NET 3.5 features that I was using given that I am targetting 2.0. – Alan Spark Mar 12 '10 at 10:17
0

When you publish your application, verify if Framework 2.0 is checked in the "required components", and 3.5 unchecked.

Getz
  • 3,983
  • 6
  • 35
  • 52
  • I am not publishing the application, just compiling it and then trying to run it on a machine with .NET 2.0 installed. I did verify that 3.5 is unchecked and 2.0 is checked though. – Alan Spark Mar 12 '10 at 10:19