CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: NewsGroup Date Entered: 4/25/2005 5:01:30 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 15 Views: 51 Favorited: 0 Favorite
16 Items, 1 Pages 1 |< << Go >> >|
FrEaK_@CH
Asp.Net User
VS2005 Beta2 Precompilation4/25/2005 5:01:30 PM

0/0

Hi

Can someone explain me the sense of the precompilations model in Visual Studio 2005?? What is the advantage to compile each Web Form separately  (and have for each Web Form a separate DDL) instead of having one global DLL?  I did not read anywhere, what the advantage should be...

Thanks! Big Smile [:D]

 

chrisbond
Asp.Net User
Re: VS2005 Beta2 Precompilation4/26/2005 2:54:32 PM

0/0

Automatically pre-compiles it for asp.net so it doesnt have too and strips the html (try viewing any of the .aspx pages source code) also removes the .cs or .vb source files.  Theres better descriptions of what it does elsewhere than what ive just wrote go google =)
FrEaK_@CH
Asp.Net User
Re: VS2005 Beta2 Precompilation4/26/2005 3:46:03 PM

0/0

I know what the pre-compilation does, but what's the sense behind this new compilation model?
chrisbond
Asp.Net User
Re: VS2005 Beta2 Precompilation4/26/2005 4:02:48 PM

0/0

Mainly to stop that annoying delay you experence with <2.0 framework.

FrEaK_@CH
Asp.Net User
Re: VS2005 Beta2 Precompilation4/26/2005 4:17:07 PM

0/0

hmm....for that it is necessary to compile each web form separately?? Tongue Tied [:S] a little bit strange... but I hope that I will get accustom to it! Big Smile [:D]
SimonCal
Asp.Net User
Re: VS2005 Beta2 Precompilation4/26/2005 4:56:57 PM

0/0

There are several reasons to consider the pre-compilation tool for ASP.NET

1. In-place pre-compilation means that the site will be primed and can therefore avoid the first time hit penalty in regular conmpilation

2. Pre-compialtion for deployment means that you have 2 new scenarios or potentials for site deployment or packaging. In these 2 modes, you can create a target that can be deployed that has both source and markup files 'removed', or just the source 'removed'. If for example you are shipping an applkication to a 3rd party, then most likely you

'll want to protect source nad markup. If you are simply deploying to production, then it is likely you'll not want actual source code out on the production server. In this case, the markup could remain and allow specific changes, without modifying backend source code, or code behind source code.

Does this make sense?

Simon.


Simon
This posting is provided "AS IS" with no warranties, and confers no rights.
FrEaK_@CH
Asp.Net User
Re: VS2005 Beta2 Precompilation4/26/2005 5:13:44 PM

0/0

yes, this makes sense...

but, (I don't know how I could explain this correctly), why is now each web form separately compiled? in vs.net 2003, I have one single DDL with all my source code (code behind). in vs2005 I have for each web from a DLL (and for the app_code classes a DLL).

omar_k
Asp.Net User
Re: VS2005 Beta2 Precompilation4/27/2005 4:02:24 PM

0/0

VS2005 uses dynamic compilation because it improves development time scenarios significantly.  At the same time we also provide precompile/publish to address build and deployment scnearios.

At development time, having dynamic compilation provides several benefits:

1) Fast iterative development style.  Developers can now edit a ASPX page or code behind file, hit save, and refresh in the browser.  A user does not have to build the entire web project to run a single page.  With very large web apps and repeated iterations, this becomes a noticeable productivity gain.

2) Better team development scenarios.  Multiple users can now work on the same web site in an easier fashion.  As an example, if certain pages in the website contain errors, a developer isn't blocked on editing, running and debugging other pages in the website.  In contrast in VS2003, you were always blocked from testing any pages until all compile errors were fixed.

In terms of build & deployment and precompile we provide several options:

1) Full compile vs Updateable.  Updateable is similar to VS2003 where ASPX pages are not compiled but code-behind files are.  Full compile provides further benefits of hiding all ASPX code as well.

