.net - Referenced dll - Does the dll filename matter? -


i want include versioning of dll names distribution purposes in own referenced assemblies. example mygreat.dll becomes mygreat.v2.dll .

the namespace in mygreat.dll versions (including mygreat.v.x.x.dll) mygreat.

in visual studio can add reference either of file names , builds without problem. using filename mygreat.dll referenced dll, vs works in debug mode.

when run vs in debug mode using mygreat.v.2.dll referenced dll error cannot find mygreat.dll or 1 of dependencies etc.

i can browse dll in visual studio object browser window using either named dll.

i have tried many combinations , possibilities can think of including "or 1 of dependencies" , clean project.

any ideas?

edit: fuslogvw results are:

*** assembly binder log entry  (24/07/2015 @ 6:20:12 pm) ***  operation failed. bind result: hr = 0x80070002. system cannot find file specified.  assembly manager loaded from:  c:\windows\microsoft.net\framework64\v4.0.30319\clr.dll running under executable  e:\my projects\myproject\bin\debug\myproject.vshost.exe --- detailed error log follows.   === pre-bind state information === log: displayname = myproject.resources, version=14.0.2.1, culture=en-gb, publickeytoken=d0c57861bf8e7fbf  (fully-specified) log: appbase = file:///e:/my projects/myproject/bin/debug/ log: initial privatepath = null log: dynamic base = null log: cache base = null log: appname = myproject.vshost.exe calling assembly : myproject, version=14.0.2.1, culture=neutral, publickeytoken=d0c57861bf8e7fbf. === log: bind starts in default load context. log: using application configuration file: e:\my projects\myproect\bin\debug\myproject.vshost.exe.config log: using host configuration file:  log: using machine configuration file c:\windows\microsoft.net\framework64\v4.0.30319\config\machine.config. log: post-policy reference: myproject.resources, version=14.0.2.1, culture=en-gb, publickeytoken=d0c57861bf8e7fbf log: same bind seen before, , failed hr = 0x80070002. err: unrecoverable error occurred during pre-download check (hr = 0x80070002). 

endedit

what trying not impossible, easy wrong however. note how looking @ wrong fuslogvw.exe trace. setting matters here project > properties > application tab in class library project:

enter image description here

the assembly name other projects use assembly embed in metadata. can see ildasm.exe, double-click manifest:

.assembly extern 'classlibrary1.v1.2.3.5' {   .ver 1:2:3:5 } 

anything else embed version number in file name, renaming file on disk, cause problem describe.

it very, important use solution project reference class library. if don't , use file reference changing assembly name break project uses class library, you'd have remove reference , add back.

re-inventing gac perhaps not best idea. note how tackles differently, have look-see @ c:\windows\microsoft.net\assembly explorer, stores assembly in folder has name depends on version number.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -