c# - Random assembly references fail ("Are you missing a using directive or an assembly reference?") -


my application has mixture of 3.5 , 4.0-targeted assemblies. i'm working on new windows service targeting 4.0 , project seems unable see of other assemblies in solution. meaning, on build, references these other assemblies produce following error:

the type or namespace name '[x]' not exist in namespace '[y]' (are missing assembly reference?)

if delete project reference , re-add it, red squigglies go away , intellisense kicks in again it's supposed to. of other projects in solution build without issue. but try build new project, errors come back.

one of failing references our core.dll, targets 3.5. added coreex.dll targeting 4.0, namespace sharing between assemblies. new service can see coreex.dll not core.dll... i.e., when begin typing using core.utilities... intellisense picks on smaller set of namespaces coreex.dll not show appear in core.dll. i'm pretty sure solution built after adding this, it's notable recent change.

another failing reference our core data.dll holds bunch of datasets , entity framework stuff. 1 migrated 4.0. again, i'm positive solution built after migrating project, it's worth mentioning.

the last failing reference assembly uses namespace 1 level "up" service. e.g., problematic project based out of namespace productname.component.componentservice , unable see project based out of namespace productname.component. 1 created along problematic project , targets 4.0.

as can see, there doesn't seem rhyme or reason assembly references failing... , problematic project can reference some of other assemblies in solution. i've tried cleaning, re-building, restarting visual studio... nothing has fixed permanently. causing this?

check target platform of new project , make sure it's not targeting .net 4 client profile. if is, change regular .net 4


Comments