Razor HTML Helpers giving intellisense errors in Nop Commerce Plugin

前端 未结 3 689
心在旅途
心在旅途 2021-02-10 17:04

I am writing a plugin for Nop Commerce and my HTML helpers are giving me intellisense errors. I get red lines underlining them and the errors:

Feature \'extension method

3条回答
  •  野的像风
    2021-02-10 17:30

    The only way I was able to get this working (using VS2013) was to convert the Class Library projects into MVC projects:

    1. In , add < ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}< /ProjectTypeGuids>
    2. Add another import at the bottom: < Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v12.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />

      Of course remove the extra space in the < tags>, it wasnt posting correct without them. There is a current bug issued on this with Microsoft here: https://connect.microsoft.com/VisualStudio/feedback/details/912301/intellisense-for-razor-in-class-libraries-not-working

提交回复
热议问题