none
Publish failed with following error: Could not find a part of the path 'c:\development\TestProject\TestProject\bin\Release\TestP

    Question

  • Hello,

     

    This error happens once in a while, could someone tell me why it is happeneing?

     

    Publish failed with the following error: Could not find part of the path 'C:\development\TestProject\TestProject\bin\Release\TestProject.Publish\TestProject_1_0_0_9'

     

    Thanks in advance.

    Monday, August 07, 2006 5:15 PM

All replies

  • I have this error occasionally as well.

    seems like the folder isn't always being created. Could this be some folder permissions issue or something?

    Friday, August 25, 2006 5:31 AM
  • I have this error also.

    I am trying to publish a oneclick install.  It keeps telling me the path is missing below the debug folder but I am not publishing there.  I am publishing to a folder off my c drive so I can upload to a secure ftp server.
    Wednesday, February 14, 2007 8:59 PM
  • This has happened to me before when I switch the build configuration from Debug to Release mode and try to publish without rebuilding in Release mode.  A Rebuild All has solved the problem for me.
    Monday, March 12, 2007 3:33 AM
  • Hi .. I have a web application that creates directories for users to upload content.  It works fine on my home machine, but when I upload it, I get the error below

    "Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path "D:\".

    Thanks,


     help me please

    Sunday, March 25, 2007 1:35 PM
  • I had the same issue.

     

    I changed the version number of the applicationInfo page from 1.1.1.5 to 1.1.1.6, and that solved the problem for me.

    Thursday, March 29, 2007 10:52 PM
  • Do the publish from the Solution Explorer.  For some reason it's different. Smile

     

    DD

    Friday, March 30, 2007 12:38 AM
  • there were issues with the publish and publish wizard buttons in beta 2 (http://msdn2.microsoft.com/en-us/library/ms379560(vs.80).aspx).  i too encountered this problem, but have found that the following "fixes" it:

    1. publish using the previous version number (the publish should succeed and increment the version if you have the version checked to autoincrement)
    2. then publish again to the next version number

    this generally makes the 2nd publish successful.  again, i attribute this issue to the problems they had in beta 2 (especially considering the quirkiness of the issue).

    Tuesday, May 15, 2007 6:26 PM
  • Same happens when adding HomeSite attribute to one of BootStrapper\Packages\Product.xml.

    <PackageFile Name="O2003PIA.msi" HomeSite="msiRef"></PackageFile> 

    Reopen solution solves problem.

    Friday, June 29, 2007 9:36 AM
  • I saw in another thread somewhere that publishing from the context menu in the solution explorer consistently works. 

    DD

    Friday, June 29, 2007 11:22 AM
  • Just manually upgrade the version number and try publishing again.

     

    Friday, January 11, 2008 5:54 AM
  • This seems to work ( from http://msdn.microsoft.com/en-us/library/ms379560(VS.80).aspx - middle of page, search for "Could not find a part of" )

    Publish operation fails when invoked using the "Publish Now" or "Publish Wizard" buttons on the Publish tab of the project properties designer

    After invoking publishing using either the Publish Now or Publish Wizard buttons, the publish operation will fail. The error can vary, for example: "Failed to copy file 'C:\..\setup.exe' to 'http://../setup.exe.' Unable to add 'setup.exe' to the Web. Unable to add file 'setup.exe.' The system cannot find the file specified," or "Publish failed with the following error: Could not find a part of the path 'C:\..\publish\..'"

    Work Around:

    1. Close and reopen the project that is to be published.
    2. Right-click on the project in the solution explorer, and select Properties.
    3. In project designer, navigate to the Publish tab. Set properties there as appropriate.
    4. Right-click on the project in the solution explorer, and select Publish.
    Note   In general, avoid using the Publish Now or Publish Wizard buttons altogether. Use the Publish command in the context menu in the solution explorer or the Build top-level menu item.

    Wednesday, March 18, 2009 1:53 PM
  • Note   In general, avoid using the Publish Now or Publish Wizard buttons altogether. Use the Publish command in the context menu in the solution explorer or the Build top-level menu item.
    !!!! Wow "Avoid using the Publish Now" button??!?!?!? We truly the live in dark ages of computing.
    Saturday, December 19, 2009 5:14 AM
  • I've never had any problems with the Publish Now button, but I have had problems with the Publish Wizard. Weird. I'm using VS2008 SP-1, and I don't remember having this problem with VS2008.

    RobinDotNet
    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Saturday, December 19, 2009 8:02 PM
  • OrionTheHunter's solution did not work for me, so I'm still looking for an answer.  Here's the message I get:

    Copying file DotNetOpenAuth.dll to obj\Release\Package\PackageTmp\DotNetOpenAuth.dll failed. Could not find file 'DotNetOpenAuth.dll'.

    I have tried removing the reference and re-creating it, but to no avail.  I'm using VS 2010.

    Wednesday, May 26, 2010 10:15 PM
  • Did you try closing VS, deleting your bin folder, and re-opening VS? Or doing a CleanSolution? The other question is where did DotNetOpenAuth.dll come from?  If it's yours, did you build it as a release build or was it build as a debug configuration?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Thursday, May 27, 2010 7:25 AM
  • Thank you so much for answering.

    • Yes, I tried deleting the bin folder and closing and re-opening VS.
    • DotNetOpenAuth.dll is is provided by one of the OpenID people.  I tried removing the reference and adding it back, and also tried getting it from several different locations on my computer.  I think it is build with an older version of .NET, but it does run just fine on my local server, even in release mode.  The application compiles and works fine.  The only thing I can't do is publish it.  I cannot publish either locally (file system) or to the server (FTP).  Both give the same message.
    • The application has been working for over a year.  The difference is that I'm using VS 2010 and Silverlight 4.
    • I did try a clean solution, but with the clean solution I cannot compile.  I get this: sTickets.App' does not contain a definition for 'FindName' and no extension method 'FindName' accepting a first argument of type 'sTickets.App' could be found (are you missing a using directive or an assembly reference?)    E:\Documents\Visual Studio 2010\Projects\sTickets\sTickets\obj\Release\App.g.i.cs.
    • App.g.i.cs is a generated file, of course, so I cannot edit it and I don't know how to make it not generate the offending code.
    • The bad line contains this: this.ItemTemplateGeneric = ((System.Windows.DataTemplate)(this.FindName("ItemTemplateGeneric")));
    • Comparing the old and new projects, I find this line is not in the old project, but I don't know why?
    • There are some other differences between the two solutions, but not that many and none that I can identify as significant.

    Can I publish it manually by gathering all the relevant files?  Where is the best place to get them from.

    Does this spark any other ideas?  Thanks again.


    Jim Sn
    Friday, May 28, 2010 1:59 PM
  • Hi,

    About the dll: I would add it to your project and mark it with "build action" = none and "copy to output directory" = "do not copy". Then delete the reference to that dll in your project, and re-add it, but instead of picking it out .NET, browse to the one you have added to your project. On the reference, set "copy local" to true. This will ensure you know exactly what version is being deployed, and you are referencing that version.

    Are you saying if you do Clean Solution and then do a build, it doesn't build successfully? What is sTickets.App? And what is App.g.i.cs?

    If you do a build, are all the files you need in the \bin\release folder? If you double-click on the exe file there, does the application run successfully?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Friday, May 28, 2010 6:13 PM
  • Hi Jim,

    What version of .NET are you targeting?

    And what kind of application are you trying to publish? It is a Windows Forms or WPF application? Or is it a Silverlight application or something completely different?

    RobinDotNet

     

     


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Friday, May 28, 2010 11:38 PM
  • Thanks again, RobinDotNet.

    It's .NET 4, Silverlight 4, and VS 2010 with Entity Framework.  It was converted from SL 3 and an earlier .NET (3.5 I think).  However, I don't think problem started as soon as I upgraded to SL 4 and .NET 4, but a few days later.

    The application does run successfully on my computer in both debug and release mode.  The only thing I can't do is publish it.

    I have not yet tried your suggestion about changing, removing and re-adding the reference.  Instead, I made a clean solution.  Unfortunately, that produces a different error that prevents a successful build, so I can't even get to the original problem to see if it's still there.

    (The new error is "'sTickets.App' does not contain a definition for 'FindName' and no extension method 'FindName' accepting a first argument of type 'sTickets.App' could be found."  This happens in VS-generated file App.g.i.cs, which is overwritten every compilation.  I am posting that elsewhere, but the problem went away when I reinstalled VS 2010 and re-appeared when I re-installed SL 4.)

    I'll go back to the original project and try changing the refence.  However, the reference in the original project was done much as you suggested, and I had changed it while trying to solve the problem.  Still, your reference idea is worth a try.


    Jim Sn
    Saturday, May 29, 2010 1:52 AM
  • The problem went away, apparently due to my re-installing VS 2010 and Silverlight 4.  Those are the only changes I made since I last saw the problem.
    Jim Sn
    Saturday, May 29, 2010 3:02 AM