locked
Web deply proj giving copy error for dll's (references) RRS feed

  • Question

  • User1112674331 posted
    Hi there,

    Well almost there and it works locally but when i try to web deploy it using Build Solutionn i get a access denied error when trying to copying the dll references i have included in the project.

    Can you help? Is this a rights problem?? Is so - why?

    ----
    Error    11    Unable to copy file "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\IanGregson.elBlog.Util\bin\Release\IanGregson.elBlog.Util.dll" to "bin\IanGregson.elBlog.Util.dll". Access to the path 'bin\IanGregson.elBlog.Util.dll' is denied.    iangregsondotcom

    Error    12    Unable to copy file "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\IanGregson.elBlog.Util\bin\Release\IanGregson.elBlog.Util.pdb" to "bin\IanGregson.elBlog.Util.pdb". Access to the path 'bin\IanGregson.elBlog.Util.pdb' is denied.    iangregsondotcom
    ---

    and here is the output

    Compile complete -- 0 errors, 0 warnings
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(2403,9): error MSB3021: Unable to copy file "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\IanGregson.elBlog.Util\bin\Release\IanGregson.elBlog.Util.dll" to "bin\IanGregson.elBlog.Util.dll". Access to the path 'bin\IanGregson.elBlog.Util.dll' is denied.
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(2403,9): error MSB3021: Unable to copy file "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\IanGregson.elBlog.Util\bin\Release\IanGregson.elBlog.Util.pdb" to "bin\IanGregson.elBlog.Util.pdb". Access to the path 'bin\IanGregson.elBlog.Util.pdb' is denied.
    Done building project "iangregsondotcom.csproj" -- FAILED.

    Actually the reference does exist in my web project added as project reference.....

    Anybody know what is going on???

    I had a similar problem with urlRewriting.dll which i use but removing the reference and adding it back again seemed to sort that...

    Thanks in advance

    Ian


    Saturday, April 22, 2006 3:53 AM

