Re: automatic namespace importing
From: Natan (nvivo_at_mandic.com.br)
Date: 12/17/04
- Next message: Dorte: "Get current windows domain name"
- Previous message: Nikolay Petrov: "Re: Custom types"
- In reply to: Juan T. Llibre [MVP]: "Re: automatic namespace importing"
- Next in thread: Juan T. Llibre [MVP]: "Re: automatic namespace importing"
- Reply: Juan T. Llibre [MVP]: "Re: automatic namespace importing"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 17 Dec 2004 09:11:50 -0200
Juan T. Llibre [MVP] wrote:
> I think we may be nearer to narrowing down
> what is happening here.
> That generated output is *not* the result of parsing and compiling
> the page by ASP.NET, but the result of the csc.exe compiler
> compiling the page, just as it would have been the result of the
> vbc.exe compiler, if VB had been the language declared in the page.
Ok. Now think in what you said. Does it really make sense? "lets include
an html parser in the C# compiler"... i don't think so.
Yes, CSC compiles the code, but doesn't generates this class from html.
This is because it is specific to ASP.NET how it parses the page and
creates the class. CSC's job is just to compile C# code, nothing more.
There are some classes in .NET that generates code from xml, and this is
probaly generated by them. But who parses the html and generates the
input to this tool is ASP.NET. Because ASP.NET is responsible for this,
not CSC.
> I have quite an interesting .NET/ASP.NET setup, because I'm running
> Windows Server 2003, which includes .Net Framework 1.1 "out of the box",
> which means I didn't have to install it.
Yes, because Win2003 comes with .NET 1.1.
> I afterwards installed VS.NET 2005, which installed .Net Framework 2.0.
>
> Here's the interesting thing :
>
> I've *never* compiled any .NET 1.1.4322.2032 projects
> ( like for example, the ASP.NET Forums... ) with VS.NET 2005.
1.1.4322.2032 is the version of .NET 1.1 SP1, not VS.NET 2005.
> Here's the key:
>
> I did a search for source files ( .vb or .cs ) of the type which have the
> "This code was generated by a tool" disclaimer, in the "Temporary
> ASP.NET files"
> folder, and *only* found files generated by VS.NET 2005 with this
> disclaimer :
>
> "This code was generated by a tool.
> Runtime Version:2.0.40607.16"
So, here we go. Please, forget about VS.NET. .NET doesn't depend on
VS.NET to work. It is just a tool to help you create applications.
You got this because you installed .NET 2.0. After installing it, all
your asp.net pages are compiled with .net 2.0. You can change this in
your website properties in IIS.
> I did *not* find any files with the disclaimer for "Runtime Version
> 1.1.4322.2032",
> even though they were equally processed by ASP.NET.
Because it is processed by .NET 2.0 =)
> This leads to the inescapable conclusion that it is *not*
> ASP.NET which is compiling the .aspx files, as you claim,
> and that it *is* the underlying compiler ( csc.exe or vbc.exe )
> which is doing the compiling, the results of which *then* are
> processed by aspnet_isapi.dll.
I can't understand how you got to this conclusion. "the numer is 2, not
1.. so csc is an html parser". this doesn't make sense.
What you discovered is that your code is generated by a different
version of the same tool, but you didn't see anything telling that csc
is parsin html pages.
When I tell you ASP.NET parses the page to generate the class, the real
process probably involves lots of classes in Microsoft.CSharp too. But
the one who parses the html and tell how to create the class is ASP.NET.
That is why you have System.Web.Compilation...
> No. The aspx page is compiled by either csc.exe or vbc.exe,
> depending on the language declared for the page, and ASP.NET
> ( aspnet_isapi.dll ) has nothing to do with the code until it processes
> the MSIL generated by the appropiate compiler.
Of course it is compiled by csc. But not generated. That is why csc is
called "c sharp compiler" not "asp.net html parser".
Take a loot at this and this is probably how things work.
http://myxaml.com/marcclifton/archive/2004/04/21/223.aspx
so asp.net generates common input to some parser which given an language
type generates the real output. csc only compiles it.
[Tired...]
- Next message: Dorte: "Get current windows domain name"
- Previous message: Nikolay Petrov: "Re: Custom types"
- In reply to: Juan T. Llibre [MVP]: "Re: automatic namespace importing"
- Next in thread: Juan T. Llibre [MVP]: "Re: automatic namespace importing"
- Reply: Juan T. Llibre [MVP]: "Re: automatic namespace importing"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|