This question is an extension of a another SO question here: How to use a Class from one C# project with another C# project
The most popular answer describes the process to add a reference to another project in the same solution. On following the steps I am able to get Microsoft's Intellisense suggestions for the changes in the other project, however on compiling I face the following error:
Error 112 'OtherNamespace.ClassObject' does not contain a definition for 'NewProperty' and no extension method 'NewProperty' accepting a first argument of type 'OtherNamespace.ClassObject' could be found (are you missing a using directive or an assembly reference?)
Any idea what is causing the conflict?
EDIT: Sample code:
public class ClassObject
{
public virtual int ExistingProperty
{
get;
set;
}
public virtual int NewProperty
{
get;
set;
}
public ClassObject()
{
}
}
I think it might be due to a different reference being used during compile than at the time of code editing. Because there are some weird issues like, if I change an existing property name all the references to it show errors at compile but the new property just doesn't work.
EDIT2: Adding pictures -
Before Compile:
After compile:
tbl_Scaling_Line
is ObjectClass
, SuratJalanCheck
is NewProperty