Search code examples
azure-service-fabric

Service Fabric local machine deployment fails with unclear error


When trying to debug Service Fabric locally it fails during deployment:

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\Keys\33c99d3358d005d142e356b6d*******_8f15e82c-1deb-4d62-b94a-196c3a******
========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

What this line could mean?

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

Solution

  • I had this same issue for the past day or so, and I was able to resolve the issue by searching my OS(C://) drive for the first part of the key name {first part}_{the rest}.

    I found a copy/original key in "C:\Users\youruser\AppData\Roaming\Microsoft\Crypto\Keys" and copied it over to "C:\ProgramData\Microsoft\Crypto\Keys".

    After doing this the app was able to run and deploy again on my local machine.