Reputation: 8636
I am getting the following error when I am building the solution using continuous integration
[error]Apps\App.Service\App.Service.csproj(203,11):
Error MSB4226: The imported project "$(VSToolsPath)\Web\Microsoft.Web.Publishing.targets" was not found. Also, tried to find "$(VSToolsPath)\Web\Microsoft.Web.Publishing.targets" in the fallback search path(s) for $(VSToolsPath) - "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe.Config". Confirm that the path in the declaration is correct, and that the file exists on disk in one of the search paths.
When I check my .csproj
I have the following on top <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
so can some one tell me what was the issue
Upvotes: 3
Views: 4893
Reputation: 550
I had the same issue when trying to setup gitlab CI on my project. This answer https://stackoverflow.com/a/20095260/5873231 solved my problem. I leave it here, maybe it's useful for someone.
Upvotes: 2