locked
Web Deployment Project - Unresolved assembly reference not allowed RRS feed

  • Question

  • User-1669681369 posted

    I've migrated an ASP.NET project from VS 2003 to VS 2005.  When I tried to build with Web Deployment Project, the following error occurred.

    Target "AspNetMerge" in file "C:\Program Files\MSBuild\Microsoft\WebDeployment\v8.0\Microsoft.WebDeployment.targets":
      Using "AspNetMerge" task from assembly "C:\Program Files\MSBuild\Microsoft\WebDeployment\v8.0\Microsoft.WebDeployment.Tasks.dll".
      Task "AspNetMerge"
        Running aspnet_merge.exe ...
        Command:
        C:\Program Files\MSBuild\Microsoft\WebDeployment\v8.0\aspnet_merge.exe C:\MyWebProject\eQuest_deploy\Release -copyattrs
        The "AspNetMerge" task is using "aspnet_merge.exe" from "C:\Program Files\MSBuild\Microsoft\WebDeployment\v8.0\aspnet_merge.exe".
        Utility to merge precompiled ASP.NET assemblies.
        Copyright (c) Microsoft Corporation. All rights reserved.
       
        An error occurred when merging assemblies: Unresolved assembly reference not allowed: PBDS.Entity.ProfileServices.Common.
        C:\Program Files\MSBuild\Microsoft\WebDeployment\v8.0\Microsoft.WebDeployment.targets(574,9): error MSB6006: "aspnet_merge.exe" exited with code 1.
      Done executing task "AspNetMerge" -- FAILED.
    Done building target "AspNetMerge" in project "eQuest_deploy.wdproj" -- FAILED.

    Any help would be appreciated
    Thanks,
    Leng.

     

     

    Monday, March 27, 2006 12:46 PM

Answers

  • User-1079832611 posted

    I get this same error once in a while during builds, and I am able to resolve it by first doing a "Build" - "Rebuild Solution" in Visual Studio.  After that completes successfully, then when I perform a build or publish, the compile and merge completes successfully without the "Unresolved assembly reference not allowedSystem.Web" error.

    I suspect the "Rebuild Solution" fixes whatever might be stuck or missing from the cache, and allows a clean build.

    Hopefully this solution helps others who run into this issue.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 30, 2020 6:23 PM

All replies

  • User839087101 posted

    I have forwarded your error to somebody on the team who will be able to take a look.   They may need your project or a sample project where the error occurs.  If you can email this to me at bash at microsoft.com, that would be great.

    -- Bash

    Tuesday, March 28, 2006 4:16 AM
  • User-1669681369 posted

    The compiled error went away after I unregistered and registered all the assemblies.

    Thanks for looking into this problem anyway.

    Tuesday, March 28, 2006 10:13 AM
  • User-18997321 posted

    Hi.

    I have simmilar problem. aspnet_merge probably doesn't see my assembly located in the same solution even if I can debug (F5) my project. I can not build Web Deployment project.

    1/ I want to ask you if the assembly "PBDS.Entity.ProfileServices.Common" was your own assembly. Was it?

    2/ The second question is: How did you unregistered and then registered the assemblies? I do not exactly know what do you mean and how to do that. Do you mean you unregistered assemblies from the GAC? Please, give me more detailed description.

    Thank you very much for your help.

     

    Brko

    Tuesday, April 4, 2006 7:12 AM
  • User128105972 posted

    Hi,

     

    I do have the same problem.

     

    When I try to merge the precompiled web site I do get

     

    "An error occurred when merging assemblies: Unresolved assembly reference not allowed: System.Data.OracleClient."

     

    What I do not understand is, that the mentioned assembly is used in other web site too, and does not produce an error when aspnet_merge is executed.

     

     

    Please Help. Thanks

     

     

    Erhan

     

     

    Wednesday, May 10, 2006 2:41 AM
  • User-729062814 posted
    Very strange.  How are you referencing System.Data.OracleClient ?  Is it in Web.config?
    Monday, May 15, 2006 4:47 PM
  • User128105972 posted

    Hi,

    first of all sorry for the late reaction, but i was not informed about the new post.

     

    Yes the reference is in the web.config

     

    Regards

     

    Erhan

    Tuesday, June 13, 2006 4:34 AM
  • User-1542195628 posted

    To all who are having this problem,

    This may not apply in to your situation; however, I was getting the same error.  It turned out that the problem was that the Bin folder of my website had its Hidden flag set.  Unhiding the bin folder cleared up the problem.  This suggests that other issues, such as ACL settings, that hide the referenced dll from aspnet_merge.exe could also cause this problem.

    If you are hiding your bin folder to keep it from being concidered part of your web site project (and hence keep it out of source control), a co-worker of mine suggests that another possible solution is to set up a pre-build event on your deployment project to xcopy the needed files into the deployment folder so they are there when aspnet_merge.exe runs.

    --Happy Coding,

    Ken

    Monday, October 29, 2007 12:16 PM
  • User522625921 posted

    I'm getting this error: 

    An error occurred when merging assemblies: Unresolved assembly reference not allowed: System.Web. 

    and doesn't seem related to a hidden bin folder, or the other above.

    It only occurs when I select the 2nd compile option, "Merge each individual folder output to it's own assembly" AND "Allow this precompiled site to be updatable" is UN-checked... to include aspx, ascx into compilation.

    ... doesn't seem to be a common error or issue.

     Anyone have any ideas????

    Thanks!  David
     

     

    Saturday, June 7, 2008 5:55 PM
  • User522625921 posted

    I narrowed it down to a single 3rd party control in an admin page: Scott Mitchell's Rss Feed (skmRSS) ..

    ..  remove it from the page.. compile with aspx/ascx then works.

    Saturday, June 7, 2008 6:34 PM
  • User-1079832611 posted

    I get this same error once in a while during builds, and I am able to resolve it by first doing a "Build" - "Rebuild Solution" in Visual Studio.  After that completes successfully, then when I perform a build or publish, the compile and merge completes successfully without the "Unresolved assembly reference not allowedSystem.Web" error.

    I suspect the "Rebuild Solution" fixes whatever might be stuck or missing from the cache, and allows a clean build.

    Hopefully this solution helps others who run into this issue.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 30, 2020 6:23 PM