VS dotnet core控制台應用程式無法發布

VS dotnet core控制台應用程式無法發布

我正在嘗試使用 Visual Studio 2017 社群版發布 dotnet core 自包含控制台應用程式。

當我到達只需要單擊“發布”的步驟時,大約 10-15 秒一切看起來都很好,然後會彈出一個窗口,其中包含以下失敗訊息。

Publish has encountered an error.
Publishing failed.

A diagnostic log has been written to the following location:
.....AppData\Local\Temp\tmp343.tmp

然後我轉到該文件,這就是訊息...

System.AggregateException: One or more errors occurred. ---> System.Exception: Publishing failed.
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.ApplicationCapabilities.Publish.Model.DefaultPublishSteps.<>c__DisplayClass22_0.<IsBuildCompletedSuccessfully>b__1()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ApplicationCapabilities.Publish.Model.DefaultPublishSteps.<DefaultCorePublishStep>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ApplicationCapabilities.Publish.ViewModel.ProfileSelectorViewModel.<RunPublishTaskAsync>d__127.MoveNext()
---> (Inner Exception #0) System.Exception: Publishing failed.<---

通常我不會要求別人幫我查看日誌,但這並不能告訴我太多資訊。我想知道其他人是否也遇到類似的問題並且他們能夠解決它。

另外,既然有人可能會問,我可以成功建置並運行該應用程式。我之前已經部署過。我最近對應用程式進行了一些更改,但沒有什麼重大改變。可以肯定的是,我什至將分支切換到已知的可發布應用程式並嘗試發布該版本。同樣的問題。我覺得這跟VS有關係。想法?

相關內容