问题
I am setting up a new dev server, and moving some old projects to this. I opened up one of the older web projects. Setup the publish settings to use Web Deploy just like I have done for many projects. However, on this one I am getting the following error when clicking the preview.
Error 3 The "NormalizeServiceUrl" task was not given a value for the required parameter "ServiceUrl".
If I try to publish with out preview, I get an additional error.
Web Deploy publish/package validating error: Missing or Invalid property value for $(MsDeployServiceUrl)
I have looked all over and cant find help on the "NormalizeServiceUrl" error.
回答1:
I also had this error in Visual Studio 2013. It looks like the project wasn't upgraded properly from VS 2010. I changed this line:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
To (v10.0 => v12.0):
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v12.0\WebApplications\Microsoft.WebApplication.targets" />
回答2:
I found a post about a similar problem. This led me to open the vbproj file. I looked at a project of ours that looked fine.
It had these 3 lines in the vbproj file.
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
My project with the issue only had
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
I added the other 2 lines and this issue was resolved. I hope this helps anyone that comes across this.
来源:https://stackoverflow.com/questions/29626617/visual-studio-web-deploy-error-normalizeserviceurl