MSBuild step in TeamCity considers app.config instead of web.config for ASP.NET WEB API project resulting in warning MSB3247

拥有回忆 提交于 2019-12-04 05:59:49

The issue is that Microsoft Web Developer Tools is not installed. MSBuild does not know how to handle the web.config files properly in such a case.

Possible solutions:

  1. Install Microsoft ASP.NET and Web Tools 2015 on the TeamCity server

  2. Copy those folders to the TeamCity server

    • c:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\WebApplications\
    • c:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\

    make sure that <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /> in the web csproj is correct.

The file Microsoft.WebApplication.targets references files in the Web folder, therefore, it must be in place as well.

Solution was harvested from here.

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