Windows error 0x8013141A, -2146233318

Detailed Error Information

CORSEC_E_INVALID_STRONGNAME[1]

Message"Strong name validation failed."
Comment Strong name validation failed

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode19 (0x013)
NameFACILITY_URT[2][3]
DescriptionThe source of the error code is .NET CLR.[2][3]
Error Code5146 (0x141a)

Possible solutions

17

SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x8013141A)

visual-studio-2010
msbuild-4.0
sgen.exe

This problem is related to Strong Name Validation. Open your AssemblyX in Ildasm.exe(C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin). Note its PublicKeyToken, lets say pkt123 for an example. Now open VS Command prompt in administrator mode and run the sn.exe command. Such as:

sn -Vr *,pkt123

Build your solution again and everything should be fine by now.

But if not and you receive same error now also, then you need to run a different version of sn.exe. To locate that, go to Visual Studio command prompt.

c:\Program Files(x86)>dir /s sn.exe

It may take 5-10 seconds and should give a list of sn.exe files. Go to the path and execute the sn.exe, required or belongs to you, as shown above. If not sure which one to execute, execute all the sn.exe. That should and must solve your problem. If not, let me know and let me carry forward the RnD again.

answered on Stack Overflow Oct 22, 2012 by Sandy • edited May 24, 2017 by participant
13

Strong Name Validation Failed

c#
c++-cli
code-signing

You must use the 64-bit version of sn.exe on a 64-bit machine. (C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\sn.exe)

answered on Stack Overflow Oct 20, 2011 by Richard Hein
13

Strong Name Validation Failed

c#
c++-cli
code-signing

Open the command prompt as administrator and enter following commands:

reg DELETE "HKLM\Software\Microsoft\StrongName\Verification" /f
reg ADD "HKLM\Software\Microsoft\StrongName\Verification\*,*" /f
reg DELETE "HKLM\Software\Wow6432Node\Microsoft\StrongName\Verification" /f
reg ADD "HKLM\Software\Wow6432Node\Microsoft\StrongName\Verification\*,*" /f
answered on Stack Overflow Dec 7, 2015 by Butsaty • edited Dec 7, 2015 by Tunaki
10

System.BadImageFormatException: Could not load file or assembly or one of its dependencies

.net
64bit

The root cause to the problem is that I use the x64 platform to build the sln and to run test case with x86 test setting.

Just use the correct test setting platform to run test case:

  • Build platform should be same as the platform to run the test case.

Screenshot: enter image description here

answered on Stack Overflow Dec 19, 2013 by Amitabha
9

Strong Name Validation Failed

c#
c++-cli
code-signing

Open the command prompt as administrator and enter the following command:

"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\sn.exe" -Vr <dllpath>

Pay attention that the argument are case sensitive. Source with more details: http://blogs.msdn.com/b/keithmg/archive/2012/03/20/strong-name-validation-failed-exception-from-hresult-0x8013141a.aspx

answered on Stack Overflow Sep 12, 2013 by Adam Szabo
7

Error loading System.Management.Automation assembly

c#
wpf
powershell
assemblybinding

Finally I was able to fix my issue. This is what I does;
open my .csproj file
search for System.Management.Automation reference.
Replace that with the following <Reference Include="System.Management.Automation" />
These steps fixed my issue

answered on Stack Overflow Jul 4, 2013 by New Developer
7

Strong Name Validation Failed

c#
c++-cli
code-signing

Is the one the code runs on a "development" machine where you might have run "sn.exe -Vr AssemblyName.dll" at some stage which would allow you to use a delay signed assembly as if it were fully signed. When you transfer the delay signed assembly to another machine and run it, it will fail strong name validation because it is not fully signed.

answered on Stack Overflow Apr 24, 2009 by Colin Desmond
5

MSTest code coverage

code-coverage
mstest
vs-unit-testing-framework

I had the same problem, and the link below helped me...

http://weblogs.asp.net/soever/archive/2005/07/23/420338.aspx

VS.NET 2005: Code coverage for signed assemblies I am currently working on an application using VS.NET 2005, and because all the TDD tools like unit testing and code coverage are available I started to use them.

When I started code coverage on my signed application I got the following exception:

Test method X threw exception: System.IO.FileLoadException: Could not load file or assembly 'Y, Version=1.0.0.0, Culture=neutral, PublicKeyToken=Z' or one of its dependencies. HRESULT: 0x8013141A Strong name validation failed. ---> System.Security.SecurityException: Exception from HRESULT: 0x8013141A Strong name validation failed at X.

Not so strange if you think about it. Assembly is signed, code coverage needs code instrumentation, means modifications of the assembly, resulting in incorrect assembly so the validation failed.

Solution is to resign the assembly after instrumentation.

If you open the localtestrun.testrunconfig file (or something similar) in your solution items (double-click it), you can enable resigning in the Code Coverage section. This solves the problem.

