Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > What's this 2.0 compilation anomaly?

Reply
Thread Tools

What's this 2.0 compilation anomaly?

 
 
clintonG
Guest
Posts: n/a
 
      12-30-2005
At design-time the application just decides to go boom claiming it can't
find a dll. This occurs sporadically. Doing a simple edit in the HTML for
example and then viewing the application has caused the application to go
boom. Sometimes the page will compile and run using F5 and others not.

So I do the web search tango looking around the blogs and the tuts and
determine I should go into Temporary ASP.NET Files and delete the directory
containing the application's temporary files. I have to reset the machine to
delete it. Restart VS2005 and go back to work, edit, review, edit, review,
edit, review and then BOOM. All I've been working on is the HTML.

I'll dump the results and hope somebody knows about this and can help
explain so I can get busy again...

error CS0006: Metadata file
'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\2beta_metro2\331c872a\fd27ed37\App_Code.7swu hu9q.dll' could not be
found

Source Error:
[No relevant source lines]

C:\WINDOWS\system32> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc .exe"
/t:library /utf8output
/R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\T emporary ASP.NET
Files\2beta_metro2\331c872a\fd27ed37\App_Code.7swu hu9q.dll"
/R:"C:\WINDOWS\assembly\GAC\BasicFrame.WebControls. BasicDatePicker\1.1.1959.0__8c5b7d113ff0d5cd\Basic Frame.WebControls.BasicDatePicker.dll"
/R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__ b03f5f7f11d50a3a\System.Web.dll"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0 .0.0__b03f5f7f11d50a3a\System.Drawing.dll"
/R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0_ _b77a5c561934e089\System.Data.dll"
/R:"C:\WINDOWS\assembly\GAC_MSIL\Accessibility\2.0. 0.0__b03f5f7f11d50a3a\Accessibility.dll"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configurati on\2.0.0.0__b03f5f7f11d50a3a\System.Configuration. dll"
/R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\T emporary ASP.NET
Files\2beta_metro2\331c872a\fd27ed37\App_Web_three stackedpanels.master.6044e34.8is_oyvt.dll"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b7 7a5c561934e089\System.dll"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\ 2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll"
/R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\m scorlib.dll"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0 __b77a5c561934e089\System.Xml.dll"
/R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseSer vices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseS ervices.dll"
/R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Service s\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dl l"
/out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 \Temporary ASP.NET
Files\2beta_metro2\331c872a\fd27ed37\App_Web_chann elbuilder.aspx.851e3233.gbobafmd.dll"
/DEBUG /debug+ /optimize-
/win32res:"C:\WINDOWS\Microsoft.NET\Framework\v2.0. 50727\Temporary ASP.NET
Files\2beta_metro2\331c872a\fd27ed37\tevfep2j.res" /w:4 /nowarn:1659;1699
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\2beta_metro2\331c872a\fd27ed37\App_Web_chann elbuilder.aspx.851e3233.gbobafmd.0.cs"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\2beta_metro2\331c872a\fd27ed37\App_Web_chann elbuilder.aspx.851e3233.gbobafmd.1.cs"
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
Files\2beta_metro2\331c872a\fd27ed37\App_Web_chann elbuilder.aspx.851e3233.gbobafmd.2.cs"


NOTE:

Observe that my virtual application is located at 2beta_metro2 where
inetpub\wwwroot\2beta was where I began building the metro2 application
which is now going boom every time I try to load the page using 2.0 with
VS2005 and does the same when trying to load the application with a browser
and an HTTP request.

Now if you don't mind, I am going to vaporize myself with copious amounts of
Captain Morgan's poured into hot chocolate milk.

<%= Clinton Gallagher










 
Reply With Quote
 
 
 
 
Jim Cheshire
Guest
Posts: n/a
 
      12-30-2005
clintonG wrote:
> At design-time the application just decides to go boom claiming it
> can't find a dll. This occurs sporadically. Doing a simple edit in
> the HTML for example and then viewing the application has caused the
> application to go boom. Sometimes the page will compile and run
> using F5 and others not.


