Web Deployment Project : Assemblies not merging

Last post 12-06-2005 12:07 PM by BradleyB. 6 replies.

Sort Posts:

  • Web Deployment Project : Assemblies not merging

    11-30-2005, 12:21 PM
    • Contributor
      2,847 point Contributor
    • Pluginbaby
    • Member since 11-20-2005, 8:07 PM
    • Canada
    • Posts 484
    • TrustedFriends-MVPs
    Hello all,
    I have a solution with a web site and severales dll libraries.
    I use a Web Deployment Project with options "Merge all outputs to a single assembly (MyProject.Web_deploy)" / "Treat as library" and build it.
    The result is ok with no errors but in my "release/bin" folder I have MyProject.Web_deploy.dll but also all my others library projects dll and lots of .compiled files
    Seems weird, don't know if this is the good way...
    What's the problem ?
    (If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

    Laurent Duveau
    Silverlight MVP / Silverlight Insider
    http://weblogs.asp.net/lduveau/
  • Re: Web Deployment Project : Assemblies not merging

    12-01-2005, 2:57 AM
    • Star
      14,493 point Star
    • ScottGu
    • Member since 06-05-2002, 8:36 PM
    • Redmond, WA
    • Posts 2,004
    • AspNetTeam
      Moderator
    Hi there,

    The Web Deployment Project will actually only merge the assemblies generated from the pages/code in your web-project.  It will not touch your other class library assemblies in your solution, or other assembly references that you've made.  Instead they'll be copied to your \bin directory so that they can be used at runtime just fine.  So what you are seeing is actually the expected behvior.

    The .compiled files are added (or not) depending on whether you have the "allow this precompiled site to be updatable" checkbox selected on the "compilation" section of your property page settings.  By default this checkbox is enabled, in which case the .compiled files won't be generated in your \bin directory.  If you unselect this checkbox, you are telling the compiler to remove all html source code from the .aspx/.ascx files and allow them actual .aspx files to be deleted from disk.  The .compiled files are generated so that ASP.NET can still find references and figure out which classes to load and run from your assembly in this case.

    Hope this helps,

    Scott
  • Re: Web Deployment Project : Assemblies not merging

    12-01-2005, 4:15 AM
    • Contributor
      2,847 point Contributor
    • Pluginbaby
    • Member since 11-20-2005, 8:07 PM
    • Canada
    • Posts 484
    • TrustedFriends-MVPs
    Right and clear..... thank you Scott !!

    That was it, I unchecked the "allow this precompiled site to be updatable" so I have all these .compiled files in my \bin folder.

    Pleased also to see that the "Web.config file section replacements" works with any custom config section !! (we have a <database> section here which is of type System.Configuration.DictionarySectionHandler and not a System.Configuration.AppSettingsSection
    Seems to be just a string "search and replace"...?
    (If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

    Laurent Duveau
    Silverlight MVP / Silverlight Insider
    http://weblogs.asp.net/lduveau/
  • Re: Web Deployment Project : Assemblies not merging

    12-01-2005, 7:46 AM
    • Contributor
      2,847 point Contributor
    • Pluginbaby
    • Member since 11-20-2005, 8:07 PM
    • Canada
    • Posts 484
    • TrustedFriends-MVPs
    Hi,

    One more thing : I have a ">" character in the password of my connection string..... and after building with the "Web.config file section replacements" option activated, it is changed to : "&gt;"
    How to avoid that ?

    (If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

    Laurent Duveau
    Silverlight MVP / Silverlight Insider
    http://weblogs.asp.net/lduveau/
  • Re: Web Deployment Project : Assemblies not merging

    12-01-2005, 10:47 AM
    • Star
      14,493 point Star
    • ScottGu
    • Member since 06-05-2002, 8:36 PM
    • Redmond, WA
    • Posts 2,004
    • AspNetTeam
      Moderator
    Hi Laurent,

    XML actually prevents you from having a ">" or "<" character in XML attributes (I believe these are reserved letters for the parser).  I think actually &gt; is the proper way to express it in the attribute -- so it might be doing the riught thing for you in this case.

    Hope this helps,

    Scott
  • Re: Web Deployment Project : Assemblies not merging

    12-02-2005, 1:23 PM
    • Contributor
      2,847 point Contributor
    • Pluginbaby
    • Member since 11-20-2005, 8:07 PM
    • Canada
    • Posts 484
    • TrustedFriends-MVPs

    Thanks for the answer, but I tried replacing my ">" with "&gt;" BEFORE building with "config section replacements" but I still obtain a "&gt;" in the final web.config, which is not that I expect.

    Is there a solution for that ?

    (If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

    Laurent Duveau
    Silverlight MVP / Silverlight Insider
    http://weblogs.asp.net/lduveau/
  • Re: Web Deployment Project : Assemblies not merging

    12-06-2005, 12:07 PM
    • Participant
      1,171 point Participant
    • BradleyB
    • Member since 11-06-2002, 10:53 AM
    • Posts 227
    • AspNetTeam

    Yes, instead of merging the changes into web.config you can opt to have web.config reference the external file.  This will leave your source intact.  To do this Check the “Use external configuration source file” checkbox when enabling web.config replacement.

     

    Hope this helps,

    Brad. 

     

Page 1 of 1 (7 items)