c# - Strongly signed assemblies -


i not .net developer, there might basic things don't know.

i have experience coding in c#, have question. 1 of projects (a) references ptoject (b), "local copy" set. when b.dll in same location a.exe works. when b.dll put in common directory path doesn't work.

one of coworkers said thought should make b signed. correct? why 1 sign assembly?

i read bit in in internet saw security... if so, how 1 sign assembly , consequences have? please note using vs2003 .net 1.1.

edit: thank answers, links provided refer later versions of vs , .net have sort of signing tab in project properties. know (or give link )how name assembly in vs2003 .net1.1?

i think co-worker might referring "strong naming" assembly. strong naming enables deploy assembly gac.

once in gac, application using assembly can locate it. path's irrelevant , preferred way have shared assemblies deployed.

to strong name assembly, can use sn.exe tool comes visual studio generate strong name , sign assembly using keyfile generated via sn.exe.

edit : example of how use sn.exe strong name assembly here

also, think should understand how runtime loads assemblies. msdn

the runtime uses following steps resolve assembly reference:

determines correct assembly version examining applicable configuration files, including application configuration file, publisher policy file, , machine configuration file.

if configuration file located on remote machine, the
runtime must locate , download application configuration file first.

checks whether assembly name has been bound before and, if so, uses loaded assembly.

checks global assembly cache. if assembly found there, runtime uses assembly.

probes assembly using following steps: if configuration , publisher policy not affect original reference , if bind request created using assembly.loadfrom method, runtime checks location hints.

if codebase found in configuration files, runtime checks location. if probe fails, runtime determines binding request failed , no other probing occurs.

probes assembly using heuristics described in probing section. if assembly not found after probing, runtime requests windows installer provide assembly. acts install-on-demand feature.

note: there no version checking assemblies without strong names, nor runtime check in global assembly cache assemblies without strong names.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -