Build succeeds, but publish fails

前端 未结 21 1532
陌清茗
陌清茗 2020-12-09 14:29

Up until two days ago, I was able to use Visual Studio 2010\'s \"Publish Web\" option by right clicking on my project and clicking the publish button on the context menu. No

相关标签:
21条回答
  • 2020-12-09 15:17

    nothings work for me. deleting obj and bin file-clean-changing webservice name-shorten webservice name.

    But at all,

    +Expand your Reference.svcmap from visual studio.

    +Update reference.

    +And delete yellow warning datasources.

    works for me

    0 讨论(0)
  • 2020-12-09 15:17

    I resolved this by removing the file "packages.config" from my Project, which was flagged as missing. After that, Publish worked just fine.

    0 讨论(0)
  • 2020-12-09 15:17

    In case this helps anyone, for my MVC project in VS 2015 it was this file: File System.pubxml.user In the publish profile directory, including it caused compilation errors but deleting it enabled it to publish!

    0 讨论(0)
  • 2020-12-09 15:17

    I had a problem in vs2017 ,I just exclude bin and obj folder from projectn and publish project. it's work.

    0 讨论(0)
  • 2020-12-09 15:19

    In my experience this can happen when files are added/removed from different branches of your source control and an imperfect merge causes the project file structure and the actual file structure to diverge.

    This could be one of several options:

    • A file was deleted but the project still references it. Will fail to compile, will fail to publish.
    • A file was added but is not referenced by the project. May compile, depends whether the class/methods are referenced elsewhere in the project/solution. If compiles, will publish.
    • A file was added, but the project merge caused it to appear more than once in the project listing. Will compile, will fail to publish.

    The solution is to look at the source control logs and trying to identify the bad merge to the project file for the above issues, then fixing the project file accordingly.

    0 讨论(0)
  • 2020-12-09 15:19

    I had to manually copy and paste the missing files VS was asking for into the BIN folder. .pbd, .xml Sometimes they don't copy over.

    0 讨论(0)
提交回复
热议问题