1

Closed

Build Fails - SkipStrongNames Reports Conflicted Setting

description

I clone the repo, build it according to instructions, and get the following error:
Unit tests will not run correctly unless SkipStrongNames is Enabled.
Current status: Disabled.
Run 'build /t:EnableSkipStrongNames' to fix the problem.
I build the EnableSkipStrongNames target and get this strange error
Skip Strong Names is already enabled.
SkipStrongNames: Disabled
I've attached the output of build /v:n /t:EnableSkipStrongNames and build /v:n to this issue.

Steps to Reproduce - Attempt 1
  1. Open "VS2012 x86 Native Tools Command Prompt"
  2. Run git clone https://git01.codeplex.com/entityframework
  3. Clear my .NuGet cache at %LocalAppData%\NuGet\Cache
  4. Run build /t:RestorePackages
  5. Run build /t:EnableSkipStrongNames
  6. Run build
Steps to Reproduce - Attempt 2
  1. Open "VS2012 x86 Native Tools Command Prompt"
  2. Run git clone https://git01.codeplex.com/entityframework
  3. Clear my .NuGet cache at %LocalAppData%\NuGet\Cache
  4. Run build /t:RestorePackages
  5. Run build
Machine Information
  • Windows 7 64-bit
  • Installed Microsoft Visual Studio Versions
    • 2010 Ultimate
    • 2012 Ultimate
  • Entries in HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP
    • CDF
    • v2.0.50727
    • v3.0
    • v3.5
    • v4
    • v4.0

file attachments

Closed Mar 19, 2013 at 6:18 PM by BriceLambson

comments

RoMiller wrote Mar 14, 2013 at 10:18 PM

EF Team Triage: Assigning to a member of the EF team for further investigation.

BriceLambson wrote Mar 18, 2013 at 5:30 PM

Could you try the following sequence and attach its output?
SkipStrongNames -s SkipStrongNames.xml
SkipStrongNames -d SkipStrongNames.xml
SkipStrongNames -s SkipStrongNames.xml
SkipStrongNames -e SkipStrongNames.xml
SkipStrongNames -s SkipStrongNames.xml
SkipStrongNames.exe is inside "<EFRoot>\packages\Microsoft.Web.SkipStrongNames.1.0.0\tools" and
SkipStrongNames.xml is inside "<EFRoot>\tools"

EnterpriseProds wrote Mar 18, 2013 at 6:18 PM

ef> .\packages\Microsoft.Web.SkipStrongNames.1.0.0\tools\SkipStrongNames -s .\tools\SkipStrongNames.xml
Current status: DISABLED

ef> .\packages\Microsoft.Web.SkipStrongNames.1.0.0\tools\SkipStrongNames -d .\tools\SkipStrongNames.xml
Skip Strong Names is already disabled.

ef> .\packages\Microsoft.Web.SkipStrongNames.1.0.0\tools\SkipStrongNames -s .\tools\SkipStrongNames.xml
Current status: DISABLED

ef> .\packages\Microsoft.Web.SkipStrongNames.1.0.0\tools\SkipStrongNames -e .\tools\SkipStrongNames.xml
Skip Strong Names is already enabled.

ef> .\packages\Microsoft.Web.SkipStrongNames.1.0.0\tools\SkipStrongNames -s .\tools\SkipStrongNames.xml
Current status: DISABLED

davidmatson wrote Mar 18, 2013 at 6:50 PM

It definitely looks like a bug. Sorry for the trouble.

At the moment, I'm not sure how to reproduce the bug. Can you run regedit.exe and see whether either of the following keys exist?
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification

If they do exist, can you list the subkeys under them?

Thanks,

David

EnterpriseProds wrote Mar 18, 2013 at 7:39 PM

No apologies necessary.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification does not exist.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName does not exist.

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification does not exist.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName does not exist.

Yeah, none of them exist. :(

EnterpriseProds wrote Mar 19, 2013 at 11:25 AM

I think I have solved my problem. My identity did not have elevated privileges on the computer. I elevated the privileges and re-ran the script to enable SkipStrongNames. That seems to have fixed it. The unit tests now run (and fail because I don't have the databases set up for them).

Perhaps someone can add a small blurb on the Getting and Building Code page specifying that the user account running the build process must have rights to write to the registry HKLM tree for the SkipStrongNames to enable correctly...

You can close this issue.

BriceLambson wrote Mar 19, 2013 at 6:18 PM

I've updated the documentation.

EnterpriseProds wrote Mar 19, 2013 at 7:40 PM

Thanks for all of your help, @BriceLambson and @davidmatson.