I downloaded the latest DotNetOpenAuth code from GitHub and initially it failed to build. I fixed the problem by running the following:
sn -Vr *,2780ccd10d57b246
found here:
http://www.dotnetopenauth.net/developers/contributing/quickstart-environment/
I went ahead and did some modifications to the project DotNetOpenAuth.AspNet. It compiled just fine. Then I created an MVC 4 web project under samples to test my changes. The solution again compiled. However as soon as I click on debug I get the ASP.NET yellow screen of death with the following error:
Could not load file or assembly 'DotNetOpenAuth.AspNet' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)
The MVC 4 project was created from the Empty Template, so there is no reference to Microsoft.Web.WebPages.OAuth
What am I missing? I completed the rest of the steps found in the link above:
sn -k mykeyfile.pfx
sn -i mykeyfile.pfx mykeycontainer
sn -p mykeyfile.pfx mykeyfile.pub
sn -q -t mykeyfile.pub
sn -Vr *,<YourPublicKeyTokenHere>
and also modified the file \tools\DotNetOpenAuth.props, specifically the lines: 27,29,30 with the new values
26. <SignAssembly>true</SignAssembly>
27. <PublicKeyFile Condition="'$(PublicKeyFile)' == ''">$(ProjectRoot)src\official-build-key.pub</PublicKeyFile>
28. <AssemblyOriginatorKeyFile Condition="'$(AssemblyOriginatorKeyFile)' == ''">$(PublicKeyFile)</AssemblyOriginatorKeyFile>
29. <KeyPairContainer Condition="'$(KeyPairContainer)' == ''">DotNetOpenAuth</KeyPairContainer>
30. <PublicKeyToken>2780ccd10d57b246</PublicKeyToken>
31. <DelaySign>true</DelaySign>
32. <SignedSubPath>signed\</SignedSubPath>