Build succeeds, but publish fails

前端 未结 21 1582
陌清茗
陌清茗 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: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.

提交回复
热议问题