0

We have an application that was built using .NET 3.5. There is a situation where it will run on a machine which only has .NET 4.0 installed.

If in the application configuration file the <supportedRuntime> element is not defined, or is defined as follows

<startup> <supportedRuntime version="v2.0.50727"/> </startup> 

will the application crash on start up since .NET 3.5 and CLR v2.0.50727 are not present?

Note I understand that .NET 4.0 APIs are supposed to be compatible with .NET 3.5 ones and that a .NET 3.5 application should run in .NET 4.0. That is not the question. I am specifically asking about the <supportedRuntime> behavior.

1
  • 1
    Yes it will crash. You'll need to add another one with version="v4.0" to make it run on .NET 4 Commented Jan 13, 2012 at 22:35

1 Answer 1

1

Adding Hans Passant's comment as it seems a suitable answer.

The application will crash. To run on .NET 4.0 you need to add another supportedRuntime attribute with version="4.0".

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.