answered on Stack Overflow Jul 19, 2010 by Tom Ax
5

Error using VS 2015 code analyzers

c#
visual-studio-2015
roslyn

Thank you for reporting this issue. The System.Runtime.* analyzer assemblies uploaded to nuget are indeed only test-signed, and hence cause the assembly load failures. We are working uploading newer nuget packages for System.Runtime.Analyzers and System.Runtime.InteropServices.Analyzers which will have signed assemblies.

Meanwhile, you can get the non System.Runtime based FXCop analyzers by installing "Microsoft.AnalyzerPowerPack" from here: https://www.nuget.org/packages/Microsoft.AnalyzerPowerPack/. These do contain all signed assemblies and should work fine.

I'll post an update on this thread once we have uploaded signed System.Runtime analyzer packages.

Sorry for the inconvenience and thanks again for reporting it!

Regards, Manish

answered on Stack Overflow Jul 22, 2015 by Manish Vasani
4

SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x8013141A)

visual-studio-2010
msbuild-4.0
sgen.exe

Since I'm not able to comment on the only answer to this I wanted to make sure that other users that came upon this answer as I did do not make the same mistakes other may have. According to the MSDN documentation for the strong naming utility, using the Vr(signature skipping) switch can cause malicious assemblies to load and should only be used in DEVELOPMENT not deployment.

http://msdn.microsoft.com/en-us/library/k5b5tt23(v=vs.80).aspx

answered on Stack Overflow May 13, 2013 by mW00t
4

MSTest code coverage

code-coverage
mstest
vs-unit-testing-framework

It is also possible to simply disable all signed assembly checking on a particular machine by executing:

sn.exe -Vr *

Use with care, however, as this opens a security vulnerability. We use this on our internal virtual machine that measures coverage for us. Take a look at the usage for sn.exe as it is possible to narrow the scope of that command.

answered on Stack Overflow May 10, 2011 by Paul
4

Error building a Release version when referencing a Web Service

xamarin.android

I can't figure out why this is happening, but you can workaround it by going to the Build tab of your project properties and turning off "Generate serialization assembly".

answered on Stack Overflow Apr 26, 2011 by jpobst
3

Strong Name Validation Failed

c#
c++-cli
code-signing

You might be able to bypass this on development by going into the project settings -> Signing -> and unchecking "Sign the assembly".

I ran into this today while debugging against a source code copy of the Entity Framework.

answered on Stack Overflow Nov 15, 2013 by jocull
3

Strong Name Validation Failed

c#
c++-cli
code-signing

In my case, I had the same issue with Visual Studio 2015 and I already had signed the assembly.

I fixed it by this way: Right click on the project which causes the issue -> "Properties" -> "Build" -> Change the value of the "Platform target" field.

I had to change it from Any CPU to x86 but I guess that in function of the project and the library which is failing, you should change its value to x64.

answered on Stack Overflow Apr 5, 2016 by christiansr85
3

Connect to MySQL Db in Visual Studio 2017 with F#

mysql
database
f#
visual-studio-2017

SqlDataProvider is a type provider, which means that it contains code that runs at compile time so that it can generate types for you to use at compile time. All parameters to type providers have to be constants that are known at compile time. This is why resPath needs to be a "literal" (effectively the same thing as a compile time constant).

__SOURCE_DIRECTORY__ doesn't have a trailing backslash so you need to add that:

let [<Literal>] resPath = __SOURCE_DIRECTORY__ + @"\..\packages\MySql.Data.8.0.8-dmr\lib\net452"

With this in place I was able to reproduce your Strong name validation failed error. Switching to v6.9.9 (marked as the current version) of MySql.Data fixed that for me.

answered on Stack Overflow Sep 19, 2017 by TheQuickBrownFox
3

Strong name validation failed for application

c#
dll

You can remove the strong reference to the assembly in your app.confg by changing

System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

to

System.Management.Automation

But I would suggest getting more information about exactly what is wrong, using Fuslogvw (which can be copied onto your destination server, along with a support dll).

This will show you exactly where the application is probing for dll's and what is causing the issue. Maybe you have another dll you need to add to your bin folder, or maybe the GAC is winning out on another dll.

answered on Stack Overflow Dec 1, 2014 by bigtlb
3

Crystal Reports are not working in Visual Studio 2010

c#
.net
visual-studio-2010
c#-4.0
crystal-reports
  1. Place this code in your app.config

    <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.2"/>
    </startup>
    
  2. If it would not work then download Crystal Report Runtime from this link http://downloads.businessobjects.com/akdlm/crnetruntime/clickonce/CRRuntime_32bit_13_0_1.msi

  3. If again Crystal Report create some problem then right click on your project, open Properties, open Debug tab and check option Enable Unmanaged code debugging.

answered on Stack Overflow Jan 2, 2012 by Mujassir Nasir • edited Nov 9, 2015 by haraman
3

Strong name validation failure on Import-Module

