locked
Publish using "Do not merge. Create a separate assembly..." not working as expected RRS feed

  • Question

  • User408930463 posted

    When i am publishing my website (to file system), I have chosen "Precompile during publishing" and in the "Configure" options I have chosen "Allow precompiled site to be updatable" and "Do not merge. Create a separate assembly for each page and control." Based on my experience with previous versions of VS, I was expecting to have the bin folder populated with a single file for each page, but instead I am getting a single DLL for the site.

    An added thought... from what I can understand, the website I'm describing is (I think) a "Web application project" and not a "Web site project". That being said, the documentation I see says that for a web application project, "By default, compilation of code files (excluding .aspx and .ascx files) produces a single assembly" which implies that I can force it to behave differently than the default. But I haven't been able to the way I described in my first paragraph above.

    Can someone help me understand what I'm missing? Thanks in advance.

    Friday, July 1, 2016 4:38 PM

Answers

  • User-166373564 posted

    Hi John,

    This explains the compilation of Web Application Projects versus Web Site Projects in Visual Studio below:

    For web application projects, you typically build the project in Visual Studio or by using the ASP.NET batch compiler on a computer that is not the production IIS server. All code-behind class files and standalone class files in the project are compiled into a single assembly, which is then put in the web application project's Bin folder. (The .aspx and .ascx files are compiled dynamically in a manner similar to what is done for web site projects.)

    For web site projects, you do not have to manually compile the project. web site projects are typically compiled dynamically by ASP.NET (on both the development computer and the production IIS server). You can choose between batch compilation mode, which typically produces one assembly per folder, and fixed compilation mode, which typically produces one assembly for each page or user control.

    hope it helps.

    Regards,

    Angie

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 4, 2016 6:00 AM

All replies

  • User-166373564 posted

    Hi John,

    This explains the compilation of Web Application Projects versus Web Site Projects in Visual Studio below:

    For web application projects, you typically build the project in Visual Studio or by using the ASP.NET batch compiler on a computer that is not the production IIS server. All code-behind class files and standalone class files in the project are compiled into a single assembly, which is then put in the web application project's Bin folder. (The .aspx and .ascx files are compiled dynamically in a manner similar to what is done for web site projects.)

    For web site projects, you do not have to manually compile the project. web site projects are typically compiled dynamically by ASP.NET (on both the development computer and the production IIS server). You can choose between batch compilation mode, which typically produces one assembly per folder, and fixed compilation mode, which typically produces one assembly for each page or user control.

    hope it helps.

    Regards,

    Angie

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 4, 2016 6:00 AM
  • User408930463 posted

    Got it. Looking at the documentation was a bit confusing because of the "by default" language. Thanks for the insight.

    Tuesday, July 5, 2016 10:05 PM