2) Batch vs. No Batch.  In Beta2, the precompile option does "No Batch" meaning each ASPX page is its own DLL.  We will be changing the default setting to do "Batch" compilation in final release to be more consistent VS2003, where all webforms in a folder get compiled into a single DLL.  NOTE - you will still get multiple DLLs, but they will be per folder, not per webform.  VS2005 doesn't provide UI to control the Batch/No-Batch option, however you can set this via the command line precompile tool.

Hope this helps.


Omar Khan
Visual Studio Web Tools
SimonCal
Asp.Net User
Re: VS2005 Beta2 Precompilation4/27/2005 7:51:57 PM

0/0

I meant to post this yesterday, but I see Omar has replied too.. :)

In VS2003, the code-behind files and other class files were compiled to a single assembly. There were several drawbacks to this that the new compilation model (outside of the pre-compilation tool) removes. For example:

  • Any changes to code behind files required a full recompilation of the assembly and an app-domain restart.
  • Team development on separate files or sections of the app was hampered, by the requirement for the assembly
  • Aa 'pre-compilation' step that required all code-behind files and class files to be compiled before any pages, independantly of the aspx pages or app
  • Development scenarios are quicker
  • The new model for code-behind means that the tool does not perform code spit to the code-behind, but is handled automatically during compile time by asp.net. This removes the brtille form of the aspx->code-behind linkage for control ID's and event handlers.
  • If you still require the 'pre-compiled' code behind type model, with their results assemblies in \Bin, but their code files removed in the app, then you can resort to the aspnet_compiler, pre-compilation tool as described above.

In the new compilation model in v2, you don't get a single assembly per page either, rather batching of files occurs. There are many inputs however to the algorithms used to drive the batching process.. App_code means that you can abstract out your business objects/classes from the pages and be able to work on this independantly. Also, asp.net performs automatic compilation on this folder for you, without your need to perform a compile. app_code can also be subdivided, if you need to separate languages for example, or have teams working on separate portions of these types. The assembly(ies) generated from app_code do cause app_domain restart and will be linked to all pages in your app too.


Simon
This posting is provided "AS IS" with no warranties, and confers no rights.
FrEaK_@CH
Asp.Net User
Re: VS2005 Beta2 Precompilation4/27/2005 8:19:47 PM

0/0

hi

thank you both for your detailed post.... now, I understand the whole thing a little bit better. Big Smile [:D]

ajk-eis
Asp.Net User
Re: VS2005 Beta2 Precompilation5/1/2005 9:01:49 AM

0/0

>>>Batch vs. No Batch.  In Beta2, the precompile option does "No Batch" meaning each ASPX page is its own DLL.  We will be changing the default setting to do "Batch" compilation in final release to be more consistent VS2003, where all webforms in a folder get compiled into a single DLL.  NOTE - you will still get multiple DLLs, but they will be per folder, not per webform.  VS2005 doesn't provide UI to control the Batch/No-Batch option, however you can set this via the command line precompile tool.<<<

Hello Omar and Simon,

Well the default Batch compilation seems to be also necessary for VS 2005 projects.  Make a project that has folders for different groups containing files that have the same name (a fairly common scenario).  Without Batch build you have in the BIN:

App_Web_default.aspx.cdcab7d2.dll
App_Web_wf1.aspx.14a5f0e2.dll
App_Web_wf1.aspx.8940f0e2.dll
App_Web_wf2.aspx.14a5f0e2.dll
App_Web_wf2.aspx.8940f0e2.dll

Now I change and recompile.  Which App_Web_wf1.aspx.xxxxxx.dll belongs to the page I changed?  I have found no way to tell other than trial and error! There is no reference to xxxxx in the deployed aspx page.  If that option is there, is seems to be undocumented.

With Batch build I would at least have a file for each Subfolder.  I would like to test this, but I haven't found the option to enable batch build on the command line.  We are talking about the aspnet_compiler.exe aren't we? 

At any rate, I do not believe that the option to change this behaviour belongs outside of the IDE.

Alle

SimonCal
Asp.Net User
Re: VS2005 Beta2 Precompilation5/2/2005 5:56:33 PM

0/0

