IntelliSense not working for CSS files in .NET Core 3.1 Razor Class Library when accessed from referencing web applications

陌路散爱 提交于 2020-07-22 07:51:04

问题


I am creating a reusable UI utilizing a .NET Core 3.1 Razor Class Library (RCL) as documented here:

https://docs.microsoft.com/en-us/aspnet/core/razor-pages/ui-class?view=aspnetcore-3.1&tabs=visual-studio

I am able to create an RCL that includes static assets, and am able to utilize them as documented in the link above. By default, Visual Studio 2019 (16.5.1) only provides IntelliSense for the CSS/JavaScript files in the RCL project itself, not from any of the dependent projects. There is a previously answered question that shows how to create a JavaScript file in the dependent project (it mentions a CSS solution but does not provide the actual answer):

JS/CSS Intellisense Between Projects in VS 2019

Does anyone know how I can get VS2019 to provide CSS IntelliSense in the dependent projects? There is a sample solution here that illustrates the issue here:

https://github.com/shawnpaige/RCLIntellisense

Thanks for any insight.

来源:https://stackoverflow.com/questions/60893508/intellisense-not-working-for-css-files-in-net-core-3-1-razor-class-library-when

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!