.net
strongname
sn.exe
import-module

Your assembly is probably either delay signed or test key signed, and it looks like PowerShell only allows fully-signed assemblies to be loaded (i.e. it ignores the skip verification setting). This would explain why sn.exe says the assembly has a valid strong name signature when it technically doesn't. (You can find out if the assembly actually has a valid signature, even if it's registered for verification skipping, by running sn -vf instead of sn -v).

I think the major source of your confusion stems from a mistaken assumption about how verification skipping works. Registering an assembly for verification skipping is not a guarantee that the assembly's strong name signature will never be verified. Verification skipping is specifically intended to allow delay signed and test key signed assemblies to work seamlessly in situations like these, but nothing is stopping someone (like PowerShell) from overriding it and forcing verification anyway.

answered on Stack Overflow Oct 1, 2010 by hbw
3

A solution that uses EntityFramework source projects instead its assemblies, could not start successfully

c#
entity-framework
configuration
.net-4.0
app-config

The Entity Framework source code is configured to produce delay-signed assemblies (which means they're marked as "should be signed in the future with the official key"). The official instructions at Entity Framework's GitHub page show how to disable strong name validation (run the EnableSkipStrongNames task: build /t:EnableSkipStrongNames), so that you can use the delay-signed assemblies without anyone having to release their private key. This is sufficient for development systems.

If you intend to release a product relying on your custom-built modified Entity Framework DLLs, you should generate a new key, and modify the EF source code to use that new key.

answered on Stack Overflow Oct 20, 2014 by hvd • edited Oct 30, 2016 by hvd
2

Unable to Install SQL Server on Server 2012

windows-server-2012
sql-server-2012

I figured it out--portions of the install need .NET 3.5 which is not standard on Server 2012. To enable this on Server 2012, you need to put the 2012 disk in, and type the following command in the shell prompt:

dism /online /enable-feature /featurename:NetFX3 /all /Source:d:\sources\sxs /LimitAccess

Found the solution here. Also, reviewed the pre-reqs again at Microsoft's KB2681562.

answered on Server Fault Oct 18, 2013 by Jeff
2

Strong Name Validation Failed

c#
c++-cli
code-signing

I encountered this today and stumbled across http://timgeerts.blogspot.co.uk/2009/08/strong-name-validation-failed.html, which seems to be the solution.

Option 1) Turn off code coverage (in VS 2010, go to Test Settings -› Data and Diagnostics -› Untick the "Enabled" box next to Code Coverage).

Option 2) Add the signing key file to the code coverage configuration (in VS 2010, go to Test Settings -› Data and Diagnostics -› select Code Coverage and click on "Configure" at the top. This corresponds to the "keyFile" attribute for the CodeCoverage tag in the .testsettings file.)

In VS 2012, code coverage is enabled by default. It can be disabled through a .runsettings file with an appropriate exclusion. See http://msdn.microsoft.com/en-us/library/jj159530.aspx for more information and a sample file. For option 2, although there doesn't seem to be an explicit setting available in the .runsettings file, the right thing seems to happen automatically with regard to signing (YMMV). However, if you're referencing a VS 2010 .testsettings file then it will need editing as above.

answered on Stack Overflow Feb 27, 2014 by jo.p.kennedy
2

Strong Name Validation Failed

c#
c++-cli
code-signing

The SN.EXE is Missing in Newer versions of Visual Studio. In Visual studio 2012, we must use "Developer command prompt for Visual studio 2012". Then Run the command "sn".

Syntax: sn -Vr *,2d58152b8e842be2

where "2d58152b8e842be2" is the public key token shown in the Error message. Somehow this alone did not solve my problem.

answered on Stack Overflow Jan 14, 2015 by Vishnu Prasanth
2

Crystal Reports are not working in Visual Studio 2010

c#
.net
visual-studio-2010
c#-4.0
crystal-reports

If you are running .Net 4 in VS2010, then you may need to add the following to your .config file (configuration section):

<startup useLegacyV2RuntimeActivationPolicy="true">
  <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>

If this doesn't work, then you need to upgrade to Crystal Report for VS2010 from this link.

answered on Stack Overflow Jan 2, 2012 by competent_tech
2

I have fork class ServiceBusTriggerAttribute to public and removed sealed - getting exception

c#
azure
azure-webjobs
azure-webjobssdk

This question was already asked and discussed in a duplicate post here: getting exception after webjob sdk code fork for public class ServiceBusTriggerAttribute

answered on Stack Overflow Nov 3, 2015 by mathewc • edited May 23, 2017 by Community
2

getting exception after webjob sdk code fork for public class ServiceBusTriggerAttribute

c#
.net
azure
azure-webjobs
azure-webjobssdk

This issue was recently discussed in the public repo here. I don't think trying to subclass the attribute is the way to go. I suggested some alternatives in the github issue. You're getting the above exception because all the WebJobs SDK assemblies are delay signed (in project settings). They need to be fully signed for use.

