ASP.net project build and run successfully, but all the code shows errors and its not allowing to access any library. Any Ideas Please?
CodePudding user response:
The issue is due to installed nuget package libraries that targets different version of the .net framework of the project.
To solve the issue is check the target framework for each libraries then uninstall it and reinstall.
In my case forcing all libraries to uninstall and reinstall using the command Update-Package -reinstall
Didn’t work. I had to uninstall each one by one.
CodePudding user response:
The reason may be: The namespace set in views/web.config can directly use the type under the namespace set in the configuration file in the View template.
Try the following:
- Import System.Text (the namespace you need) in Views/web.config.
- Use the full type name in the view template.