Service Fabric 本地计算机部署失败,错误不明

Service Fabric local machine deployment fails with unclear error

尝试在本地调试 Service Fabric 时在部署期间失败:

1>------ Build started: Project: Project.TestServer.Contracts, Configuration: Debug Any CPU ------
1>Project.TestServer.Contracts -> D:\Projects\Project.Test\Project.TestServer.Contracts\bin\Debug\netstandard2.1\Project.TestServer.Contracts.dll
2>------ Build started: Project: Project.TestServer, Configuration: Debug Any CPU ------
2>Waiting for output folder cleanup...
2>Output folder cleanup has been completed.
2>Project.TestServer -> D:\Projects\Project.Test\Project.TestServer\bin\Debug\netcoreapp3.1\win7-x64\Project.TestServer.dll
2>Project.TestServer -> D:\Projects\Project.Test\Project.TestServer\bin\Debug\netcoreapp3.1\win7-x64\Project.TestServer.Views.dll
3>------ Build started: Project: Project.TestServer.ServiceFabric, Configuration: Debug x64 ------
4>------ Deploy started: Project: Project.TestServer.ServiceFabric, Configuration: Debug x64 ------
4>C:\ProgramData\Microsoft\Crypto\Keysc99d3358d005d142e356b6d*******_8f15e82c-1deb-4d62-b94a-196c3a******
========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

这行是什么意思?

C:\ProgramData\Microsoft\Crypto\Keysc99d3358d005d142e356b6d*******_8f15e82c-1deb-4d62-b94a-196c3a******

我在过去一天左右遇到了同样的问题,通过在我的 OS(C://) 驱动器中搜索密钥名称的第一部分 {first部分}_{其余}。

我在“C:\Users\youruser\AppData\Roaming\Microsoft\Crypto\Keys”中找到了一个 copy/original 键并将其复制到“C:\ProgramData\Microsoft\Crypto\Keys”。

执行此操作后,该应用程序能够 运行 并在我的本地计算机上再次部署。

This solution ravipal 为我工作:

The issue is that the ASP.NET development certificate being imported to Local Computer was incomplete. We are working on addressing this issue in the VS Tooling. Meanwhile, please use the following workaround which is needed only once per machine.

  1. Export the asp net development certificate
    dotnet dev-certs https -ep "%TEMP%\aspcert.pfx" -p <password> (choose any password)
  2. Launch local machine certificate manager
  3. Import the certificate that was exported in step1 (%TEMP%\aspcert.pfx) to both 'Personal' and 'Trusted Root Certification Authorities' of Local Computer.
    Please use all the default options while importing the certificate.

Now the deployment of the SF application will work.