© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
12 replies
Cyan

namespace missing imports after copying class [Answered]

Hi guys, I am struggling with a problem for a few weeks.

So I have a ASP.NET Website project (Not web application) inside I have a folder called App_Code with many classes without namespaces inside. They magically reference each other without issues. Now I wish to copy a class to a folder outside of App_Code so for example New_Folder. I choose refactor and move the class to the New_Folder. What happens now is that every class inside App_Code can't find the class that I moved into New_Folder.

Only way I am able to reference the class inside New_Folder is by giving it a namespace and importing that in the classes inside App_Code. What's the issue? Well I have 100 classes inside App_Code and after copying it to New_Folder I have thousands of missing references.

Is there a way to copy classes out of app_code and keep the reference to the other classes in App_Code?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Copying from files [Answered]
C#CC# / help
4y ago
Some namespace and class questions..
C#CC# / help
4y ago
Deep copying data from class instances
C#CC# / help
16mo ago
Class with same name as namespace
C#CC# / help
2y ago