简体   繁体   中英

aspnet command line tools location

Microsoft provides a number of command line tools for working with asp.net applications. I haven't had any trouble using these tools. One thing that I can not understand though, is the location of these tools.

Even for applications targeting newer versions of .net, these tools are located in the .net v2 directory. On my machine, that's C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727 . Why do these tools not exist in the v3.0 or v3.5 directories? And why do the ones in the older directory work on the newer framework?

This is more of an idle curiosity than required knowledge for me, but I would like to know.

Update:

Thanks for the good answers everyone. These answers raise a new question though. I hope you will forgive me for asking it here, since it is so highly related. If .net 3.5 is really just using the CLR from 2.0, why is 2.0 compatible with Windows 2000, but not 3.5? It would seem to me that if the updates in 3.0 and 3.5 run inside the framework of the earlier version, then they must maintain compatibility with the same platforms as the earlier version too. Why is this wrong?

.NET 3.0 and 3.5 are (basically) just library additions to the 2.0 framework .

The addition of .NET 3.0 didn't mean new compilers or a new CLR. Instead, it's three major new libraries: WCF (Windows Communication Foundation née Indigo), WPF (Windows Presentation Foundation née Avalon) and Windows Workflow or WF.

Basically, remember Framework version != CLR Version. If you configured an IIS Application to use .NET 2.0, you're talking about the 2.0 CLR. WCF Applications use the .NET 2.0 CLR with the new 3.0 WCF libraries.

* .NET Framework 1.x = CLR 1.x
* .NET Framework 2.0 = CLR 2.0
* .NET Framework 3.0 = CLR 2.0
* .NET Framework 3.5 = CLR 2.0 + (C# 3.0 | VB9)

Edit : To answer your second question, .NET 3.0 and 3.5 have new libraries which reference OS-level features like WPF , which isn't available on Windows 2000. If you write an application in 3.5* but only use functionality and libraries that were also available in 2.0, it can still work on Windows 2000.

*by "in 3.5", we mean write it in Visual Studio 2008 under 3.5 but set your Project Target Framework to 2.0. Scott Hanselman talks about doing this to get ASP.NET MVC to work on .NET 2.0.

v3.0 and v3.5 still uses the v2 DLLs for the core files. Most of the changes are additions to the v2 framework as well as a new compiler for 3.5.

It is because the core of .Net has not actually been changed since v2.0. MS marketing types were much derided at the time for forcing the naming scheme in use, where .Net 3, and .Net 3.5 are really just adding additional libraries that run on the .Net 2 core.

Check out Scott Hanselman's blog post for more details.

Because .NET 3.0 and 3.5 are applications of .NET 2.0, not complete, standalone frameworks unto themselves. This is further see in the IIS config, where you only have the option to select .NET 1.0, .NET 1.1, and .NET 2.0. You web.config file will include any .NET 3.0 or .NET 3.5 assemblies as these are written, ultimately, with .NET 2.0 code. More details about that can be seen here: http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx

Of course, that all changes in .NET 4.0 which will be a completely "new version" of the framework.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM