Upgraded .net version from 5 to 6 getting namespace name 'Microsoft' could not be found error #14614
Unanswered
jayhouse-github
asked this question in
Q&A
Replies: 1 comment 3 replies
-
had the same problem, and in the end had to recreate a new .net 6 project and copy the stuff over, couldn't solve it :/ |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a solution consisting of the main project, a CMS website, a module and a theme. It's running on version 1.2.2 of Orchard and .Net 5 and I need to upgrade to .net 6 at least in order to then upgrade the version of Orchard Core.
The problem is as soon as I upgrade the .net version to version 6 the solution still builds but won't run. The homepage and the admin login page won't display. It looks one of the components in the view (I'm using MVC) can't find what it's looking for, the Microsoft and System namespaces. Here's the first of many errors: -
`The type or namespace name 'Microsoft' could not be found in the global namespace (are you missing an assembly reference?)
#pragma checksum "/Areas/OrchardCore.Contents/Views/Item/Display.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "10b62daf6f27fe1c0fa7f8fe65bd34f6e838f994"
//
#pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore._Areas_OrchardCore_Contents_Views_Item_Display), @"mvc.1.0.view", @"/Areas/OrchardCore.Contents/Views/Item/Display.cshtml")]
namespace AspNetCore
{
#line hidden
using System;
using System.Collections.Generic;
using System.Linq;`
I'm hoping the fix might be something simple but I'm totally stuck after trying for hours to fix it. Any ideas or help would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions