ASP.NET MVC 2 Areas and AfterBuildCompiler

[亡魂溺海] 提交于 2019-12-23 04:43:17

问题


I am just trying out Areas in ASP.NET MVC 2 and I've hit a small issue.

I've added the appropriate lines to my project file:

 <Target Name="AfterBuild" DependsOnTargets="AfterBuildCompiler">
    <PropertyGroup>
      <AreasManifestDir>$(ProjectDir)\..\Manifests</AreasManifestDir>
    </PropertyGroup>
    <CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Child" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
  </Target>

But the problem I have is that I get the following error:

The target "AfterBuildCompiler" does not exist in the project.

I think I'm missing something obvious - any suggestions?


回答1:


When i got that error it was because the Microsoft.Web.Mvc.Build.dll was missing in C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 2\Assemblies

Don't know if it's the only problem though.



来源:https://stackoverflow.com/questions/2005018/asp-net-mvc-2-areas-and-afterbuildcompiler

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