I just started a new project and was reorganizing the source structure including renaming namespaces. After changing a namespace from
CRTReadmissions.Web.Helpers
to
Crt.Readmissions.Web.Helpers
I get the error shown below when trying to launch the applicaiton indicating that it can't find the old namespace. Any help is greatly appreciated.
Things I've tried
Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'CRTReadmissions' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 26: using System.Web.Routing;
Line 27: using Cassette.Views;
Line 28: using CRTReadmissions.Web.Constants;
Line 29: using CRTReadmissions.Web.Helpers;
Line 30:
Source File: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\crtreadmission\203bedd5\1b724153\App_Web_login.cshtml.3f4b83a6.wbzlumh4.0.cs Line: 28
I solved the same problem by editing the web.config file in the Views folder. Just take a look at the namespaces tag. I hope this will help someone who faces the same issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With