answered on Stack Overflow Nov 2, 2015 by mathewc
1

sgen TypeLoadException in Visual Studio for Mac when trying to build Xamarin.iOS app

ios
xamarin
visual-studio-2015
xamarin.ios
visual-studio-for-mac

So, it seems that Visual Studio for Mac doesn't understand the csproj/msbuild flag:

<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>

And sgen is the thing that won't let me get on with my work day. So let's replace sgen with our own version that does nothing!

sgen is located on my Mac at:

/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/4.5

I made a simple .NET console app in VS4mac that does nothing, and copied it to that dir, replacing the original sgen.exe

I can now compile my assembly, resulting in a warm feeling of bliss marred only slightly by the worry that I've done something I probably shouldn't have.

If anyone knows how to fix this properly, I'd be much obliged.

answered on Stack Overflow Jun 6, 2017 by Matt Jacobsen
1

sgen TypeLoadException in Visual Studio for Mac when trying to build Xamarin.iOS app

ios
xamarin
visual-studio-2015
xamarin.ios
visual-studio-for-mac

That helped me figure out what's going on. This is a msbuild vs xbuild bug:

xbuild WebServicesNotWorking.sln /p:Configuration=Release (Works)
msbuild WebServicesNotWorking.sln /p:Configuration=Release (Your error).

Resolution:

  1. Use XS instead of VSfM
  2. Uncheck Preferences -> Projects -> Build -> Build with MSBuild instead of xbuild (I don't recommend this as it may affect other things)
  3. Build the project with xbuild and check in the output for now.
answered on Stack Overflow Oct 9, 2017 by Mayank Kumar • edited Oct 9, 2017 by Yaseen Ahmad
1

SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x8013141A)

visual-studio-2010
msbuild-4.0
sgen.exe

In my case the reason was that the native library was built to different folder then the rest of application.

answered on Stack Overflow Dec 13, 2014 by qub1n
1

SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x8013141A)

visual-studio-2010
msbuild-4.0
sgen.exe

Open cmd.

Cd  "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin"   

Run:

sn –Vr **AssemblingX** name (without dll extension), **PublicKeyToken**

(the code)

Rebuild the solution. And it should be solved.

answered on Stack Overflow Nov 18, 2015 by user2190799 • edited Nov 18, 2015 by Kumar Saurabh
1

Office 2003 and extensibility.dll deployment blues

c#
vsto
office-addins

If your outlook add-in is signed using a strong name key then any external libs that you reference will also need to be strong name signed.

I've had a similar problem to yours in the past where 3rd party libraries were not signed with a strong name.

answered on Stack Overflow Aug 15, 2012 by Jamie Dixon
1

Office 2003 and extensibility.dll deployment blues

c#
vsto
office-addins

After doing a bit of searching around I came across this Microsoft Support article that provides a resolution.

In brief:

When you use Microsoft Visual Studio 2005 to create add-ins, smart documents, or smart tags, you may experience the following symptoms:

  • The add-ins, the smart documents, or the smart tags cannot be loaded in any Microsoft Office application.
  • The add-ins, the smart documents, or the smart tags do not run in any version of Microsoft Office.

and their resolution:

To resolve this problem for Visual Studio 2005 developers, a redistributable version of the update for Visual Studio 2005 is available.

answered on Stack Overflow Aug 15, 2012 by Jamie Dixon
1

Could not load file or assembly while configuring Build vNext Agent

tfs
build
team-build
ctp
tfs2015

Did you "unlock" the .zip file before unpacking it?

On some OS's, specifically Windows 10, I had to right click on the downloaded zip and click "unlock" before unpacking.

If you then run the .\ConfigureAgent.ps1 it should work.

1

Remote execution of Coded UI Tests on a Windows XP VM

automated-tests
mstest
ui-automation
coded-ui-tests
specflow

Isolation of Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.dll from c:\Program Files\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages\ solved the problem. Action was performed on the remote VM.

The tests are up and running.

answered on Stack Overflow Nov 8, 2013 by LeeWay
1

How to create .snk file for Mono android

monodevelop
snk

I got a solution for this issue.

You just have to do is, put the mono.android.dll in to the C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin folder, open a command prompt and do following steps:

  1. cd C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin

  2. sn -Vr Mono.Android.dll

  3. gacutil -i C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin

Then build the project.

If you get the error for another DLL like System.xml.dll etc. then repeat above procedure for respective DLL.

All the best.......!

answered on Stack Overflow Jan 7, 2013 by Rash • edited Jan 24, 2014 by Wolfgang Schreurs
1

Issues with RESX files on VS2010 targeting 3.5 framework

visual-studio-2010
msbuild
resx
windows-7-x64

The issue we experienced was also with the ImageList inside the *.resx file (opened in code, not the designer):

<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
    <value>
        [bunch of binary data here]
    </value>
</data>