In ASP.NET 2.0, the assembly that executes is made up of the code-behind AND
the .aspx file. When you browse the page, those two are compiled into the
dynamic assembly in the Temporary ASP.NET Files folder. When you edit the
..aspx page, the class must be recompiled. This is the concept of partial
classes.

I've not seen the issue you describe, but it seems that this might occur if
something is locking the Temporary ASP.NET Files folder or something. I did
hear of an issue a while back where McAfee was locking files in that
location and causing issues. Not sure if that's a possibility in your case
or not.

--
Jim Cheshire
================================
Blog: http://blogs.msdn.com/jamesche

Latest entry: Digging into Objects
Describes the details of digging into
memory usage with the debugger.



 
Reply With Quote
 
 
 
 
Mr Newbie
Guest
Posts: n/a
 
      12-30-2005
Like your blog by the way, good reading, it's not often one reads this kind
of low level stuff !

--
Best Regards

The Inimitable Mr Newbie


"Jim Cheshire" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> clintonG wrote:
>> At design-time the application just decides to go boom claiming it
>> can't find a dll. This occurs sporadically. Doing a simple edit in
>> the HTML for example and then viewing the application has caused the
>> application to go boom. Sometimes the page will compile and run
>> using F5 and others not.

>
> In ASP.NET 2.0, the assembly that executes is made up of the code-behind
> AND the .aspx file. When you browse the page, those two are compiled into
> the dynamic assembly in the Temporary ASP.NET Files folder. When you edit
> the .aspx page, the class must be recompiled. This is the concept of
> partial classes.
>
> I've not seen the issue you describe, but it seems that this might occur
> if something is locking the Temporary ASP.NET Files folder or something. I
> did hear of an issue a while back where McAfee was locking files in that
> location and causing issues. Not sure if that's a possibility in your case
> or not.
>
> --
> Jim Cheshire
> ================================
> Blog: http://blogs.msdn.com/jamesche
>
> Latest entry: Digging into Objects
> Describes the details of digging into
> memory usage with the debugger.
>
>
>



 
Reply With Quote
 
Jim Cheshire
Guest
Posts: n/a
 
      12-30-2005
Mr Newbie wrote:
> Like your blog by the way, good reading, it's not often one reads
> this kind of low level stuff !
>
>


Thanks. I've kept it basic and pretty 101 level so far. I plan on getting
into more in-depth concepts as I develop a good base.

--
Jim Cheshire
================================
Blog: http://blogs.msdn.com/jamesche

Latest entry: Digging into Objects
Describes the details of digging into
memory usage with the debugger.



 
Reply With Quote
 
Christopher Reed
Guest
Posts: n/a
 
      12-30-2005
As it was already stated, this is an issue with using partial classes where
the ASPX page and the code-behind is merged together at compile time. When
first starting out with VWD Express, I had this same problem. What I
discovered that I needed to do was simple.

1) Always build the web page after you make any changes. Not doing so may
result in either no apparent change in your web page or the error listed
below.

2) Even if you're doing a simple rebuild after each change, especially if
you have some code in your App_Code directory, you might keep getting the
error, rebuild the web site. This will generally clean up any issues that
may be lingering because your files and DLLs are out of sync.

