Visual Studio Web 部署错误 - “NormalizeServiceUrl"

问题描述:

我正在设置一个新的开发服务器,并将一些旧项目转移到此.我打开了一个较旧的网络项目.设置发布设置以使用 Web 部署,就像我为许多项目所做的那样.但是,在这一点上,单击预览时出现以下错误.

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.

错误 3 未为NormalizeServiceUrl"任务指定值必需参数ServiceUrl".

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 部署发布/包验证错误:缺失或无效$(MsDeployServiceUrl) 的属性值

Web Deploy publish/package validating error: Missing or Invalid property value for $(MsDeployServiceUrl)

我查看了所有内容,但找不到有关NormalizeServiceUrl"错误的帮助.

I have looked all over and cant find help on the "NormalizeServiceUrl" error.

我发现了一篇关于类似问题的帖子.这让我打开了 vbproj 文件.我看了我们的一个看起来不错的项目.

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.

它在 vbproj 文件中有这 3 行.

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" />

我的项目只有

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />

我添加了其他 2 行,此问题已解决.我希望这对遇到此问题的人有所帮助.

I added the other 2 lines and this issue was resolved. I hope this helps anyone that comes across this.