locked
Advanced Precompile Settings - Code Behind not in DLL RRS feed

  • Question

  • User456671562 posted

    Hi there,

    We are experimenting using the Advanced Precompile Settings whilst publishing a website (e.g. WebApplication1 for testing). We would like to have the code behind each page compiled to a separate DLL. We choose the option 'Do not merge. Create a separate assembly ..... '  which looks like it does, but when we change the code behind (e.g. WebForm4.aspx.vb) , and re-publish, we have to ship the WebApplication1.dll to get the code changes. We thought that it would just be the DLL associated with the page that we would have to ship to IIS.

    However if we put the code behind in the actual .aspx file itself, we do indeed get the code in the DLL associated with WebForm4.

    I hope i have made myself clear and is there any way around this?

    Many thanks

    Julian Tucker

    Thursday, October 3, 2013 5:59 AM

Answers

All replies

  • User-1454326058 posted

    Hi rogerstill,

    Thanks for your post!

    As far as I know, using the ASP.NET Precompile can impact the file that in the APP_Code folder for a web project. In other words, if you have anything in the App_Code, it will be precompiled into a DLL before deployment. Without precompiling, this would happen during the runtime.

    Here is a reference that may benefit you:

    # Advanced Precompile Settings Dialog Box

    http://msdn.microsoft.com/en-us/library/hh475319.aspx

    Thanks

    Best Regards

    Friday, October 4, 2013 5:07 AM
  • User456671562 posted

    Hi There

    Its the code in each WebForm's code-behind that seems to be compiled into the WebApplication1.dll

    We want the WebForm's code-behind to be compiled to the WebForm's individual dll.

    This will allow us to change a single WebForm by swapping in the new WebForm's dll, without effecting any other part of the site.

    Is this possibe?

    BTW we dont have APP_Code folder

    Thanks

    Andrew (working for Roger Still)

    Friday, October 4, 2013 10:09 AM
  • User-1454326058 posted

    Hi rogerstill,

    Based on your reply, I think you are using the web project instead of website.

    Based on my test in the VS2012, it will precompiled to the individual dll if we publish a website. (Select Do not merge. Create a separate assembly for each page and control)

    Here are some links may help you:

    # Visual Studio® 2010 Web Deployment Projects - RTW

    http://www.microsoft.com/en-us/download/details.aspx?id=24509

    # VS 2012 Deployment, Precompiled

    http://forums.asp.net/t/1832099.aspx

    # Web Application Projects versus Web Site Projects in Visual Studio

    http://msdn.microsoft.com/en-us/library/dd547590.aspx

    Thanks

    Best Regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, October 5, 2013 12:03 AM