This is a migrated thread and some comments may be shown as answers.

Strong name validation failed

6 Answers 389 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Wolfgang
Top achievements
Rank 1
Wolfgang asked on 06 Oct 2015, 06:57 AM

Hi,

 

I have the following problem:

Our application consists of different solutions. All our solutions have a .snk keyfile. The solutions which are not enhanced can be put to GAC using ngen ( using the x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen Pathtosomedll\something.dll).

For the enhanced parts, there is always an error:

 Microsoft (R) CLR Native Image Generator - Version 4.6.79.0

 Copyright (c) Microsoft Corporation.  All rights reserved.
 Failed to compile Pathtosomedll\something.dll because of the following error: Strong name validation failed. (Exception from HRESULT: 0x8013141A).​

Signature file is created (like all other projects) using Project-Properties-Signature - sign assembly.

Signature is not delayed.

 

In output window following is shown:

"c:\program files (x86)\telerik\data access\sdk\VEnhance.exe" -assembly:"Pathtosomedll\something.dll" -config:"Pathtosomething\App.config" -verboseMode:1

-reference:"otherdll.dll"

-reference:...dll"

-reference:"C:\Program Files (x86)\Telerik\Data Access\bin\Telerik.OpenAccess.dll"​

-reference:"C:\Program Files (x86)\Telerik\Data Access\bin\Telerik.OpenAccess.35.Extensions.dll"

-reference:"C:\Program Files (x86)\Telerik\Data Access\bin\Telerik.OpenAccess.40.Extensions.dll"

-reference:"​otherdlls.dll"

-reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll"

-keyFile:"pathtokeyfile\pcKey.snk"

 

Enhancement complete -- 0 errors, 0 warnings

 

what does i need to do so that signing works with an enhanced assembly?

 

Best regards

 

 

6 Answers, 1 is accepted

Sort by
0
Wolfgang
Top achievements
Rank 1
answered on 06 Oct 2015, 03:31 PM
Oh, additional information: 2015.1.225.1 and 32 bit would work, only 64 bit fails...
0
Viktor Zhivkov
Telerik team
answered on 08 Oct 2015, 12:01 PM
Hello Wolfgang,

I am sorry to hear that you are experiencing issue with our product.
If you are using Q1 2015 (version 2015.1.225.1) on a machine that has Visual Studio 2015 and/or .Net 4.6 installed you may experience such errors due compatibility issue.
If you are already using NuGet packages I would suggest that you try to update your packages to Q3 2015 (version 2015.3.926) and try the same procedure again. Q3 2015 is the first version of Telerik Data Access that is compatible with Visual Studio 2015 and .Net 4.6 and we are strongly suggesting to use it in environment where they are installed even if your projects are targeting .Net 4.5.

Regards,
Viktor Zhivkov
Telerik
 
Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
0
Wolfgang
Top achievements
Rank 1
answered on 09 Oct 2015, 08:33 AM

Hi Viktor,

thanks for the answer, we do not use NuGet packages neither plan using it in future (because of the Visual Studio integration - therefore no switch to VS2015 yet).  

Best regards

Wolfgang

0
Viktor Zhivkov
Telerik team
answered on 12 Oct 2015, 01:19 PM
Hi Wolfgang,

If you have are not have Visual Studio 2015 and .Net 4.6, it looks like your have configured your data model project to be built against specific processor architecture (x86 or x64). We are aware of issues with our enhancing process and 64bit assemblies and the work around that I can suggest is to always compile your data model project using AnyCPU target architecture. All other projects in your solution can be build targeting x86 or x64 CPU architecture and reference the data model without any issues.

If you are tried the described work around and you are still experiencing issues with your build process, please let us know.

Regards,
Viktor Zhivkov
Telerik
 
Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
0
Wolfgang
Top achievements
Rank 1
answered on 20 Oct 2015, 07:32 AM

Hi Viktor,

It partially solved the problem. Now some warnings are shown when using ngen. (See below)

For a better understanding: Target plattforms are Win7, Win8.1 / maby Win10. The output is from a Win 8.1 computer. If we are using System.ServiceModel we normally use Version 4.0.0.0 from .net 4.5 folder.

The Warning looks somehow like that an older System.Servicemodel is used in Telerik.OpenAccess.ServiceHost.dll.

In my opinion the Telerik.OpenAccess.ServiceHost is not really used by our application, but in it for the purpose of real time monitoring.(the enable logging thing only is used when debugging for data bottlenecks))

