Last post Jul 05, 2016 10:05 PM by firstname.lastname@example.org
Jul 01, 2016 04:38 PMemail@example.com|LINK
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.
Jul 04, 2016 06:00 AM|Angie xu - MSFT|LINK
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.
Jul 05, 2016 10:05 PMfirstname.lastname@example.org|LINK
Got it. Looking at the documentation was a bit confusing because of the "by default" language. Thanks for the insight.