Class name is invalid or already implemented in the selected source file

273 views Asked by At

I have a solution in VS2017 including 7 different C# or C++ projects. I add a new project to generate a dynamic link library (.dll) and then trying to create a new class in the newly created project using add option. But I get the following message:

"Class 'sampleProvider' is either invalid or already implemented in the selected source file."

Previously, I have defined a class with the same name in a project of the current solution, but then I have removed and deleted the project and all relevant references.

I checked the windows registry. There is no any entry, key or value in the windows registry with the same name. Also there is no any file in the windows file system with the same name.

But in my solution directory in a hidden folder named ".vs" in '...\.vs\MySolutionName\v14' there are two files named '.suo' and 'Browse.VC.db' which include few references to old class name. I know that '.suo' is a file includes 'Visual Studio Solution User Options' and 'Browse.VC.db' is IDE Database File. I am not pretty sure what happens if I delete these two files or all mentioned references from these two. Dose it possible to define my own class with my preferred name, afterwards?

Any help is appreciated in advance.

0

There are 0 answers