How to compile partial asp.net webforms classes to dll file?

If i use this code

vbc / t: library / r: System.dll, System.Data.dll, System.Web.dll, Cooperator.Framework.Web.dll, DateRangePicker.dll, DateRange.dll, conexiones.dll, abmbancos.aspx.vb

I can compile asp.net webpage codebehind file to dll file if codebehind file is declared with normal class instead of partial class and all webcontrols are declared explicity

But we are using partial classes for development, so we don't need to explain the declaration of webcontrols in the codebehind file. Now we need to compile the codebehind files in ddls, and if I use the code posted at the beginning to compile the same codebehind file, but declared as a partial class of the abmbancos.aspx file, and all webcontrols properties arent declared as a difference in the code, I getting all the errors that arentcontrols arent declared in the codebehind file.

How do I do to compile files with incomplete codebehind classes or codebehind file plus aspx file of interface in dll?

+2


source to share


1 answer


For classic ASP.NET websites, the partial designer class is not saved to disk — it is only generated at runtime. You can combine the output of aspnet_compiler into a single DLL using aspnet_merge , but that will be for the website as a whole, not for a specific * .aspx.



For a later web application project template *. designer.cs will be saved as a separate file on disk, allowing the described scenario.

+1


source







All Articles