Visual Studio doesnot show Designer because of a project referenced dll not loading correctly...


hi,

facing problem visual studio not showing form's designer. here situation:

have 1 vs2005 solution file, has 2 c# projects in (prj1 & prj2). prj2 start-up project , outputs exe, prj1 class library outputs dll.

prj1 referenced in prj2 .. in list of "references".. project reference (not file reference).

when build solution.. builds prj1 , builds prj2 without errors (build succeed no errors , warnings..). now, if try open windows form, doesnot open up.. instead throws standard message that,.. designer cannot opened because of dll loading problem... @ same time, throws following warnings in "warnings" window:

warning    1    system.io.filenotfoundexception: not load file or assembly 'prj1' or 1 of dependencies. system cannot find file specified.
file name: 'prj1'
[..... stack calls here...]
wrn: assembly binding logging turned off.
enable assembly bind failure logging, set registry value [hklm\software\microsoft\fusion!enablelog] (dword) 1.
note: there performance penalty associated assembly bind failure logging.
turn feature off, remove registry value [hklm\software\microsoft\fusion!enablelog].
        0    0   
warning    2    exception has been thrown target of invocation.        0    0


don't understand, why not able load prj1.dll. bad thing when able find dll building prj2.. why can't load same location while opening form designer..

can body me ?

regards,
ganyo

it sounds have dependency in prj1 not added prj2.  when create ref vs automatically detect child depends , add them well.  if add dependency after setting ref vs doesn't seem pick change.  can see if case either: a) dropping ref , adding back or b) looking in prj1 output directory see if there assemblies not in prj2's output directory.

out of curiousity app run if try debug it?  using third-party components? 

another possible cause if prj1 added copy local set false.  true non-gac assemblies can changed.  verify prj1 getting prj2 output directory.  note shouldn't hold designer sure.

if none of helps quick little check ensure synced in vs (you mentioned vs2005 assume using) is in order.  shut down vs, clean output directories, restart vs , rebuild see if things sync up.

michael taylor - 9/11/09
http://p3net.mvps.org


Archived Forums V  >  Visual C# IDE



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'