- Feb 8, 2004
- 12,603
- 9
- 81
So i've started helping on a rather large .NET Webforms application. Its a bit old but not ancient, guy who originally wrote it is long gone. Anyway I have this problem where Visual Studio seems to "forget" a good chunk of references. Like it just can't find dependencies for some reason. The using statements at the top of classes, some of them have little red underlines despite the class existing and me being able to look at it.
The errors are typically like this:
"
Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name 'Provisioning' does not exist in the namespace 'MyProject.Namespace' (are you missing an assembly reference?) WebApplication
"
Quite often it's not the same thing though, it forgets different things sometimes. I have no fecking idea what triggers this either because it builds fine sometimes. Although every time this has happened it results in me having to get a fresh copy of the application from my data drive, because im completely unable to fix this.
I am using Visual Studio 2017. This application is pretty huge, it is made up of multiple projects and a webapplication bundled into a solution. The references it says are missing... I can see them, the classes are there! One of the senior devs mentioned that this application has circular dependencies. I don't know if that is relevant because I did try to fix this by removing and re-adding dependencies but it wouldn't let me due to it creating a "circular dependency". Makes me wonder how it ended up with circular dependencies in the first place but hey ho, I didn't write it.
Any idea's why it does this?
I have tried clean solution, rebuild solution. It still can't find a bunch of things that it did manage to find yesterday
tl;dr
Semi old and large webforms application loses its dependencies sometimes and becomes unbuildable. Once it does this I basically need a fresh copy because I have been unable to fix it when this happens. I think it has circular dependencies too. Any ideas how to make it build again?
The errors are typically like this:
"
Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name 'Provisioning' does not exist in the namespace 'MyProject.Namespace' (are you missing an assembly reference?) WebApplication
"
Quite often it's not the same thing though, it forgets different things sometimes. I have no fecking idea what triggers this either because it builds fine sometimes. Although every time this has happened it results in me having to get a fresh copy of the application from my data drive, because im completely unable to fix this.
I am using Visual Studio 2017. This application is pretty huge, it is made up of multiple projects and a webapplication bundled into a solution. The references it says are missing... I can see them, the classes are there! One of the senior devs mentioned that this application has circular dependencies. I don't know if that is relevant because I did try to fix this by removing and re-adding dependencies but it wouldn't let me due to it creating a "circular dependency". Makes me wonder how it ended up with circular dependencies in the first place but hey ho, I didn't write it.
Any idea's why it does this?
I have tried clean solution, rebuild solution. It still can't find a bunch of things that it did manage to find yesterday
tl;dr
Semi old and large webforms application loses its dependencies sometimes and becomes unbuildable. Once it does this I basically need a fresh copy because I have been unable to fix it when this happens. I think it has circular dependencies too. Any ideas how to make it build again?