.Net assembly references being lost as soon as project is compiled

Posted by Truegilly on Stack Overflow See other posts from Stack Overflow or by Truegilly
Published on 2010-12-31T19:54:01Z Indexed on 2010/12/31 20:54 UTC
Read the original article Hit count: 310

I have a windows service project, one of many C# projects in a solution file. I add a reference to my "Data_objects" class library for my windows service.

this is added to the references no problem.

all the classes become available and I can begin to code. As soon a I compile the windows service it says

"The type or namespace name 'Data_Objects' could not be found (are you missing a using directive or an assembly reference?)"

yet in the solution explorer the reference is fine, no yellow exclamation mark.

I have to remove and add it again for it to pick it up, but then as soon as I compile it loses it.

This reference works fine in my two other web application projects.

what the hell is going on !!

Truegilly

Update

there are no naming conflicts the only bit of code I have is a using statement - eg

using Data_Objects.DataContext;

also this only happens with a windows service project, i just created a new web app project and it works fine.

© Stack Overflow or respective owner

Related posts about c#

Related posts about visual-studio-2010