We confirmed this was by only deleting the <data /> tag related to the ImageList (see above) and then deleting the references in the control's designer:

//initialize
this.imageListSuperHeroes = new System.Windows.Forms.ImageList(this.components);

//control that references the ImageList
this.btnAwesome.ImageKey = "superman.gif";
this.btnAwesome.ImageList = this.imageListSuperHeroes;

Add the image references (use individual images!) of the control from the "Project resource file", rather than the "Local resource" and update the references you removed from your forms.

this.btnAwesome.Image = global::PMPPlus.Properties.Resources.Superman;

That fixed it for us and hopefully this helps move you in the right direction. If not, dig around the *.resx to see which bad <data /> is screwing you up.

Related link: http://connect.microsoft.com/VisualStudio/feedback/details/566131/error-in-resx-file-when-adding-imagelist

They suggested some workarounds that didn't fit our needs:

  • Target another platform and framework
  • Use corflags to screw with your C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bin directory!

Our Setup

  • Old Environment: Windows XP 32-bit
  • New Environment: Windows 7 64-bit
  • Common Setup: VS2010 + Target Framework: 3.5 + Target Platform: x86
answered on Stack Overflow Sep 1, 2011 by thomasnguyencom
1

I am unable to make application release in monodroid

android
xamarin.android
web-reference

I was able to solve this problem doing the following:

  • Added a new project to my solution
  • Added my web reference to this new project
  • Deleted my web reference from my original project
  • Added a reference to the new project on the original project
  • Used new project web reference namespace to refer to my web reference

On this way, putting the web reference in a project that doesn't reference Mono.Android itself the application was able to release with no problems

answered on Stack Overflow Sep 3, 2012 by Max Rasguido
1

Word 2003 add in load failure

installation
add-in
word-2003

The next step is to try to sign the assembly as a strong named one, microsoft provides a guide to do so at this webpage: http://msdn.microsoft.com/en-us/library/xc31ft41.aspx . After you create your keys and successfully complete the procedure you can see if the error still occurs. On a development environment a lot of dll's, assemblies, and protection setting are changed to allow you to execute and debug code. You would need to install a version of the addon with debug symbols and something like the Debugging Tools for Windows for native code or MDbg or coredbg( Lightweight .NET debugger? ) to see what is going on on your reference machine.

answered on Stack Overflow Aug 3, 2012 by gmlime • edited May 23, 2017 by Community
1

Error building a Release version when referencing a Web Service

xamarin.android

Generate serialization assembly prevented you from building.

I got the NameResolutionFailure when selecting Release target because i didn't set the INTERNET permission in the application's options:

  1. right click your project
  2. select options
  3. select the left item "Mono for Android Application"
  4. set Required Permissions: "INTERNET" by checking the checkmark next to it.

It seems that this is active for debug builds since it's used to connect the debugger to the application.

You have to set this yourself in the Release build configuration.

answered on Stack Overflow May 31, 2012 by EeKay
1

C# Aspose.Cells.dll installation error

c#
.net
aspose-cells

It looks like this is a signing issue. Aspose.Cells is a strong-named assembly, the error you're getting here means the CLR in the test machine is unable to find corresponding public key to verify the .dll's signature. It looks like you'll need to resign the assembly.

Previous post with a similar problem.

answered on Stack Overflow May 24, 2012 by Morrison • edited May 23, 2017 by Community
1

Using a WINMD library causes a Strong Name Validation exception

c#
.net
code-signing
windows-runtime
strongname

If you're getting a strong name validation error on a winmd file, it's typically because you're using a toolset that doesn't understand the .winmd file format.

.winmd files cannot be strong name signed.

In this case, it's possible that the problem is caused because you're trying to strong name sign a component library - C# component libraries produce hybrid .winmd files that contain both windows metadata and C# IL.

Why are you trying to strong name sign your component? Strong name signing is mostly used when putting assemblies into the GAC and .winmd files cannot be inserted into the GAC.

answered on Stack Overflow May 15, 2012 by Larry Osterman
0

System.BadImageFormatException: Could not load file or assembly or one of its dependencies

.net
64bit

In VS2010, it should be

Test - Edit Test Settings - Local - Hosts

also, you need to check Build - Configuration Manager

answered on Stack Overflow Jun 27, 2014 by Eric Wang • edited Jun 27, 2014 by Eric Wang
0

Unable to Install SQL Server on Server 2012

windows-server-2012
sql-server-2012

Got almost the same error. Was not able to get the SQL installation wizard going, just a error: "managed sql server installer has stopped working" + CLR20r3 + filenotfoundexception. Tried on other Win2012r2 installations, new vanilla install and new install with updates with no success. Solution: Removed windows updates kb2966826-27-28 and then it worked. Link: https://support.microsoft.com/en-us/help/3002547/you-cannot-enable-the-microsoft--net-framework-3-5-feature-on-windows My god - this was not awesome.

