HMR HMR - 1 month ago 18
ASP.NET (C#) Question

The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' Error?

I've downloaded a website and in VS express open it through file => open website. When I press F5 to debug I get builderrors:


The type or namespace name 'AspNet' does not exist in the namespace
'Microsoft'


I guess I'm missing a reference but how come it works on the server? References for these projects can be found in the bin directory right?

Under website => start options => build I've set the following: "Build web site" and target framework ".net framework 4" this is the same as the server.

I guess it's looking for a dll that contains Microsoft.aspNet wich probalby is in totallyUnrelatedName.dll in the folder scratchYourHeadAndLookSomeMore

Could someone help me out and give me a clue as to why Microsoft.aspNet would be missing from my computer?

I'm tempted to quit this job since all projects are web projects without any documentation that won't run locally but do need major changes. Client has no problem to implement changes on the live site but I do.

Answer

I guess I'm missing a reference but how come it works on the server? References for these projects can be found in the bin directory right?

Not if the used libraries are installed on the server. You might want to install them on your workstation too, or add the proper references (for example via NuGet) and do a bin-deploy.

On how to find out which libraries you're missing: find class names, not namespace names.

Comments