functions missing from dll produced by deployment project RRS feed

  • Question

  • User-707548811 posted

    I have created a web deployment project for a web application project.

    I have added the following to the project file so that source code files are not included in the deployment:

    <!-- Remove all files not needed for deployment -->
    ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\*.scc" />
    ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\*.sln" />
    ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\*.csproj" />
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\*.user" />
    ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\*.xml" />
    ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\*.vspscc" />
    ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\obj\**\*" />
    ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\Properties\*" />
    <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\Old_App_Code\*" />

    The result is that a Source/bin folder and a Debug/bin folder are created by the build process. Both these folders contain a dll with the name configured in the project settings. I have examined the DLL's using ildasm, the one in the source/bin folder contains all my pages, master pages etc, the one in the debug/bin folder only contains a ProfileCommon object. This dll is the one installed on the target machine, and the result is the web site fails to load with the error message: Parser Error Message: Could not load type 'AdminMasterPage'.

    How do I get this to build only one dll containing all the code, without the source files being included in the build?


    Thursday, November 2, 2006 4:44 AM

All replies

  • User-707548811 posted

    After further investigation, I have removed all of the "ExcludeFromBuild" lines from the project file.

    The result is now there is no Source folder built, just a Debug folder. The Debug folder contains a bin folder with a dll in it, and a obj/Debug folder with another dll in it (with the same name as in the bin folder).

    The dll in the obj/debug folder contains all my pages/master page, but this hasn't got merged into the dll in the bin folder.

    Can anyone explain what is going wrong here?



    Thursday, November 2, 2006 11:06 AM
  • User-707548811 posted

    The issue appears to be due to having the deployment project producing output with the same name.

    My web application project called "Admin" produces Admin.dll

    My web deployment project was set up to merge all outputs into a single assembly called Admin

    This results in bin/Admin.dll containing only the ProfileCommon class.

    If I change the web deployment project to merge into a single assembly called Admin2 I end up with 2 dll's in the bin folder:

    Admin2.dll containing ProfileCommon and Admin.dll containing all my pages/master page.

    This isn't quite what I'd describe as "Merge all outputs into a single assembly".

    A bug ??


    Thursday, November 2, 2006 12:48 PM