how to precompile a web application?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bruce barker

    how to precompile a web application?

    a previous long thread brought this up.

    I can find no way to precompile a web application from visual studio. by
    precompile I mean all the aspx code is converted to assemblies by visual
    studio, not at runtime by asp.net. if you view the compiled aspx page it
    should only contain the line:

    This is a marker file generated by the precompilation tool, and should
    not be deleted!

    replacing all the original aspx source, and of course a page assembly
    should exist in the bin folder thats the compiled aspx.

    vs2005 & vs2008 support this for websites (all i use), but was looking
    for the out of the box web application solution.

    note: this a asp.net 2.0+ feature and does not exist for 1.1

    -- bruce (sqlwork.com)
  • Mark Rae [MVP]

    #2
    Re: how to precompile a web application?

    "bruce barker" <nospam@nospam. comwrote in message
    news:ell4Wp4DIH A.4196@TK2MSFTN GP04.phx.gbl...
    I can find no way to precompile a web application from visual studio.
    Not sure about natively, but Web Deployment Projects does this (I never use
    anything else for deployment).

    It's a simple matter of unchecking the "Allow this precompiled site to be
    updatable" checkbox in the WDP's Compilation options...
    by precompile I mean all the aspx code is converted to assemblies by
    visual studio, not at runtime by asp.net. if you view the compiled aspx
    page it should only contain the line:
    >
    This is a marker file generated by the precompilation tool, and should not
    be deleted!
    That's right.
    replacing all the original aspx source, and of course a page assembly
    should exist in the bin folder thats the compiled aspx.
    It certainly does.


    --
    Mark Rae
    ASP.NET MVP


    Comment

    • =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=

      #3
      RE: how to precompile a web application?

      Not to sound like a broken MP3, but if you use the Web Application Project
      model you will never have to go through this B.S. - you get a /bin folder
      with your entire project all compiled into a single assembly. No muss, no
      fuss. And none of those silly marker files that are required for an endpoint
      for each page. Works just like the original VS 2003 deal.
      Cheers,
      -- Peter
      Recursion: see Recursion
      site: http://www.eggheadcafe.com
      unBlog: http://petesbloggerama.blogspot.com
      BlogMetaFinder: http://www.blogmetafinder.com



      "bruce barker" wrote:
      a previous long thread brought this up.
      >
      I can find no way to precompile a web application from visual studio. by
      precompile I mean all the aspx code is converted to assemblies by visual
      studio, not at runtime by asp.net. if you view the compiled aspx page it
      should only contain the line:
      >
      This is a marker file generated by the precompilation tool, and should
      not be deleted!
      >
      replacing all the original aspx source, and of course a page assembly
      should exist in the bin folder thats the compiled aspx.
      >
      vs2005 & vs2008 support this for websites (all i use), but was looking
      for the out of the box web application solution.
      >
      note: this a asp.net 2.0+ feature and does not exist for 1.1
      >
      -- bruce (sqlwork.com)
      >

      Comment

      • bruce barker

        #4
        Re: how to precompile a web application?

        i use web deployment projects with web sites, i just can not find how to
        add one to a web application solution, especially for vs2008.

        -- bruce (sqlwork.com)



        Mark Rae [MVP] wrote:
        "bruce barker" <nospam@nospam. comwrote in message
        news:ell4Wp4DIH A.4196@TK2MSFTN GP04.phx.gbl...
        >
        >I can find no way to precompile a web application from visual studio.
        >
        Not sure about natively, but Web Deployment Projects does this (I never
        use anything else for deployment).
        >
        It's a simple matter of unchecking the "Allow this precompiled site to
        be updatable" checkbox in the WDP's Compilation options...
        >
        >by precompile I mean all the aspx code is converted to assemblies by
        >visual studio, not at runtime by asp.net. if you view the compiled
        >aspx page it should only contain the line:
        >>
        >This is a marker file generated by the precompilation tool, and should
        >not be deleted!
        >
        That's right.
        >
        >replacing all the original aspx source, and of course a page assembly
        >should exist in the bin folder thats the compiled aspx.
        >
        It certainly does.
        >
        >

        Comment

        • bruce barker

          #5
          Re: how to precompile a web application?

          if you are not using marker files, then your site is compiled at runtime
          on the first page request (just like 1.1). web deployment projects are
          used to build precompiled sites, I'm just missing how to create a web
          deployment project for a web application. though it is easy to
          precompile a web application project manually.


          -- bruce (sqlwork.com)


          Peter Bromberg [C# MVP] wrote:
          Not to sound like a broken MP3, but if you use the Web Application Project
          model you will never have to go through this B.S. - you get a /bin folder
          with your entire project all compiled into a single assembly. No muss, no
          fuss. And none of those silly marker files that are required for an endpoint
          for each page. Works just like the original VS 2003 deal.
          Cheers,
          -- Peter
          Recursion: see Recursion
          site: http://www.eggheadcafe.com
          unBlog: http://petesbloggerama.blogspot.com
          BlogMetaFinder: http://www.blogmetafinder.com
          >
          >
          >
          "bruce barker" wrote:
          >
          >a previous long thread brought this up.
          >>
          >I can find no way to precompile a web application from visual studio. by
          >precompile I mean all the aspx code is converted to assemblies by visual
          >studio, not at runtime by asp.net. if you view the compiled aspx page it
          >should only contain the line:
          >>
          >This is a marker file generated by the precompilation tool, and should
          >not be deleted!
          >>
          >replacing all the original aspx source, and of course a page assembly
          >should exist in the bin folder thats the compiled aspx.
          >>
          >vs2005 & vs2008 support this for websites (all i use), but was looking
          >for the out of the box web application solution.
          >>
          >note: this a asp.net 2.0+ feature and does not exist for 1.1
          >>
          >-- bruce (sqlwork.com)
          >>

          Comment

          • Mark Rae [MVP]

            #6
            Re: how to precompile a web application?

            "bruce barker" <nospam@nospam. comwrote in message
            news:uRKZBl$DIH A.5360@TK2MSFTN GP03.phx.gbl...
            I use web deployment projects with web sites, i just can not find how to
            add one to a web application solution
            1) Right-click the project name in Solution Explorer

            2) Click Add Web Deployment Project...


            --
            Mark Rae
            ASP.NET MVP


            Comment

            • bruce barker

              #7
              Re: how to precompile a web application?

              if only it was so easy, the menu pick appears for a web site, but not
              for a web application. But I'll take your word for it. I really wanted
              to look at the msbuild file it generated to compare to the one produced
              for web sites, to see what differences it had (if any) and if it had an
              option to run the merge utility.

              also I'm more interested in vs2008's approach to web deployments.


              -- bruce (sqlwork.com)


              Mark Rae [MVP] wrote:
              "bruce barker" <nospam@nospam. comwrote in message
              news:uRKZBl$DIH A.5360@TK2MSFTN GP03.phx.gbl...
              >
              >I use web deployment projects with web sites, i just can not find how
              >to add one to a web application solution
              >
              1) Right-click the project name in Solution Explorer
              >
              2) Click Add Web Deployment Project...
              >
              >

              Comment

              • Mark Rae [MVP]

                #8
                Re: how to precompile a web application?

                "bruce barker" <nospam@nospam. comwrote in message
                news:e4FwueAEIH A.748@TK2MSFTNG P04.phx.gbl...
                the menu pick appears for a web site, but not for a web application.
                It most certainly does appear for a web application - I'm sitting looking at
                it right now...

                I never go anywhere near web sites - all my ASP.NET projects are web
                applications, and they all have a WDP added in precisely this way...


                --
                Mark Rae
                ASP.NET MVP


                Comment

                Working...