answered on Server Fault Jan 22, 2018 by Dirch
0

Strong Name Validation Failed

c#
c++-cli
code-signing

I am working with VS.Net Ultimate 2012

and this solution helped me:

Right click on Project-> properties-> Build Tab-> switch Generate serialization assembly to off-> done

answered on Stack Overflow Nov 26, 2014 by Fery
0

Strong Name Validation Failed

c#
c++-cli
code-signing

I fixed this by going to the Build menu (top pane) and say "Rebuild xxxProject.plugin" for that specific project only, contrary to building the entire solution.

answered on Stack Overflow May 8, 2017 by ToFo
0

Strong Name Validation Failed

c#
c++-cli
code-signing

Right-click on Project → Properties → Build tab → Platform Target → Select "x64"

answered on Stack Overflow Sep 13, 2017 by Ayslan • edited Sep 13, 2017 by Cody Gray
0

.net Could not load file or assembly MySql.Data. Strong name validation failed (0x8013141A)

c#
mysql
.net

Have you tried signing the project(s)? That may remove your error.

Maybe this link about your error will help: https://blogs.msdn.microsoft.com/keithmg/2012/03/20/strong-name-validation-failed-exception-from-hresult-0x8013141a/

or this stackoverflow question: Strong Name Validation Failed

answered on Stack Overflow Aug 19, 2017 by Anthony McGrath
0

A solution that uses EntityFramework source projects instead its assemblies, could not start successfully

c#
entity-framework
configuration
.net-4.0
app-config

You can right click the project in Visual Studio solution explorer, and Signing on the left and uncheck sign assembly. In your web config you will also need to remove the public key token.

answered on Stack Overflow Jul 4, 2017 by Alexander Higgins
0

SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x8013141A)

visual-studio-2010
msbuild-4.0
sgen.exe

if still not resolved you have to delete or set AllowStrongNameBypass (DWORD) to "1" in the key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework

On 64-bit computers,

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework

and

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework
answered on Stack Overflow Aug 24, 2013 by ewwink
0

Strong name validation failed for application

c#
dll

I think the problem is that the way I did it works only on windows 8 since it has a newer version of this dll. To make it run on windows 7:

  • modified csproj file to have the reference like so:

< Reference Include="System.Management.Automation" />

  • changed the authentication code to this

    SecureString securePwd = new SecureString(); pass.ToCharArray().ToList().ForEach(p => securePwd.AppendChar(p)); PSCredential credentials = new PSCredential(username, securePwd); string shellUri = "http://schemas.microsoft.com/powershell/Microsoft.PowerShell"; WSManConnectionInfo connectionInfo = new WSManConnectionInfo(false, host, 5985, "/wsman", shellUri, credentials, 100000);// timeout is in miliseconds

answered on Stack Overflow Dec 1, 2014 by max
0

Strong name validation failed for application

c#
dll

[Use this solution if you have problems during Testing binaries] I have the same problem as the author. I removed the strong name on the system.management.automation.dll using snremove.exe

snremove -r .\system.management.automation.dll (And remove strong name for all your binaries being used for testing.) http://www.nirsoft.net/dot_net_tools/strong_name_remove.html

It works well now. I do this only because I didnt want to check in my binaries before testing. Once checked in, my binaries are signed by the build and I dont have to worry about strong naming.

answered on Stack Overflow Feb 17, 2017 by AdmiralThrawn • edited Feb 17, 2017 by AdmiralThrawn
0

Is Wix Custom Action project can be signed?

wix
windows-installer
.net-4.6
wix3.10

Start by reading this background on how DTF works:

http://blog.deploymentengineering.com/2008/05/deployment-tools-foundation-dtf-custom.html

When you rename your wrapped CA DLL to .zip and look at it's contents you are likely not going to see your signed DLLs in there.

It's been awhile since I did this but I think it has to do with SfxCA's default build behavior with regard to trying to decide what it should and shouldn't pack. (Say you DLL yes, some other DLL yes, system.dll no ) and I think it takes code signing into consideration. Toggle the CopyLocal (true|false) flag on your reference and rebuild / reexamine using the zip technique.

answered on Stack Overflow Jan 27, 2017 by Christopher Painter
0

Assembly run failed on SQL Server, strong name validation failed exception

.net
sql-server
rabbitmq

I was able to solve this, I had downloaded the assembly from nuget, it turns out I had to directly download the dll from their site which turns out to be strongly named.

answered on Stack Overflow Aug 26, 2016 by Luis Becerril
0

Office 2003 and extensibility.dll deployment blues

c#
vsto
office-addins

Found Extensibility.dll in

\Visual Studio Tools for Office\PIA\Common

folder. Copied it to the project folder.

I have VSTO 2010. Added the reference to my project, and the compile error went away. Same version on the error: 7.0.3300.0. VSTO is distributed freely by Microsoft for developers, to create solutions for Microsoft Office, but the license document enclosed with VSTO 2010 doesn't allow you to make copies of it except for your own use. That being said, I would pester Microsoft about the dll, as obviously you need it for your project. Obviously, they should have added a clause to the license to allow distribution of the dll by developers.