Hope this helps!
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"clintonG" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> At design-time the application just decides to go boom claiming it can't
> find a dll. This occurs sporadically. Doing a simple edit in the HTML for
> example and then viewing the application has caused the application to go
> boom. Sometimes the page will compile and run using F5 and others not.
>
> So I do the web search tango looking around the blogs and the tuts and
> determine I should go into Temporary ASP.NET Files and delete the
> directory containing the application's temporary files. I have to reset
> the machine to delete it. Restart VS2005 and go back to work, edit,
> review, edit, review, edit, review and then BOOM. All I've been working on
> is the HTML.
>
> I'll dump the results and hope somebody knows about this and can help
> explain so I can get busy again...
>
> error CS0006: Metadata file
> 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
> Files\2beta_metro2\331c872a\fd27ed37\App_Code.7swu hu9q.dll' could not be
> found
>
> Source Error:
> [No relevant source lines]
>
> C:\WINDOWS\system32>
> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc .exe" /t:library
> /utf8output /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\T emporary
> ASP.NET Files\2beta_metro2\331c872a\fd27ed37\App_Code.7swu hu9q.dll"
> /R:"C:\WINDOWS\assembly\GAC\BasicFrame.WebControls. BasicDatePicker\1.1.1959.0__8c5b7d113ff0d5cd\Basic Frame.WebControls.BasicDatePicker.dll"
> /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__ b03f5f7f11d50a3a\System.Web.dll"
> /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0 .0.0__b03f5f7f11d50a3a\System.Drawing.dll"
> /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0_ _b77a5c561934e089\System.Data.dll"
> /R:"C:\WINDOWS\assembly\GAC_MSIL\Accessibility\2.0. 0.0__b03f5f7f11d50a3a\Accessibility.dll"
> /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configurati on\2.0.0.0__b03f5f7f11d50a3a\System.Configuration. dll"
> /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\T emporary ASP.NET
> Files\2beta_metro2\331c872a\fd27ed37\App_Web_three stackedpanels.master.6044e34.8is_oyvt.dll"
> /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b7 7a5c561934e089\System.dll"
> /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\ 2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll"
> /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\m scorlib.dll"
> /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0 __b77a5c561934e089\System.Xml.dll"
> /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseSer vices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseS ervices.dll"
> /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Service s\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dl l"
> /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 \Temporary ASP.NET
> Files\2beta_metro2\331c872a\fd27ed37\App_Web_chann elbuilder.aspx.851e3233.gbobafmd.dll"
> /DEBUG /debug+ /optimize-
> /win32res:"C:\WINDOWS\Microsoft.NET\Framework\v2.0. 50727\Temporary ASP.NET
> Files\2beta_metro2\331c872a\fd27ed37\tevfep2j.res" /w:4 /nowarn:1659;1699
> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
> Files\2beta_metro2\331c872a\fd27ed37\App_Web_chann elbuilder.aspx.851e3233.gbobafmd.0.cs"
> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
> Files\2beta_metro2\331c872a\fd27ed37\App_Web_chann elbuilder.aspx.851e3233.gbobafmd.1.cs"
> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET
> Files\2beta_metro2\331c872a\fd27ed37\App_Web_chann elbuilder.aspx.851e3233.gbobafmd.2.cs"
>
>
> NOTE:
>
> Observe that my virtual application is located at 2beta_metro2 where
> inetpub\wwwroot\2beta was where I began building the metro2 application
> which is now going boom every time I try to load the page using 2.0 with
> VS2005 and does the same when trying to load the application with a
> browser and an HTTP request.
>
> Now if you don't mind, I am going to vaporize myself with copious amounts
> of Captain Morgan's poured into hot chocolate milk.
>
> <%= Clinton Gallagher
>
>
>
>
>
>
>
>
>
>



 
Reply With Quote
 
Jim Cheshire
Guest
Posts: n/a
 
      12-30-2005
Christopher Reed wrote:
>
> 2) Even if you're doing a simple rebuild after each change,
> especially if you have some code in your App_Code directory, you
> might keep getting the error, rebuild the web site. This will
> generally clean up any issues that may be lingering because your
> files and DLLs are out of sync.


Christopher,

You don't have to rebuild at all. When you browse the page, the DLL is
rebuilt because we have to recompile the partial class into the assembly.
That's why you can make changes to code-behind or the webform itself and
just browse the page without building the project to see the changes.

This architecture has one more really cool facet. You can now take advantage
of enhancements it brings to edit and continue. If you break into your app
in 2.0, you can, for example, then add a new class, add a property to that
class, instantiate an instance of that class in your code-behind, access the
property of that class, etc. and then continue and your code pages will be
in full effect.

The partial class architecture brings with it many cool new capabilities.

--
Jim Cheshire
================================
Blog: http://blogs.msdn.com/jamesche

Latest entry: Digging into Objects
Describes the details of digging into
memory usage with the debugger.



 
Reply With Quote
 
clintonG
Guest
Posts: n/a
 
      12-30-2005
Thanks for the insight. I do have McAfee VirusScan Online sitting in the
task tray but this anomaly has not occurred with other 2.0 pages in other
projects -- yet -- so is there any way to monitor locks on a directory?

