OpenCL: Strong name validation failed while creating a new opencl project

1

This is the OpenCL first tutorial I am following.

I am unable to create new OpenCL project. When I try to create new OpenCL project in visual studio 2010 on windows 7, 64 bit , I get "Strong name validation failed. (Exception from HRESULT: 0x8013141A)" error. And thus it fails to create new project.

Reading some forum says, I have to do some thing with the dll . But I have no idea what is being said.

Some advice is at :http://www.lookout.net/2006/04/bypassing-strong-name-verification-for.html which ask me to do this:

sn -Vr *,36e4ce08b8ecfb17

But what do I put for 36e4ce08b8ecfb17, this is the name of the assembly, but what is the name of the assembly in my case? I am facing this issue at the beginning, when I just try to create New OpenCL project.

Can some one give me a hint specific to OpenCL ?

enter image description here

Then I click OK , and I get this:

enter image description here

What I tried

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>sn -Vl

Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Assembly/Strong Name                  Users
===========================================
*,*                                   All users
iisresolver,B03F5F7F11D50A3A          All users

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>sn -Vr * ,B03F5F7F11D50A3
A

Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Failed to open registry key -- Unable to format error message 00000005

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>sn -Vr iisresolver , B03F
5F7F11D50A3A

Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Failed to open metadata scope on iisresolver -- The system cannot find the file
specified.

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>sn -Vr * , *

Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Failed to open registry key -- Unable to format error message 00000005

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>

After I used elevated permission of CMD

C:\Windows\system32>sn -Vr * ,B03F5F7F11D50A3A

Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Verification entry added for assembly '*,B03F5F7F11D50A3A'

No gain here , so tired this:

C:\Windows\system32>sn -Vr * ,*

Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Verification entry added for assembly '*,*'

C:\Windows\system32>

Unfortunately no gain.

visual-studio-2010
opencl
strongname
windows64
asked on Stack Overflow Jul 25, 2014 by user2799508 • edited Aug 4, 2014 by user2799508

3 Answers

0

this is an annoying issue that can easily be sidestepped for development purposes.

To disable the strong name validating, simply open the visual studio command-line (for example, in Windows 7: Start >> All Programs >> Microsoft Visual Studio 2010 >> Visual Studio Tools >> Visual Studio Command Prompt (2010) )

Then type sn -Vl which will return you a list of all the assemblies registered for strong name validation.

Then type sn -Vr *,idnumberhere to disable the strong name validation for that assembly.

In the case of the error you are receiving ( Failed to open registry key -- Unable to format error message 00000005), this is most often related to permissions: your username may not have the necessary permissions to change strong name validation hence change the permissions on C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA to allow full access to your username as well and all should be fine again:)

Also, ensure that you run the VS command-line with elevated privileges so select Run as Administrator.

Hope this helps. :)

Let me know if you need more information as well though:)

answered on Stack Overflow Aug 2, 2014 by GMasucci • edited Aug 4, 2014 by GMasucci
0

This error is probably due to error Windows Registry try to modify it or install Intel or AMD OpenCL SDK on your machine, try to create the project again

or Update the include and library paths of the project to load the required information from the OpenCL SDK installed

answered on Stack Overflow Aug 6, 2014 by Chanakya.sun
0

I had this same exact problem today, and unfortunately, wasn't able to get it to work using sn.exe.

However, a workaround that worked for me was to just use one of Intel's sample programs as a starting project, and modify it from there. (For example the basic capabilities sample)

answered on Stack Overflow Aug 6, 2014 by Glen Tankersley

User contributions licensed under CC BY-SA 3.0