answered on Stack Overflow Jul 27, 2016 by Odysseus Ithaca • edited Jul 27, 2016 by Odysseus Ithaca
0

tlbimp.exe generated assembly fails to be registered using regasm.exe

c#
c++
com

After looking through the post suggested by @Mangist, I recognized that the issue was a combination of registry location, and misunderstanding tlbimp.exe 's delaysign flag. This also helped. https://msdn.microsoft.com/en-us/library/aa302324.aspx

First, as my app is a x86 application and most of the libraries are x86, using the x64 command prompts is a bad idea, as any tool that affects the registry will write to the HKLM\Software location. Since these are x86 assemblies, any registry entries regarding them need to be written to the HKLM\Software\Wow6432Node location. This mistake was triggered by what I found regarding tlbimp.exe, as when I was using the x86 command line tools, I was still getting the regasm error, prompting me to attempt the build using the x64 command line tools, which of course also didn't work.

Tlbimp.exe indeed does have an option to delay sign an assembly, and it will do exactly that, but delay signing an assembly DOES NOT AUTOMATICALLY REGISTER THE ASSEMBLY FOR VERIFICATION SKIPPING. Registering an assembly for verification skipping requires use of the sn.exe command with the -Vr option. This adds an entry to the HKLM\Software\Wow6432Node\Microsoft\StrongName\Verification registry key when using the 32 bit sn.exe, and the HKLM\Software\Microsoft\StrongName\Verification registry key when using the 64 bit sn.exe.

It turns out that you can register a single assembly signed with a particular public key for verification skipping, or any assembly that uses a particular public key for verification skipping. A registry entry will be created looking like

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\*,58845dcd9090cc91]

Here * is a wildcard, and the hex number is the public key.

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\MyInteropDll.dll,58845dcd9090cc91]

This entry is an example of allowing only the MyInteropDll.dll assembly to be skipped from signing verification.

The solution for me then is to ensure that after I make the tlbimp /delaysign call to add a command that registers the assembly for verification skipping since that's not being done automatically.

C:\>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\sn.exe -Vr MyInteropDll.dll
answered on Stack Overflow Jul 14, 2016 by sbrett
0

MSTest code coverage

code-coverage
mstest
vs-unit-testing-framework

I am working with VS.Net Ultimate 2012

and this solution helped me:

Right click on Test Project-> properties-> Build Tab-> switch Generate serialization assembly to off-> done

answered on Stack Overflow Nov 26, 2014 by Fery
0

Crystal Reports are not working in Visual Studio 2010

c#
.net
visual-studio-2010
c#-4.0
crystal-reports

Add this code in app config

<startup useLegacyV2RuntimeActivationPolicy="true">  </startup> 
answered on Stack Overflow Jan 2, 2012 by Mujassir Nasir
0

Crystal Reports are not working in Visual Studio 2010

c#
.net
visual-studio-2010
c#-4.0
crystal-reports

If you have visual studio 2010 in your system then crystall report is not install because there is no any crystal report with visual studio 2010.for open the crystal or .rpt file install the sap crystal report 2010.It willl downloaded from sap object websit.

answered on Stack Overflow Jul 11, 2012 by MITHILESH
0

Getting Error While Debugging the Plugin in dynamics crm 2013

c#
dynamics-crm-2011
c#-3.0
dynamics-crm
dynamics-crm-2013

Can you check what version of Microsoft.Xrm.Sdk.Workflow library you have referenced in your project. According to the error message, CRM is looking for the Version=6.0.0.0.

answered on Stack Overflow Jul 21, 2014 by Scorpion
0

sgen TypeLoadException in Visual Studio for Mac when trying to build Xamarin.iOS app

ios
xamarin
visual-studio-2015
xamarin.ios
visual-studio-for-mac

This is a partial answer to your question, it provides the solution for your general problem (submitting to the App Store), but not the one that you have mentioned in the title of the question.

