Skip to content

Fix certificate issue in CalculatorUnitTests#617

Merged
grochocki merged 1 commit intomicrosoft:masterfrom
rudyhuyn:FixCertificate
Aug 3, 2019
Merged

Fix certificate issue in CalculatorUnitTests#617
grochocki merged 1 commit intomicrosoft:masterfrom
rudyhuyn:FixCertificate

Conversation

@rudyhuyn
Copy link
Copy Markdown
Contributor

@rudyhuyn rudyhuyn commented Aug 3, 2019

Fixes #616

The problem reported by users regarding the impossibility to compile CalculatorUnitTests is due to a mismatch between the certificate and the certificate thumbprint value in the vcxproj.

.vcxproj

<PackageCertificateThumbprint>**3F0C32266A4D995CC08C9AEC3960CFF3EF0D1853</PackageCertificateThumbprint>

certificate info
image

This mismatch isn't new and has always been present in this repository, but Visual Studio has ignored it so far. It seems that the certificate thumbprint verification was introduced in Visual Studio 2019 16.2. (the project compiles correctly with 16.1).

3 ways to fix the issue

  • Remove the <PackageCertificateThumbprint> from .vcxproj, so Visual Studio won't verify the certificate thumbprint
  • Fix the value of <PackageCertificateThumbprint>
  • Fully remove the certificate from the project (the certificate is only necessary when we generate a msix, not when Visual Studio deploys the application)

Because this project is for Unit Tests, I assume that it is never sideloaded using a msix and that therefore solution 3 is the most suitable, but in case it breaks the CI, the 2 others are also possible.

EDIT: Calculator-CI fails if one of these properties is missing, Solution 2 is the only fix possible.

How changes were validated:

  • Manually tested

@rudyhuyn rudyhuyn changed the title Fix the thumbprint of the certificate in the vcxproj file Fix certificate issue in CalculatorUnitTests Aug 3, 2019
Copy link
Copy Markdown

@Geveffe Geveffe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kinglionsz
Copy link
Copy Markdown

kinglionsz commented Aug 4, 2019

Thanks! Every master.👍💪
@rudyhuyn @Geveffe @grochocki @jdhuntington

that's ok only for testing

but in fact, I have to fully remove the certificate from the other project :\calculator\src\Calculator\Calculator.vcxproj

  <!--<PackageCertificateKeyFile>TemporaryKey.pfx</PackageCertificateKeyFile>
    <AppxPackageSigningEnabled>true</AppxPackageSigningEnabled>
    <AppxSymbolPackageEnabled>False</AppxSymbolPackageEnabled>-->

we should check in the future .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build ,Error Certificate could not be opened: TemporaryKey.pfx. The specified network password is not correct.

4 participants