aspnet command line tools location - asp.net

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.

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.

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.

Related

Does ASP.NET 4.5 require .NET 4.5 (or is 4.0 sufficient?)

There there is various information around, for example from Microsoft about the new features of ASP.NET 4.5.
http://www.asp.net/aspnet/overview/aspnet-and-visual-studio-2012/whats-new
However, they do not talk about .NET versions, only of ASP.NET Versions.
Is .NET 4.5 required (on the server) for ASP.NET 4.5? (or is 4.0 sufficient?)
Yes, you must install .NET 4.5 on the server if you want to run ASP.NET 4.5 applications. ASP.NET and .NET come bundled - you cannot have one without the other.
Some of features needs it.But you dont have to install if you are an end user
detailed information : http://msdn.microsoft.com/en-us/library/ms171868(v=vs.110).aspx

ASP.NET 2.0 or 3.5?

There was a time that I thought the current non-beta ASP.NET claimed the version number of the current .NET CLR (2.0), even though the .NET Framework was version 3.5. Whenever I saw "ASP.NET 3.5", I felt that whomever had written it was incorrect.
However, I'm starting to feel that I'm incorrect. Has the official ASP.NET version number changed from 2.0 to 3.5 (during the time that the .NET Framework version has been 3.5), or has it always officially been "ASP.NET 3.5" (and I've been an idiot)?
In terms of the CLR, there is only 2.0; in terms of the libraries, there are definite changes in ASP.NET in the .net Framework versions 2.0, 3.0, 3.5 and 3.5 SP1 (see MSDN, for example).
Since there are feature changes, I would call it "ASP.NET 3.5".
However, to make things worse, the drop-down box in IIS where you can select either "1.1..." or "2.0...." is called "ASP.NET version". Of course, IIS is referring to the CLR version here.
I've been unable to find an "official" statement on this (I haven't looked hard, though). Microsoft seems to avoid this problem. In the above MSDN link, they write about "ASP.NET Enhancements in .net Framework 3.5 SP1".
So, strictly speaking, I guess ASP.NET does not have a version number, just like WinForms does not have a version number or System.String does not have a version number. "ASP.NET 3.5" is just an informal abbreviation for the ASP.NET part of the .net Framework 3.5 libraries.
Yes, ASP.NET 2.0 and ASP.NET 3.5 are different. 3.5 is the most current non-beta release. Both 2.0 and 3.5 use the 2.0 runtime environment.

Installing .NET 3.5 on a server with .NET 2.0 applications

I would like to upgrade my web projects on an IIS 5 server from .NET 2.0 to .NET 3.5. These web applications live on a server with other web applications that will not be upgraded to .NET 3.5. The server administrator is reluctant to install .NET 3.5 because he is afraid it will break the applications on that machine that are running 2.0 and 1.1.
As far as I know this WON'T be a problem since .NET 3.5 is an addition to 2.0 more than it is a new Framework. I would like the communities help gathering evidence to show him that their concerns are moot and it won't hurt the other applications.
Thanks in advance.
If you have .NET 2 SP1 you shouldn't have a problem.
To be exact .NET 3 & 3.5 are built on top of .NET 2.0 SP 1, we had a problem deploying 3.5 onto a server which only had .NET 2 (not SP1) and it caused the apps on there to break. The reason is your core framework assemblies in .NET 2 are upgraded and have new version numbers which the app wasn't compiled against.
It won't have any problem and you will be able to run your 2.0 and 3.5 application using the same server. This is because the code base for both of the frameworks is the same.
Walk the server administrator through the content of the redistributable for 3.5. It adds a lot of new dlls it doesn't update anything in the 2.0.x directory. You might want to show him how the apps targeting 3.5 are still using System.dll etc from the 2.0.x framework directory.
Both frameworks can run concurrently. In fact, that is the default behavior.
One caveat though, make sure that you don't use the same application pool for apps using different versions of the framework. Otherwise you will get "Server Application Unavailable" errors. Use a different app pool for each set of applications.
Installing 3.5 will modify your .NET 2.0 web.config file and a few others.
This certainly breaks at least 1 application I use. Uninstalling 3.5 will revert the files and fixes the issue.
I've upgraded a couple servers from .net 1.1 to 2.0 & 3.5ץ there haven't been any problems.

Why does System.Environment.Version report framework 2?

In a web site targeted for Framework 3.5, on a machine with up to 3.5 SP 1 installed, when I call System.Environment.Version in a page, it reports 2.0.50727.3053. Can anyone suggest why this happens?
It is telling you the CLR version, which is still 2.0x; it jumps to 4.0x in .NET 4.0 - but until then, all of .NET 2.0, .NET 3.0 and .NET 3.5 share a CLR version (give-or-take the small numbers ;-p)
Because the underlying CLR for .NET framework 3.5 is still 2.0.50727.3053.
.NET 3.0 and 3.5 are additions to .NET 2.0 - the underlying CLR is still the same.
This will change with .NET 4.0 with a new CLR 4.0.
Marc
The MSDN docs for Environment.Version say this:
Gets a Version object that describes the major, minor, build, and revision numbers of the common language runtime.
The CLR version in 3.5 SP1 is still 2.0.
Hence, no error, it behaves exactly as documented.

Upgrade to ASP.NET 3.x

I am currently aware that ASP.NET 2.0 is out and about and that there are 3.x versions of the .Net Framework.
Is it possible to upgrade my ASP.NET web server to version 3.x of the .Net Framework?
I have tried this, however, when selecting which version of the .Net framwork to use in IIS (the ASP.NET Tab), only version 1.1 and 2.0 show.
Is there a work around?
if I install 3.5 and have IIS setup to use 2.0. I will be able to use 3.5 features?
Yes, that is correct. You have IIS set to 2.0 for both 2.0 and 3.5 sites, as they both run on the same CLR. 3.5 uses a different compile method than 2.0. This is declared in the web.config for the site. See this post for more details on this. But the setup in IIS for both 3.5 and 2.0 ASP.net sites is identical.
Unfortunately, the statement .NET versions can be installed side-by-side, so it won't disrupt any "legacy" apps isn't entirely true. If you install 3.5, it requires 2.0 SP1, which can disrupt legacy applications that uses 2.0 and connects to Oracle database servers.
Sure, download the 3.5 redistributable, install it on the servre, and you're good to go. .NET versions can be installed side-by-side, so it won't disrupt any "legacy" apps.
http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en
GateKiller,
.NET 3.0 and .NET 3.5 did not change the version of the CLR, so "using ASP.NET 3.5" is a more complicated thing that it sounds like it should be at first. In essence, you're still running on the 2.0 CLR, but you're using the C# 3.0 compiler and linking against the 3.5 libraries. It means adding a bunch of stuff to your Web.config file to become an ASP.NET 3.5 project.
Scott Hanselman has an awesome blog post covering the details:
http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx
The version you are selecting in IIS is the version of the CLR to use. There are only two versions of the CLR. The .NET Framework 3.5 runs on CLR 2.0
The new framework is .Net 3.5, you'll have a new assembly System.Core, + a few more if you use features like Linq
.Net 3.5 comes with the new C#3.0 compiler
ASP.Net is still version 2.0
Lovely and confusing isn't it ;-)
You should upgrade the .Net framework on the server to .Net 3.5 SP1, but you're still going to be running ASP.Net 2.0

Resources