Pre-compilation in the command-line tool defaults to a batched compilation, (unless using the in-place pre-compilation which uses that defined in configuration). The tool takes a "-fixednames" flag to turn off the batch compilation to provide a one to one page to assembly compilation, and the assembly name is a fixed name from compilation to compilation. The Visual Studio tool in beta2 currently applies that flag.

When using -fixednames, the assembly names are constant, but are given a hash (based on folder structure) to make them unique, rather than trying to use a readable naming structure, as these names can become long and unweildy. You can determine the original file that maps to the assembly by looking at the .COMPILED file in the code-gen directory which exists under your install folder "Temporary ASP.NET files\<appName>\<XXXXX>\<XXXXX>

These preservation (xml) files will show, for the particular page in question, e.g. App_Web_default.aspx.YYYYYY.compiled, where the value YYYYYY is the has in the assembly name too, which originating file it refers too.

If you omit the -fixednames command-line option using aspnet_compiler, then batching will potentially create different file names under each compilation. However, you can still use the preservation files to determine what constitues that assembly.

Hope this helps!


Simon
This posting is provided "AS IS" with no warranties, and confers no rights.
ajk-eis
Asp.Net User
Re: VS2005 Beta2 Precompilation5/2/2005 11:41:53 PM

0/0

 SimonCal wrote:

When using -fixednames, the assembly names are constant, but are given a hash (based on folder structure) to make them unique, rather than trying to use a readable naming structure, as these names can become long and unweildy. You can determine the original file that maps to the assembly by looking at the .COMPILED file in the code-gen directory which exists under your install folder "Temporary ASP.NET files\<appName>\<XXXXX>\<XXXXX>

These preservation (xml) files will show, for the particular page in question, e.g. App_Web_default.aspx.YYYYYY.compiled, where the value YYYYYY is the has in the assembly name too, which originating file it refers too.

Simon, thanks for your reply but now having learned this I have to ask a bit more.

Having found the "Temporary ASP.NET" files I see that I have to open each one to find the entry correlating to my directory / file combination.  The old way (rebuilding the entire app and deploying the dll for a small change) was for large sites not nice but this sure isn't very friendly either.  I don't see anyone doing this. The moral of the story is NEVER use files with the same name anywhere in an ASPNET project.

Aside from that, obviously a complete "Temporary ASP.NET" directory, with all files (including debugging PDB files) as large as the compiled project is generated with each publish of a changed project.  Why??  And then why hidden in the Installation Folder.  Obviously, over time this is going to become a space problem where you would least expect it. At least my projects and published projects are where I decide to put them. 

So then I tried the command line aspnet_compiler:

1.  I find the error message "error ASPRUNTIME: Object reference not set to an instance of an object" very misleading when the -f switch isn't used and the target directory is not empty.

2.  After the "batch" complilation I infact only have three dll's (as expected one per folder).  However all of them have the same name (ha, ha) App_Web_xxxxxx.dll where xxxxxx is ......again a hash whithout any reference to the directory.  So now I am really lost and again can redeploy the entire app for changes to one file since according to your description (and my experience now) there are no xml files with the correlation.

3.  Of course I could use the -fixednames switch, but then we're back to the starting point aren't we?

I do not feel this compilation model is "finished & ready" yet.

Alle

ajk-eis
Asp.Net User
Re: VS2005 Beta2 Precompilation5/3/2005 12:03:18 AM

0/0

Simon,

just to beat you to the punch -

I have just found Embarrassed [:$] that when the site is published as not updateable, then the same xxxxx.compiled files are in the bin directory of the published site and these files specify the path (i.e. folder/folder/filename) and the full name of the dll with hash.

So it's not quite as bad as I wrote.

Alle

Darcyp
Asp.Net User
Re: VS2005 Beta2 Precompilation8/10/2005 9:37:09 PM

0/0

I have a question regarding Precompilation's updateable ability.

First time, I precompile my application with updateable flag and fixedfilename flag on it. Once, that's done...I just want to update one ASPX and its codebehind file that changed. Instead of precompiling entire application again, is there a way to compile just one file and get its dll file? if yes, how can I do that ?