Can you help me to know what the warning means, and how to test wether it has any impact for normal using (maybe some side effect we have not thought about when testing our application)

Best regards,

Wolfgang

Microsoft (R) CLR Native Image Generator - Version 4.0.30319.33440
Copyright (c) Microsoft Corporation.  All rights reserved.
    Compiling assembly C:\Program Files\Schwing-Stetter\MC500\Bin64\Telerik.OpenAccess.ServiceHost.dll (CLR v2.0.50727) ...
Telerik.OpenAccess.ServiceHost, Version=2015.1.225.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342
    Compiling assembly System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (CLR v2.0.50727) ...
Der Typ "System.ServiceModel.Dispatcher.ImmutableDispatchRuntime" in der Assembly "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" konnte nicht geladen werden. while compiling method ChannelHandler.DispatchAndReleasePump
Warning: Did not find definition for method token 69000490 in profile data.
Der Typ "System.ServiceModel.Dispatcher.ImmutableDispatchRuntime" in der Assembly "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" konnte nicht geladen werden. while compiling method DispatchRuntime.GetOperation
Der Typ "System.ServiceModel.Dispatcher.ImmutableDispatchRuntime" in der Assembly "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" konnte nicht geladen werden. while compiling method ChannelHandler.DispatchAndReleasePump
Warning: Did not find definition for method token 69000490 in profile data.
System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Compiling assembly SMDiagnostics, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (CLR v2.0.50727) ...
Warning: Failed to load method token 690000d9 from profile data.
Warning: Failed to load method token 690000da from profile data.
Warning: Failed to load method token 690000d9 from profile data.
Warning: Failed to load method token 690000da from profile data.
Warning: Failed to load method token 690000d9 from profile data.
Warning: Failed to load method token 690000da from profile data.
SMDiagnostics, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Compiling assembly System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (CLR v2.0.50727) ...
Warning: Failed to load method token 69000401 from profile data.
Warning: Failed to load method token 69000402 from profile data.
Warning: Failed to load method token 69000403 from profile data.
Warning: Failed to load method token 69000404 from profile data.
Warning: Failed to load method token 69000401 from profile data.
Warning: Failed to load method token 69000402 from profile data.
Warning: Failed to load method token 69000403 from profile data.
Warning: Failed to load method token 69000404 from profile data.
Warning: Failed to load method token 69000401 from profile data.
Warning: Failed to load method token 69000402 from profile data.
Warning: Failed to load method token 69000403 from profile data.
Warning: Failed to load method token 69000404 from profile data.
System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Compiling assembly System.IdentityModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (CLR v2.0.50727) ...
System.IdentityModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Compiling assembly System.IdentityModel.Selectors, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (CLR v2.0.50727) ...
System.IdentityModel.Selectors, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Compiling assembly Microsoft.Transactions.Bridge, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (CLR v2.0.50727) ...
Microsoft.Transactions.Bridge, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

 

0
Viktor Zhivkov
Telerik team
answered on 22 Oct 2015, 03:48 PM
Hi Wolfgang,

Telerik.OpenAccess.ServiceHost.dll indeed references version 3.0.0.0 of System.ServiceModel assembly.
You should be able to control which version is loaded via assembly binding redirect in the configuration file of your project. This will help you target the correct version and ideally avoid the warnings.
Here is the configuration snippet that will instruct the CLR to use version 4.0.0.0 of the same assembly:
01.<?xml version="1.0" encoding="utf-8" ?>
02.<configuration>
03.  <!-- other configuration sections -->
04.  <runtime>
05.    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
06.      <dependentAssembly>
07.        <assemblyIdentity name="System.ServiceModel.dll"
08.          publicKeyToken="b77a5c561934e089"
09.          culture="en-us" />
10.        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="4.0.0.0" />
11.      </dependentAssembly>
12.    </assemblyBinding>
13.  </runtime>
14.</configuration>

You may want to add such redirects for all of the assemblies referenced in Telerik.OpenAccess.ServiceHost.dll to have full control over the process.

I am not familiar with the warning that you are experiencing and searching in Google was not very helpful either.
Can you please send us the complete NGEN command that you are executing together with the path that to the NGEN utility and your processor architecture?
Here is a link to an MSDN blog about troubleshooting NGEN issues that you might find useful.

Regards,
Viktor Zhivkov
Telerik
 
Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
Tags
General Discussions
Asked by
Wolfgang
Top achievements
Rank 1
Answers by
Wolfgang
Top achievements
Rank 1
Viktor Zhivkov
Telerik team
Share this question
or