All replies

  • User1112674331 posted
    More info, : I am using a solution with one class library (dll that causes problem), Web application project (the new one) and web deployment project.

    Anybody else receive anything like this?

    I also converted my VS 2005 web site project to a VS 2005 (no version change) web application project as per the tutorial online at Scott's blog.. everything went according to plan and i can run locally without building...

    Thanks again

    ian
    Saturday, April 22, 2006 7:09 AM
  • User1112674331 posted
    And just to be complete here is the complete output of the build...  and i am using visual source safe 2005 although i don't think this should matter

    ------ Build started: Project: IanGregson.elBlog.Util, Configuration: Release Any CPU ------
    IanGregson.elBlog.Util -> C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\IanGregson.elBlog.Util\bin\Release\IanGregson.elBlog.Util.dll
    ------ Build started: Project: iangregsondotcom, Configuration: Release Any CPU ------
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:TRACE /reference:bin\FreetextBox.dll /reference:"C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\IanGregson.elBlog.Util\bin\Release\IanGregson.elBlog.Util.dll" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Configuration.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Web.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Web.Mobile.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Web.Services.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:bin\UrlRewritingNet.UrlRewriter.dll /debug:pdbonly /optimize+ /out:obj\Release\iangregsondotcom.dll /target:library Administration\ChangePassword.aspx.cs Administration\ChangePassword.aspx.designer.cs Administration\Default.aspx.cs Administration\Default.aspx.designer.cs Administration\EditItem.aspx.cs Administration\EditItem.aspx.designer.cs Administration\EditItem1.aspx.cs Administration\EditItem1.aspx.designer.cs BlogCategories.ascx.cs BlogCategories.ascx.designer.cs CreateUser.aspx.cs CreateUser.aspx.designer.cs Default.aspx.cs Default.aspx.designer.cs ForgotPassword.aspx.cs ForgotPassword.aspx.designer.cs Login.aspx.cs Login.aspx.designer.cs Logout.aspx.cs Logout.aspx.designer.cs MasterPage.master.cs MasterPage.master.designer.cs myTest.aspx.cs myTest.aspx.designer.cs PermaLink.aspx.cs PermaLink.aspx.designer.cs Properties\AssemblyInfo.cs Tempy.aspx.cs Tempy.aspx.designer.cs

    Compile complete -- 0 errors, 0 warnings
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(2403,9): error MSB3021: Unable to copy file "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\IanGregson.elBlog.Util\bin\Release\IanGregson.elBlog.Util.dll" to "bin\IanGregson.elBlog.Util.dll". Access to the path 'bin\IanGregson.elBlog.Util.dll' is denied.
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(2403,9): error MSB3021: Unable to copy file "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\IanGregson.elBlog.Util\bin\Release\IanGregson.elBlog.Util.pdb" to "bin\IanGregson.elBlog.Util.pdb". Access to the path 'bin\IanGregson.elBlog.Util.pdb' is denied.
    Done building project "iangregsondotcom.csproj" -- FAILED.
    ------ Build started: Project: iangregsondotcom.csproj_deploy, Configuration: Release Any CPU ------
    MSBUILD : warning MSB3021: Unable to copy file "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\.net Url Rewriting\Release\UrlRewritingNet.UrlRewriter.dll" to "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\iangregsondotcom\Bin\UrlRewritingNet.UrlRewriter.dll". Could not find a part of the path 'C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\.net Url Rewriting\Release\UrlRewritingNet.UrlRewriter.dll'.
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v /iangregsondotcom.csproj -p "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\iangregsondotcom" -u -f "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\iangregsondotcom.csproj_deploy\Release\\"
    c:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\iangregsondotcom\Global.asax(21): warning CS0162: Unreachable code detected
    Running aspnet_merge.exe ...
    C:\Program Files\MSBuild\Microsoft\WebDeployment\v8.0\aspnet_merge.exe "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\iangregsondotcom.csproj_deploy\Release" -o iangregsondotcom.csproj_deploy -copyattrs
    Successfully merged 'C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\iangregsondotcom.csproj_deploy\Release'.
    Updating web.config: RootPath = C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\iangregsondotcom.csproj_deploy\Release\, ValidateSections = False, UseExternalConfigSource = False
    Update of web.config Succeeded.
    Done building project "iangregsondotcom.csproj_deploy.wdproj".
    ========== Build: 2 succeeded or up-to-date, 1 failed, 0 skipped ==========

    Saturday, April 22, 2006 7:44 AM
  • User1112674331 posted
    argggh! I wish i had never started this now!!!

    Basically on RELEASE or DEBUG builds there are 3 errors including

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(2403,9): error MSB3021: Unable to copy file "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\IanGregson.elBlog.Util\bin\Release\IanGregson.elBlog.Util.dll" to "bin\IanGregson.elBlog.Util.dll". Access to the path 'bin\IanGregson.elBlog.Util.dll' is denied.
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(2403,9): error MSB3021: Unable to copy file "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\IanGregson.elBlog.Util\bin\Release\IanGregson.elBlog.Util.pdb" to "bin\IanGregson.elBlog.Util.pdb". Access to the path 'bin\IanGregson.elBlog.Util.pdb' is denied.
    MSBUILD : warning MSB3021: Unable to copy file "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\.net Url Rewriting\Release\UrlRewritingNet.UrlRewriter.dll" to "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\iangregsondotcom\Bin\UrlRewritingNet.UrlRewriter.dll". Could not find a part of the path 'C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\.net Url Rewriting\Release\UrlRewritingNet.UrlRewriter.dll'.

    But on a DEBUG build the problem with IanGregson.elBlog.Util.pdb and bin\IanGregson.elBlog.Util.dll go away!!! Which is not bad but who knows WHY the problem happens on RELEASE?

    Anyway on both RELEASE and DEBUG this problem is always displayed :

    MSBUILD : warning MSB3021: Unable to copy file "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\.net Url Rewriting\Release\UrlRewritingNet.UrlRewriter.dll" to "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\iangregsondotcom\Bin\UrlRewritingNet.UrlRewriter.dll". Could not find a part of the path 'C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\.net Url Rewriting\Release\UrlRewritingNet.UrlRewriter.dll'.

    Now i see why, this path is not valid! C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\.net Url Rewriting\Release\UrlRewritingNet.UrlRewriter.dll'

    but why is it looking there i added it from c:\dotNet Components\.net URL writing 

    Signed a very confused Ian

    Saturday, April 22, 2006 8:54 AM
  • User1112674331 posted
    Ok ... found a work around for the Project based web reference... As soon as i removed it from SOURCE SAFE control.... the errors disappeared on both RELEASE and DEBUG.

    Scott do we have an issue with VSS??

    BUT!

    This one is still present.. I don't understand why it is using "\Visual Studio 2005\.net Url Rewriting\" that directory doesn't exist and never has done. ermmmm if this a bug related to using a . (dot).... is there a work around??????? help ---- here is the only error i have now below....

    MSBUILD : warning MSB3021: Unable to copy file "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\.net Url Rewriting\Release\UrlRewritingNet.UrlRewriter.dll" to "C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\Projects\iangregsondotcom\iangregsondotcom\Bin\UrlRewritingNet.UrlRewriter.dll". Could not find a part of the path 'C:\Documents and Settings\Ian.IANGREGSON\My Documents\Visual Studio 2005\.net Url Rewriting\Release\UrlRewritingNet.UrlRewriter.dll'.

    Saturday, April 22, 2006 10:18 AM
  • User1112674331 posted
    OK I have fixed it, this is what i did but i don't understand why!

    After removing the urlrewriting dll i checked the bin directory of my webapp and there was a file left over called

    urlrewritingnet.urlrewriting.dll.refresh

    and it contained

    ..\..\..\.net Url Rewriting\Release\UrlRewritingNet.UrlRewriter.dll

    this is that silly directory that never existed!!

    So i deleted this manually... then i readded the reference to the dll back in and just done a build solution on DEBUG and RELEASE and both function correctly... well certainly no errors anyway...

    I have no idea what the refresh is and why it was there, i can only think that either with web deployment adding put it there or it was put there when i did an upgrade from web site project (vs 2005) and web app project

    This is probably going to be very silly now, but i am about to try and add all projects in the solution back into Source Safe to see if it breaks it again!

    Regards

    Ian




    Saturday, April 22, 2006 5:20 PM
  • User1112674331 posted
    Ok adding back into source control using VSS 2005... the problem comes back...  although not the urlrewriting problem.. but all the others...

    So i am removing out of source control  as its a nightmare and impossible to work with....

    It would be nice to be able to use source control though..

    If anybody has any ideas, i would appreciated the help.

    ian
    Saturday, April 22, 2006 5:54 PM
  • User722055817 posted

    More info, : I am using a solution with one class library (dll that causes problem), Web application project (the new one) and web deployment project.

    Anybody else receive anything like this?

    I also converted my VS 2005 web site project to a VS 2005 (no version change) web application project as per the tutorial online at Scott's blog.. everything went according to plan and i can run locally without building...

    Hi,

    though I've installed Web Deployment Project BETA (WDP), I've still not used it.

    Issue I want to share with you is about Web Application Project (WAP) and SourceSafe 2005 (SS).

    Today, I've just installed WAP 1.0; the RTM one. It was just released yesterday (8 May 2006). When I used WAP for the first time, everything just worked so fine until I was trying to use SS as my source control. In my case, I have a solution with one project. Formerly, it was a Web Site Project (WSP) and then I converted it to WAP. I can successfully build it.

    I dragged and dropped the solution file and the project folder from the Windows Explorer (WE) directly to SS. Suddenly, it can NOT be built with the error message saying that unable to copy the assembly, as you have encountered.

    I tried googling and then found this thread, but unfortunately with no solution nor workarounds. I thought there's a bug with WAP but still found nothing about it.

    Left in confusing situation, I decided to remove it from SS; removing any SS related files including bin and obj folders. Next step, I tried to add it back to SS using Visual Studio 2005 (VS) menu. Note that this time, I didn't drag and drop it from WE.

    I tried to build it and, eventually, I could build it without any problem at all.

    Then, I come into the occlusion that I think it's better (and recommended) to add source files to source controls using menu provided by VS; not using drag and drop directly from WE.

    So, did you have the similar experience as I did?

    Tuesday, May 9, 2006 12:43 PM
  • User1112674331 posted
    Hi..

    Yes i used the project explorer and tried right clicking and adding to source control..

    Its very strange i get the problem... i must admit ... i lost patience with it... so i decided to wait and i notice now its got a full release so i will try again..

    But your problem was the same as mine.

    I am glad i wasn't alone :-)

    Thanks

    Ian
    Wednesday, May 10, 2006 7:29 PM
  • User870690715 posted

    Even i got the same problem.

    What I Did: Delete Debug/Relese folder form project which is refered, and build the project again.

    Or U may need to delete .pdb files in Main project reference OR bin dir. And build again... That's it...[Yes]

     

    Cheers!

    Saindu

     

    Thursday, July 19, 2007 10:32 AM
  • User1657428098 posted

    thanx a lot I spent 1 hour in this **** problem... with your reply i fixed it, but i dont understand why this problem happened. Any idea?

     

     

    Friday, May 9, 2008 8:34 AM