I have a class with the name of 'Report' declared like this without specific namespace its declared as global namespace.
using system;
//and other namespaces
public class Report
{
public string CheckIfReportAccess(string name)
{
//logic here
}
}
and I am using Report
Class method like this in webform pageload method.
global::Report report = new global::Report();
if (!report.CheckIfReportAccess("xxx"))
{
//logic here.
}
Issue is when I built solution an error occurred
ERROR: 'Report' does not contain a definition for 'CheckIfReportAccess' and no extension method 'CheckIfReportAccess' accepting a first argument of type 'Report' could be found (are you missing a using directive or an assembly reference?).
What I am doing now i just go into menu Build > Build Page
and rebuild solution. solution build and works.
but its a very big problem its time consuming there is hundred of reference of this class and every time i build solution its appear and then build page rebuild solution works.
I am using Visual Studio 2017.
Edit
Here is Build Order screenshot
I also checked build order dependencies.