Home > Net >  Reference to type 'IHtmlString' claims it is defined in 'System.Web', but it cou
Reference to type 'IHtmlString' claims it is defined in 'System.Web', but it cou

Time:01-20

I'm working on an ASP.NET application in Visual Studio 2022using NET 6 When i m rendering the script using " @Styles.Render("~/plugins/datetimepickerStyle") like this I am getting error " Reference to type 'IHtmlString' claims it is defined in 'System.Web', but it could not be found also i am not able to system.web dll .

I have tried to many times to build rebuild try to install packages.

CodePudding user response:

In .net6 we add css like below:

<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />

You can read this to know more.

  • Related