What is the difference between the settings properties <Compilation> and <httpRuntime>?

Asked

Viewed 102 times

3

I am going through some problems while learning to work with C#, more specifically with Asp Net MVC.

I saw a setup snippet on Web.config that left me a little confused, knowing:

<compilation debug="true" targetFramework="4.6.2"/>
<httpRuntime targetFramework="4.5"/>

As it is possible to notice, it seems that each one has configurations of targetFramework different.

I’d like to know:

  • What’s the difference between compilation and httpRuntime?
  • What each of these settings affects, in the case of the option targetFramework?

1 answer

1

As already answered by @Tetsuya Yamamoto in another question, briefly is this:

The compilation selects which version of . NET Framework reference assemblies is used when running the build.

And the httpRuntime to say that the current project was designed to use runtime assemblies of . NET 4.5 without recompiling existing design assemblies on the implementation machine before loading it into memory.

The targetFramework in the web.config serves to maintain compatibility issues between the changes of each version of the. NET Framework. And the difference between targetFramework in compilation and httpRuntime belongs to each environment of development and implementation.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.