I have a weird visual studio error which is bugging me.
I am using Visual Studio 2010
My solution is small and contains 2 projects:
Project 1 a class library contains the following classes:
Project 2, a console application contains the following classes:
The WCF client sends objects to the service in the form of:
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Namespace1.DataClass))]
public class SendItem
{
public object Item { get; set; }
public string Label { get; set; }
}
(This is generated by svcutil, so I am paraphrsing to save space)
So, within my proxy class there is a reference to Namespace1.DataClass.
When building my application I first created the project to access the database, I then created my console app, I added a reference from my console app to my my class library and finally I generated my proxy and added it (un-edited) to the console app project.
Everything looks fine, no VS compile errors BEFORE building. Then, when I build, VS seems to forget the reference from my console app project to my class library project and I get a heap of compile errors accordingly.
If I exclude my proxy class from the project, VS can see the reference again. If I re-add the proxy everything is still fine (no errors and full intellisense support) but click build and everything goes haywire again.
Has anyone come across this issue before?
Cheers Shane
It was log4net, beware of this behavior in future.
Just to clarify, this problem had nothing to do with WCF as I though it did.