I am using Visual Studio 2017 Enterprise, C# 4.7.2
My Solution contains currently nine different projects. A build succeeds without any error messages. When I run the application, a TypeLaodException is thrown, The Type Namespace.AClassName could not be loaded.
The weird thing is, that there isn't any class named AClassName anymore. BUT, the mentioned class did exist in a former version.
I cleaned the solution, startet a build, same error. I rebuilt the solution, same error. Cleaned than rebuilt the solution, same error.
Apparently, the build is not correct. But what can I do to ensure, that the build runs correctly?
If manually deleting the folders
bin
andobj
as suggested in the comments is not working, I will also delete de.vs
and there are a few things you can try:.csproj
for any reference to the Old-DeletedAClassName
. Check also that there is no namespace related to it.You will have to do it in the project where originally was the class, but I will recommend to search in all 9 projects.
AClassName
was.