Last post May 23, 2021 04:56 PM by lesponce
May 22, 2021 11:58 PM|lesponce|LINK
I got a project that builds fine with no errors. However, I’m trying to resolve the warning errors. Here’s an example of one of the errors:
CS0618 - RazorPageAttribute is obsolete: This attribute has been superseded by RazorCompiledItem and will not be used by the runtime.
The error is related to the following line of code:
[assembly: Global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@”/Pages/About.cshtml”, typeof(MyProject.Pages.Pages_About), null)]
I tried removing the packages with version 2.2.0. For example, Microsoft.AspNetCore(2.2.0), but no luck. Also, the Frameworks in the project are the following:
Is there any way to change the Assembly:Global listed above to something else? Any recommendation is greatly appreciated.
May 23, 2021 03:54 PM|bruce (sqlwork.com)|LINK
You must have some unsupported nuget or project references in you upgraded project. Show your project file.
also did you do a clean first?
May 23, 2021 04:56 PM|lesponce|LINK
Yes, I did some cleanup, restored some of the nuget packages, I suppressed some of the errors in the project properties. I got it down to 0 warnings. I will continue testing the project. I'll open a new question if I need additional help Thank you!