开发者

sn.exe failed on windows server 2008 r2 having both .NET 3.5 and .NET 4.0

"sn.exe -Vr *" failed due to this reason:

The application has failed to start because its side-by-side configuration is in correct. Please see the application event log or use the command-line sxstrace.e xe tool for more detail.

I tried to dig into more but got nowhere. My machine is windows server 2008 R2 with both .NET 3.5 and .NET 4.0 installed. .NET 3.5's sn.exe runs well. This is blocking for me because I have to make my .NET 4.0 dlls signed to use them, which may not be easy. How can I disable strong name validation for .NET 4.0 dlls on such machines? Thanks开发者_如何学编程.


From .NET 3.5 SP1 on strong-name validation is skipped by default when an assembly is loaded with FullTrust, e.g. from the local hard-drive (see http://msdn.microsoft.com/en-us/library/cc713694.aspx).

If the validation is not by-passed you can manually register an assembly in the Registry not to be validated under the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\My.Assembly.dll,12ba45fe33

or

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\*,12ba45fe33
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