strongname

sn.exe fails with Access Denied error message

I get an Access is Denied error message when I use the strong name tool to create a new key to sign a .NET assembly. This works just fine on a Windows XP machine but it does not work on my Vista machine. PS C:\users\brian\Dev\Projects\BELib\BELib> sn -k keypair.snk Microsoft (R) .NET Framework Strong Name Utility Version 3.5.21022.8 ...

What is a .snk for?

Hi, What is a .snk file for? I know it stands for Strongly Named Key, but all explanations of what it is and how it works goes over my head. Is there any simple explanation on how a strongly named key is used and how it works? I'm using this in BizTalk server. ...

how do i create a strong named interop dll for shdocvw.dll

I have a Browser Helper Object project in c# that (obviously) references shdocvw.dll. I think I want to create a strongly named interop dll for shdocvw.dll. How do I do this - I've seen a bunch of suggestions out there with aximp.exe and tlimp but I'm not clear how they fit together. ...

Checking an assembly for a strong name

Is it possible to check if a, dynamically loaded, assembly has been signed with a specific strong name? Is it enough / secure to compare the values returned from AssemblyName.GetPublicKey() method? Assembly loaded = Assembly.LoadFile(path); byte[] evidenceKey = loaded.GetName().GetPublicKey(); if (evidenceKey != null) { by...

Can strong naming an assembly be used to verify the assembly author?

After reading the proper article in MSDN and related stackoverflow.com questions here, I finally return to the community. To which extent can a strong-named assembly be verified to avoid tampering? Is it possible to use strong-naming to verify an assembly author? The first question arises after reading this CSharp411 article, which ...

How to load only signed assembly to a new AppDomain?

I'm doing a addin system where the main app loads assemblies Addin1.dll and Addin2.dll on runtime in new AppDomain's. However, in case that Addin1.dll is signed (strong name) with my key and Addin2.dll is not, I want to be able to only load Addin1.dll and reject Addin2.dll. I'm suspecting that it needs to be done by setting some parame...

Do I need a new .snk keyfile for each version of a strong named library?

If I strong name a class library with a .snk file, do I need to replace this .snk file with a new if I create a new version of the same library? ...

.NET OpenSource projects and strong named assemblies?

I am currently thinking about open-sourcing a project of mine and am in the process of preparing the source code and project structure to be released to the public. Now I got one question: how should I handle the signature key for my assemblies? Should I create a new key for the open-source version and publish it along with the other fil...

How do you sign an assembly that was generated by an ILMerge operation?

I managed to use ILMerge to merge all the assemblies I have in my project into a single assembly, but the problem is there doesn't seem to be a way to sign the merged assembly. Is there some sort of command line option or command that I can run that would let me add a strong name to the merged assembly generated by ILMerge? ...

How to give a .net 1.1 dll a strong name in VS2003

I have a .net 1.1 dll I need to digitally sign for a legacy project. I have created a .snk file. What steps must I take in Visual Studio to apply the signature? Edit: Found this http://www.robrich.org/archive/2006/11/29.aspx ...

How do you programmatically (re)sign a .NET assembly with a strong name?

Aside from invoking the command line to add a strong name to an assembly, is there any APIs out there that let you resign an assembly once it has been stripped of its strong name? ...

Must Satellite Assembly versions match the base version?

I just ran into a situation where I needed to patch a release with a new version of one of our assemblies. All my assemblies are strong names and this is a Windows Forms application. I edited my App.config to do the appropriate re-mappings and all went fine until we tested our software with our localized version. The problem we saw is...

Deserialize object into assembly that is now signed and versioned

I used to serialize a treeview with the BinaryFormatter (c#). The Assembly that did just that and which contains the all the serializable classes has now a strong name and is signed and also got a new version number (however, implementation didn't change). When I try to deserialize the byte[] array, the line (TreeViewData)binaryFormatt...

Assembly Redirection not working as expected

I am trying to introduce Strong Signing in my project assemblies. My project output is persisted in XML and a type is mentioned (before signing) as: typestr="XYZ.PQR, MyWidget, Version=1.0.2406.20198, Culture=neutral, PublicKeyToken=null" After all the assemblies are signed with public-key with token, 622edca63ee1770c. I have introd...

Should interop assemblies be signed?

We have a set of COM components developed in VC++. When a reference to such component is added to a .NET project Visual Studio generates an interop assembly. We have a set of such assemblies now. While running our daily build we sign all the produced binaries with a digital signature. Interop assemblies are not signed since we don't fee...

How many .snk files do I need?

Say I have several .NET assemblies and want to sign each of them with a strong name. Is one keypair (one .snk file) enough or do I need to generate one pair for each assembly? Will I have to publish the public key of (each) keypair? ...

Do I need to publish the public key from .snk file?

From the description of sn.exe utility and this question I see that a copy of the public key is added to every assembly signed with the strong name. This is enough to validate that the assembly binary has not been altered. But how does one verify that given assembly was really signed with some given keypair and compiled by a given compa...

How can I tell my ASP.NET application to use any version of a strongly named assembly?

I have an ASP.NET application that uses a custom .NET library (a .DLL file). That .DLL file is strongly named. The library has frequent small updates, and I would like to be able to update this .DLL without recompiling the application. The application has to be precompiled because I do not want to give the source of it to my customers (n...

Where is the Wrapper Assembly Key File setting in VS 2008?

I'm trying to build an application that is strongly named. It is referencing a COM interop library that I add via the Add References dialog. It's been a while, but I seem to recall that in older versions of visual studio, there was a project setting for Wrapper Assembly Key File. I can't seem to find it in Visual Studio 2008? ...

What are strong named keys for?

In .NET, what are strong named keys for? I read about it before but it just isn't sticking in my head. ...