Web Deployment Project - "has not been pre-compiled"

Rate It (1)

Last post 08-22-2008 3:35 PM by mr_efe. 19 replies.

Sort Posts:

  • Web Deployment Project - "has not been pre-compiled"

    01-24-2006, 12:49 AM
    • Loading...
    • sjd0103
    • Joined on 04-05-2004, 8:30 PM
    • Posts 86

    I have created a Team Build that builds a solution containing a Web site, multiple class libraries (project references to the Web site) along with other compiled references, and a Web Deployment Project (WDP).  Everything is working well except when I deploy (either via Team Build or the WDP).  The deployed directory structure looks correct, but when I navigate to the first page I receive “The file '/WhatSite/FirstPage.aspx' has not been pre-compiled, and cannot be requested.

    Here’s the kicker:  When I set the WDP's Output Assemblies property to “Merge all outputs to a single assembly” and deploy, the default page returns the error above.  When I set the Output Assemblies to “Merge each individual folder output to its own assembly” and deploy, the default page loads correctly but all subsequent pages return the error. 

    If I go back to the plain Publish Web Site under the Build menu, the site works as expected.

    What am I missing or does anyone have any ideas?

    Thanks!

  • Re: Web Deployment Project - "has not been pre-compiled"

    01-27-2006, 2:41 AM
    • Loading...
    • tinghaoy
    • Joined on 06-11-2002, 2:29 PM
    • Beijing, China
    • Posts 228
    • AspNetTeam

    Not sure what is going on, this error happens when runtime fails to load the precompiled assemblies. There might be a problem with the merging logic based on your description. Is it possible that you can send me your entire merged (or pre-merged) site to me so I can investigate the problem?

    Thanks,

    Ting

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Web Deployment Project - "has not been pre-compiled"

    01-27-2006, 1:30 PM
    • Loading...
    • SimonCal
    • Joined on 06-10-2002, 8:43 PM
    • Posts 380
    • AspNetTeam
      Moderator

    Can you also look at the site structure and the content of the precompiledapp.config file at the root of the app? Can you take a look at the default page too in the deployed site and see if it also has markup or is just a flag file?

    What options did you select to compile the web site in the WDP?

    Simon
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Web Deployment Project - "has not been pre-compiled"

    01-27-2006, 9:19 PM
    • Loading...
    • sjd0103
    • Joined on 04-05-2004, 8:30 PM
    • Posts 86

    I really feel like I'm up against a wall with this one...

    Simon:

    Contents of PrecompiledAppConfig.config at the root of the application:
    <precompiledApp version="2" updatable="false"/>

    The default page is a place holder and contains:
    This is a marker file generated by the precompilation tool, and should not be deleted!

    Here are the different results I get with the Output Assemblies:

    Merge all outputs to a single assembly - all pages = has not been pre-compiled, and cannot be requested

    Merge each individual folder output to its own assembly - default page (in root) okay - all the rest = has not been pre-compiled, and cannot be requested

    Merge all pages and control outputs to a single assembly - all pages = has not been pre-compiled, and cannot be requested

    Ting, I'll send the code your way.

    Thank you all.

  • Re: Web Deployment Project - "has not been pre-compiled"

    01-30-2006, 3:43 PM
    • Loading...
    • SimonCal
    • Joined on 06-10-2002, 8:43 PM
    • Posts 380
    • AspNetTeam
      Moderator
    Thanks for the response. Can you confirm that if you simply perform a pre-compilation of the application using aspnet_compiler, or the Publish Web Site that the target application that is generated works OK? If so then there is an issue with merging. We'll take a look at the repro when it arrives.
    Simon
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Web Deployment Project - "has not been pre-compiled"

    02-07-2006, 9:56 PM
    • Loading...
    • sjd0103
    • Joined on 04-05-2004, 8:30 PM
    • Posts 86

    Simon,

    I had to walk away to work on some production issues.  I came back to this tonight because we published this site yesterday...all was well.  I ran the team build tongiht and it worked.  The site also works.  I wish I knew what changed.  Thanks again for everyone's help!  I have a much larger app to build next, so we'll probably tallk again soon.

    Scott

  • Re: Web Deployment Project - "has not been pre-compiled"

    05-31-2006, 2:47 PM
    • Loading...
    • clbowens
    • Joined on 04-20-2005, 10:35 PM
    • Parma, OH
    • Posts 2
    I have this problem also and I have not been able to find a solution.
  • Re: Web Deployment Project - "has not been pre-compiled"

    06-16-2006, 6:36 PM
    • Loading...
    • AndyBuffaloNY
    • Joined on 01-19-2005, 6:51 PM
    • Buffalo NY
    • Posts 29

    Ting,

    Did you ever get files for this project and get it working.  I am having pretty much the same problem here and am VERY frustrated with it.

    I am compiling everything to one assembly with the Treat as library NOT checked.

    every page is giving me the not precompiled.

    Thanks Ting or anyone who can help!

    -Andy

  • Re: Web Deployment Project - "has not been pre-compiled"

    07-09-2006, 1:21 PM
    • Loading...
    • ostap100
    • Joined on 05-05-2006, 5:37 PM
    • Posts 16

    Hi there,

    I am having exactly the same problem. Well, it is really similar. I had a .NET 1.1 project that we moved to 2.0 using VS 2005 upgrade utility.
    When I publish it I check "use fixed naming and single page assemblies" only.
    It works fine on Win XP Pro on my dev machine (pre-compiled version).
    Once I move it to DEV (Wind 2003 Server) it gives me the following error

    Exception Details: System.Web.HttpException: The file has not been pre-compiled, and cannot be requested

    It gives this errors for most of the pages in a project....

    I am kind of stuck.

    Any suggestions?


    Thanks a lot!

  • Re: Web Deployment Project - "has not been pre-compiled"

    07-09-2006, 1:23 PM
    • Loading...
    • ostap100
    • Joined on 05-05-2006, 5:37 PM
    • Posts 16

    Hi there,

    I am having exactly the same problem. Well, it is really similar. I had a .NET 1.1 project that we moved to 2.0 using VS 2005 upgrade utility.
    When I publish it I check "use fixed naming and single page assemblies" only.
    It works fine on Win XP Pro on my dev machine (pre-compiled version).
    Once I move it to DEV (Wind 2003 Server) it gives me the following error

    Exception Details: System.Web.HttpException: The file has not been pre-compiled, and cannot be requested

    It gives this errors for most of the pages in a project....

    I am kind of stuck.

    Any suggestions?


    Thanks a lot!

  • Re: Web Deployment Project - "has not been pre-compiled"

    12-13-2006, 8:42 PM
    • Loading...
    • sarah_aspnet
    • Joined on 11-28-2006, 12:04 PM
    • Melbourne, Australia
    • Posts 18

    Hello,

    I also had this problem, and found the cause. I thought I'd share my solution in case anyone else was in a similar situation as me.

    I had a happy, functional, live ASP.NET site. 

    I created an .aspx page which used a 'ReportViewer' control. Once this page was added to the live project, I got the horribly unhelpful "..has not been pre-compiled, and cannot be requested" error on all pages (other than the default page).

    The cause was: the reference to Microsoft.ReportViewer.WebForms.dll

    The reference was working on my development server, but not my production server. I found the .dll on the development server, added the .file to the \bin directory of the live site, everything worked beautifully (without any recompilation or anything).

    There may be cleaner ways of fixing it, but that one worked for me Party!!!

     

  • Re: Web Deployment Project - "has not been pre-compiled"

    12-14-2006, 1:56 AM

    hi sarah,

    that problem reminds me error i faced, i guess you also added reference to cr dll after deploying. ideally when we deploy application we create setup project and include bin folder in that, so automatically dll are added. in your case i think you added it later hence the problem.

     

    Kind Attn: If a reply to your post helped you, kindly mark it as Answered.
    __________________________________________________
    Please save Animals Help World Society For Protection Of Animals,
    Protect these speechless creatures of GOD
  • Re: Web Deployment Project - "has not been pre-compiled"

    05-26-2007, 12:26 AM
    • Loading...
    • Radiant
    • Joined on 10-18-2006, 8:03 AM
    • Posts 35

    Have you tried restarting the IIS

     

  • Re: Web Deployment Project - "has not been pre-compiled"

    08-01-2007, 4:31 AM

    Hi all, 

    I had the same problem in one of my applications, i found out one thing that while publishing the application it does not copy all of the dependent assemblies in the bin folder.So i just copied them manually to the server and now every thing is working fine.YAHOOOOO!!!!!!!!!!!!!!!!!!!!!!!. 

     

  • Re: Web Deployment Project - "has not been pre-compiled"

    08-16-2007, 3:17 AM
    • Loading...
    • jmcintyre
    • Joined on 08-18-2002, 8:11 AM
    • Sydney
    • Posts 12

    Thanks Sarah ...

    sarah_aspnet:
    I created an .aspx page which used a 'ReportViewer' control. Once this page was added to the live project, I got the horribly unhelpful "..has not been pre-compiled, and cannot be requested" error on all pages (other than the default page).

    Lots of people were referring to missing assemblies but "reportViewer" was my problem aswell.

     

    Jason

Page 1 of 2 (20 items) 1 2 Next >