Open
Description
Currently ResolveComReference accepts KeyFile and DelaySign parameters:
https://github.com/Microsoft/msbuild/blob/518c2fb4bd8621fe0d97e8a233f9ae9599d4b8d4/src/Tasks/Microsoft.Common.CurrentVersion.targets#L2734
However if a project specifies DelaySign=false and PublicSign=true then the project that has a ComReference such as:
<ItemGroup>
<COMReference Include="SHDocVw">
<Guid>{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>1</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
Fails the build with:
SHDocVw error MSB3299: The key file 'f:\agent\FinalPublicKey.snk' does not contain a public/private key pair.[f:\agent\Test.csproj]
because the .snk only contains the public key.