Publish Single File (Release) fails for WPF .NET Core 3.1 application

前端 未结 5 1834
南旧
南旧 2021-02-20 11:55

I\'m trying to publish a WPF Application (to a folder) targeting .NET Core 3.1, using Publish Single File, targeting win-x86. The application publishes fine for Debug, but fails

5条回答
  •  被撕碎了的回忆
    2021-02-20 12:24

    For me the error has to do with custom nuget sources, like Azure DevOps Artifacts. Sometimes the build script tries to restore nugets from Azure DevOps and fails with a (Unauthorized) error, which produces the error in the post.

    Temporarily disabling the custom nuget sources, makes publish work again regardless of the options used like single file.

提交回复
热议问题