I’m trying to recreate a solution that had multiple projects in it (only the cs, aspx, etc, remain). When I create a blank solution and blank project files and start re-adding things, I receive the following compiler errors numerous times:
The type or namespace name ‘Activation’ could not be found (are you missing a using directive or an assembly reference?)
The Activation class is defined in a Activation.cs file that is in a sub folder to the cs file that is using it. I’ve added and included the files in the project…
The website currently works in production as is, so I’m wondering what type of reference I need…
The following is the structure
-
Solution
-
Project1
- FileUsingActivation.cs
-
Folder1
- Activation.cs (which contains the class being used in FileUsingActivation.cs that the compiler is complaining about
-
Edit 1: Just a note that Visual Studio can’t resolve the class name, meaning it currently has a squiggly line under the class1 : Activation (Activation portion). But the file is definately included in the project, it’s just under another sub folder… I mean I know it won’t compile because VS can’t resolve the name, but I’m wondering why….
Edit 2: If I add the file to the root of the project, the class name highlights blue, the squiggly goes away as does the error…. so I can’t keep the existing folder structure in the project for some reason????
long shot: check for compiler conditionals (like
#if some_condition/.../#endif);Your build configurations might have contained them.
Also, check that the build action is ‘compile’ for the build configuration that you’re trying to build.