Saturday, 15 March 2014

visual studio 2012 - Why is Shadow Task not Finding Referenced DLL? -



visual studio 2012 - Why is Shadow Task not Finding Referenced DLL? -

a unit test project migrated vs2010 still uses auto-generated private property accessors.

after many hours of coding , testing solution includes class library project, unit test project class library project, , web project, error manifests. web project executed under iis express.

error 24 not load file or assembly 'the.classlibrary, version=1.0.0.0, culture=neutral, publickeytoken=null' or 1 of dependencies. scheme cannot find file specified. the.classlibrary.tests

facts

the.classlibrary.tests has project reference the.classlibrary. there no other build errors (checked build output not errors window) the dll physically nowadays current timestamp in bin\debug i restarted iis express i restarted visual studio cleaned / rebuilt solution

option a

work around issue. may happen again.

in add-on steps tried, necessary search , delete all occurrences of the.classlibrary.dll on disk. so, total procedure is:

stop iis express exit visual studio 2012 search , delete all instances of "missing" dll. start visual studio 2012

i hope helps someone.

option b

fix issue properly

private accessors depreciated in vs2012. instead, create private things need visible unit test internal instead, , utilize internalsvisibleto attribute in assemblyinfo.cs of project beingness tested allow test project access internal properties, methods , fields of test subject.

assemblyinfo.cs (of myproject)

[assembly: internalsvisibleto("myns.myproject.tests")]

visual-studio-2012

No comments:

Post a Comment