Visual Studio 2013 C# Editor doesn't recognize my class
Hi I have 2 classes in a MVC 5 project with Visual Studio 2013 Update 4 like the following:
Class #1
using System.Collections.Generic;
namespace Model
{
public class OrderLine
{
public Product Product {get;set;}
....
....
}
}
My second file in the same project inside the same folder (Model):
namespace Model
{
public class Product
{
....
....
//some product class properties
}
}
My problem is that in my first class (OrderLine
) the Product
class appears in red and even that the project compiles perfectly I can't access the Product
properties such as this.Product.Name
the C# editor cannot find the properties.
As I mentioned the project compiles without problem it is just that the C# editor makes it hard to code because it doesn't recognize the class or properties.
I have try already repair visual studio and repair also the Update 4 without any luck.
Any ideas??
Thanks a lot in advance.
Hi turns out that I have found the solution for this; it was a Resharper issue which got fixed by following the solution from this post:
Link: ReSharper "can not resolve symbol" even when project builds
Solution:
VS -> Tools -> Options -> ReSharper Suspend button
Clear Contents of -> AppData\Local\JetBrains\ReSharper\v7.1\SolutionCaches
VS -> Tools -> Options -> ReSharper Resume button
IMPORTANT the folder of version of ReSharper might change according to your latest version.