It is possible to use Visual Studio for Windows and to create the package to be submitted (and use Apple's Application Loader to submit it). You need to set the build configuration to Ad-Hoc (not Debug or Release), build platform to iPhone, set your certificates and click Rebuild All, then .ipa file will be generated on both your Windows and Mac and you can use it to submit it to the Store.

See more on Xamarin site https://developer.xamarin.com/guides/ios/deployment,_testing,_and_metrics/app_distribution/app-store-distribution/publishing_to_the_app_store/

answered on Stack Overflow Jun 6, 2017 by Ivan Ičin
0

Could not load file or assembly while configuring Build vNext Agent

tfs
build
team-build
ctp
tfs2015

After downloading the latest version of the VSoAgent.zip file the problem went away. It seems to have been fixed in a newer release of the Agent.

answered on Stack Overflow Mar 25, 2015 by Tjeerd
0

Cannot enable strong name verification skipping on Server 2012

c#
.net
windows

Self answer. Executable had a config file containing:

<NetFx40_LegacySecurityPolicy enabled="false"/>

It appears to take precedence...

0

Unable to execute Powershell from C# Application

c#
powershell-v3.0

Your code work fine on my PC. I'm not sure what the problem obviously. But here , here and here

They solve your problem

answered on Stack Overflow Jan 2, 2015 by Selçuk Güral • edited May 23, 2017 by Community
0

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

visual-studio-2010
opencl
strongname
windows64

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

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

visual-studio-2010
opencl
strongname
windows64

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

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

visual-studio-2010
opencl
strongname
windows64

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
0

Error in installing EntityframeworkwithheirarchyId6.0.2

entity-framework
entity-framework-6

This Package shows its unsigned so try to use another package but its unsatble version. https://www.nuget.org/packages/EntityFrameworkWithHierarchyId/6.1.0-pre1

answered on Stack Overflow Feb 11, 2014 by Cyrus Great
0

How to build Prism4.5 for WPF

c#
.net
wpf
dll
build-process

I think this has to do with assembly verification. Because you edited it, you need to re-sign it. Because you could have added evil code to the already-verified DLL. Check out this for disabling verification, but I don't think that is a long term solution.

answered on Stack Overflow Nov 25, 2013 by Will Custode
0

How to build Prism4.5 for WPF

c#
.net
wpf
dll
build-process

I've done this as we updated to using .NET 4.5 with Unity 3 and Prism. You need to re-sign UnityExtensions in order to use Unity 3.0.XXX.X

Here is a few easy steps that will get you through:

http://compositewpf.codeplex.com/discussions/443219

answered on Stack Overflow Nov 25, 2013 by Espen Medbø
0

running a 32 bit debug build dll in a win7 64 bit using C#

c#
32bit-64bit

Did you try searching for the error online? Here is the first hit I got for an MSDN blog with a workaround.

http://blogs.msdn.com/b/keithmg/archive/2012/03/20/strong-name-validation-failed-exception-from-hresult-0x8013141a.aspx

You may want to ask the third party to provide a fully signed DLL.

answered on Stack Overflow Aug 14, 2013 by BuDDhaPKT
0

running a 32 bit debug build dll in a win7 64 bit using C#

c#
32bit-64bit

Make sure that the Sensor.Data assembly is 32-bit.

If you have a 32-bit process, all the loaded DLLs and modules need to be 32-bit as well.

answered on Stack Overflow Aug 20, 2013 by josh poley
0

Monogame project won't compile release build

android
xamarin.android
monogame

There are many SO posts describing the same problem. Check out the following links:

answered on Stack Overflow Mar 12, 2013 by faceman • edited May 23, 2017 by Community
0

Showing an image in crystal report

vb.net
crystal-reports
datatable
dataset
barcode

If you are running .Net 4 in VS2010, then you may need to add the following to your .config file (configuration section):

<startup useLegacyV2RuntimeActivationPolicy="true">
  <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
answered on Stack Overflow Feb 13, 2013 by Sahar Kiyan
0

window phone 7 error

c#
windows-phone-7
compiler-errors
runtime-error

Best Answer of Carl Saldanha (read comments)

Need re-installation...

answered on Stack Overflow Dec 18, 2012 by a1204773
0

C# external library (Lua) call problem

c#
.net-4.0
lua
excel-2007
luainterface

SInce it appears to be signed, try to put Lua51 into the GAC and see if it works. Probably you can try even by putting Lua15.dll in the same path of excel.exe.

answered on Stack Overflow Jul 28, 2011 by Felice Pollano
0

C# external library (Lua) call problem

c#
.net-4.0
lua
excel-2007
luainterface

I've had lots of issues with .NET, LuaInterface, and Lua5.1 interracting on 64-bit machines. Lua5.1 only compiles 32-bit and this requires you to (I believe) build the LuaInterface project as 32-bit as well. Try changing "Project -> Properties -> Build -> Platform Target" to "x86" in your .NET projects.

answered on Stack Overflow Aug 1, 2011 by kyork
-1

Strong Name Validation Failed on CRM 2016 GeneratePicklistEnums

c#
sdk
dynamics-crm

There is an open source tool for the XrmToolbox called the Early Bound Generator from Daryl LaBar, which is just a wrapper on top of crmsvcutil from the SDK. Save yourself the trouble and use that tool, it has a lot of nice features baked in. Btw, with the latest versions of the toolbox, there is a plugin "store" so you don't even have to download the EBG manually anymore.

answered on Stack Overflow Jun 6, 2016 by Polshgiant

Comments

Leave a comment

(plain text only)

Sources

  1. https://github.com/dotnet/coreclr/blob/v1.1.0/src/inc/corerror.xml
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx
  3. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0