On a fresh machine with only Visual Studio 2019 installed, I cannot successfully build a CLI app in VS 2019. I hit a certificate related build error.
Repro Steps:
react-native init helloworld --version 0.59.10
cd helloworld
yarn add rnpm-plugin-windows
react-native windows --template vnext
Open VS solution and build
RESULT
Build Error:
Certificate could not be opened: helloworld_TemporaryKey.pfx.The specified network password is not correct.
I'm pretty sure this is specific to VS 2019. I've not repro'ing this on my other machine which has VS 2017.
I'm pretty sure this is specific to VS 2019. I've not repro'ing this on my other machine which has VS 2017.
I had the same issue and VS 2017 works fine for me too.
I had the same issue. Here is my temporary workaround:
Generate a new PFX file using MMC.
In windows/<ProjectName>
, replace <ProjectName>_TemporaryKey.pfx
by the new one.
Update <ProjectName>.csproj
as follows:
<PackageCertificateKeyFile>(((ProjectName)))_TemporaryKey.pfx</PackageCertificateKeyFile>
<PackageCertificateThumbprint>(((ThumbprintOfTheCertificate)))</PackageCertificateThumbprint>
<PackageCertificatePassword>(((PasswordOfThePFXFile)))</PackageCertificatePassword>
To get (((ThumbprintOfTheCertificate)))
, go to MMC, navigate to the certificate, and right-click, choose Properties.
Note that the command react-native run-windows
does not work yet, because it does not use the .csproj
file and does not know (((PasswordOfThePFXFile)))
.
Fix merged.
Most helpful comment
I had the same issue. Here is my temporary workaround:
Generate a new PFX file using MMC.
In
windows/<ProjectName>
, replace<ProjectName>_TemporaryKey.pfx
by the new one.Update
<ProjectName>.csproj
as follows:To get
(((ThumbprintOfTheCertificate)))
, go to MMC, navigate to the certificate, and right-click, choose Properties.Note that the command
react-native run-windows
does not work yet, because it does not use the.csproj
file and does not know(((PasswordOfThePFXFile)))
.