Noting this is an XP Pro SP2 machine I've already excluded the directory to
disallow the indexing service.

<%= Clinton Gallagher

"Jim Cheshire" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> clintonG wrote:
>> At design-time the application just decides to go boom claiming it
>> can't find a dll. This occurs sporadically. Doing a simple edit in
>> the HTML for example and then viewing the application has caused the
>> application to go boom. Sometimes the page will compile and run
>> using F5 and others not.

>
> In ASP.NET 2.0, the assembly that executes is made up of the code-behind
> AND the .aspx file. When you browse the page, those two are compiled into
> the dynamic assembly in the Temporary ASP.NET Files folder. When you edit
> the .aspx page, the class must be recompiled. This is the concept of
> partial classes.
>
> I've not seen the issue you describe, but it seems that this might occur
> if something is locking the Temporary ASP.NET Files folder or something. I
> did hear of an issue a while back where McAfee was locking files in that
> location and causing issues. Not sure if that's a possibility in your case
> or not.
>
> --
> Jim Cheshire
> ================================
> Blog: http://blogs.msdn.com/jamesche
>
> Latest entry: Digging into Objects
> Describes the details of digging into
> memory usage with the debugger.
>
>
>



 
Reply With Quote
 
Jim Cheshire
Guest
Posts: n/a
 
      12-30-2005
clintonG wrote:
> Thanks for the insight. I do have McAfee VirusScan Online sitting in
> the task tray but this anomaly has not occurred with other 2.0 pages
> in other projects -- yet -- so is there any way to monitor locks on a
> directory?


You can run Filemon to see if you're getting an ACCESS DENIED on those
files.

--
Jim Cheshire
================================
Blog: http://blogs.msdn.com/jamesche

Latest entry: Digging into Objects
Describes the details of digging into
memory usage with the debugger.



 
Reply With Quote
 
clintonG
Guest
Posts: n/a
 
      12-30-2005
I'll try Filemon to see what can be seen.

Sorry to say so, but I forgot to mention that I've been in the habit of
running two instances of VS2005. Perhaps it is one instance or the other of
VS2005 that is locking access noting I have different projects loaded into
each instance. As I recall running two instances of VS2003 would not allow
the use of two instances of the debugger which I discovered while trying to
convert a VB.NET application to C#. Perhaps there is a causal connection
here.

Meanwhile, I've deleted the directory in the Temporary ASP.NET Files, the
application has loaded and appears stable. I will run once instance of
VS2005 today to see what if anything may occur.

<%= Clinton Gallagher

"Jim Cheshire" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> clintonG wrote:
>> Thanks for the insight. I do have McAfee VirusScan Online sitting in
>> the task tray but this anomaly has not occurred with other 2.0 pages
>> in other projects -- yet -- so is there any way to monitor locks on a
>> directory?

>
> You can run Filemon to see if you're getting an ACCESS DENIED on those
> files.
>
> --
> Jim Cheshire
> ================================
> Blog: http://blogs.msdn.com/jamesche
>
> Latest entry: Digging into Objects
> Describes the details of digging into
> memory usage with the debugger.
>
>
>



 
Reply With Quote
 
Jim Cheshire
Guest
Posts: n/a
 
      12-30-2005
clintonG wrote:
> As I recall running two instances
> of VS2003 would not allow the use of two instances of the debugger
> which I discovered while trying to convert a VB.NET application to
> C#. Perhaps there is a causal connection here.
>


You can't attach the debugger twice to a process.

--
Jim Cheshire
================================
Blog: http://blogs.msdn.com/jamesche

Latest entry:
Getting the PID and TID of a COM Call

Describes how to get the PID of the
dllhost process a COM call is executing
in and how to locate the thread as well.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compilation error with seperate compilation C__chp C++ 4 02-15-2008 03:57 PM
Preprocessor conditional compilation variable not being saved Chris P ASP .Net 0 10-28-2003 08:48 PM
compilation error with ModelSim Vincent VHDL 3 09-17-2003 01:30 AM
Compilation error YesMann VHDL 2 08-08-2003 12:51 PM
Re: Compilation error reason??? Weng Tianxiang VHDL 1 07-24-2003 03:08 PM



Advertisments