Let me know please,
Thanks,
Darcy Patel
SimonCal
Asp.Net User
Re: VS2005 Beta2 Precompilation8/15/2005 7:30:52 PM

0/0

You'll simply have to runt ehy aspnet_compiler over the site again. In this case it should just be an incremental build so if you diff the targets you ahould be able to determine what has changed and simply update those files on the final production site.
Simon
This posting is provided "AS IS" with no warranties, and confers no rights.
16 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Programming ASP.NET: Building Web Applications and Services with ASP.NET 2.0 Authors: Jesse Liberty, Dan Hurwitz, Pages: 930, Published: 2005

Web:
VS2005 Beta2 Precompilation - ASP.NET Forums VS2005 Beta2 Precompilation. Last post 08-15-2005 3:30 PM by SimonCal. 15 replies. Sort Posts:. Oldest to newest, Newest to oldest ...
Visual Studio 2005 beta 2: How can I deploy a ASP Website without ... Visual Studio 2005 beta 2: How can I deploy a ASP Website without the codebehind ... There are different way you can precompile the app, ...
precompilation in VS2005 - ng.asp-net-forum.visual_studio_2005 ... VS2005 Beta2 Precompilation - ASP.NET Forums VS2005 doesn't provide UI to control the Batch/No-Batch option, however you can set this via the command line ...
VS2005 - ng.asp-net-forum.visual_studio_2005 - fix error problem ... VS2005 Beta2 Precompilation, > ROOT > NEWSGROUP > Asp.Net Forum > visual_studio. ... VS2005 uses dynamic compilation because it improves development time . ...
What's New in Visual Studio 2005 for Native Developers Right-click the .cpp file you want to precompile, and then select Properties. .... Note that for Visual Studio 2005 Beta 2, this scenario is unsupported. ...
Inside Microsoft: Visual Web Developer in Visual Studio 2005 ... This article is based on Beta2 version of VS 2005. VS 2005 Beta 2 is currently ..... Precompilation does more for you than previous versions of VS .NET did. ...
Asp.Net 2.0 and VS 2005 Beta 2 Bugs Jun 24, 2005 ... NET 2.0 and VS 2005 Beta 2 submitted by myself to MSDN Ladybug. ... Asp.Net 2.0: Precompilation and Deployment · Another 10 Asp.Net ...
DotNetSlackers: VS2005: The type '_Default' is ambiguous after ... VS2005: The type '_Default' is ambiguous after precompile ... One side effect of this in Beta 2 is the error further down in the post if you pre-compile and ...
What's New in System.Xml for Visual Studio 2005 and the .NET ... NET to support the forthcoming SQL Server 2005 Beta 2, formerly referred to as ...... Since the most common design pattern by far is to precompile XSLT ...
Precompile.axd returns error 404 since beta2 of .net framework 2.0, so currently to precompile ASP.NET 2.0 ... tool or vs 2005 IDE... Regards, Steven Cheng ...




Search This Site:










whidbey pdc disc

install vs2005... vista crash!

asp.net site hosted in file system problem

assemblies version information

publishing to remote or local server has stopped working v2.0

macro: how to set code type when attaching to process

vs 2005 and asp.net with vb

remote debugging (vs.net 2k5, asp.net 2.0)

how to add inkedit and inkpicture controls into tool box?

fresh install of vs2005 - control errors now!

display only icons, not the text

difference between web application project and web site in vs 2005

vs 2005 : why is the default for autoeventwireup different for c# and vb.net ?

word/excel

suggestion: discard

c# property formatting

project is no longer using asp.net development server

sharepoint services sdk in visual studio 2005

statement completion in visual basic

dll's in project. i would like to get them into source safe.

how to use cvs as source code control for vs2005?

refactor menu in vb.net (visual studio 2005)

how to make solution explorer handle web forms with non-aspx extensions correctly

aspnet_compiler generates dlls with random 8 char names

custom panel control breaks auto-control select feature.

how to add control's event for use vs2005?

discussion forum component

looking for dynamic button control...or so.

precompiling web application projects

converting an html file to a webform - help?

  Privacy | Contact Us
All Times Are GMT