我在jenkins上通过msbuild.exe发布站点的时候,总是报以下错误:
“D:\Jenkins\workspace\master.ubtrip.dev.ssharing.com\SSharing.Ubtrip.UI\SSharing.Ubtrip.UI.csproj”(Rebuild 目标) (1) -> (AutoParameterizationWebConfigConnectionStringsCore 目标) -> C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(2276,5): error MSB4018: “ParameterizeTransformXml”任务意外失败。 [D:\Jenkins\workspace\master.ubtrip.dev.ssharing.com\SSharing.Ubtrip.UI\SSharing.Ubtrip.UI.csproj] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(2276,5): error MSB4018: System.UriFormatException: 无效的 URI: 此 URI 为空。 [D:\Jenkins\workspace\master.ubtrip.dev.ssharing.com\SSharing.Ubtrip.UI\SSharing.Ubtrip.UI.csproj] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(2276,5): error MSB4018: 在 System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) [D:\Jenkins\workspace\master.ubtrip.dev.ssharing.com\SSharing.Ubtrip.UI\SSharing.Ubtrip.UI.csproj] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(2276,5): error MSB4018: 在 System.Uri..ctor(String uriString) [D:\Jenkins\workspace\master.ubtrip.dev.ssharing.com\SSharing.Ubtrip.UI\SSharing.Ubtrip.UI.csproj] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(2276,5): error MSB4018: 在 Microsoft.Web.Publishing.Tasks.ParameterizeTransformXml.Execute() [D:\Jenkins\workspace\master.ubtrip.dev.ssharing.com\SSharing.Ubtrip.UI\SSharing.Ubtrip.UI.csproj] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(2276,5): error MSB4018: 在 Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\Jenkins\workspace\master.ubtrip.dev.ssharing.com\SSharing.Ubtrip.UI\SSharing.Ubtrip.UI.csproj] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(2276,5): error MSB4018: 在 Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() [D:\Jenkins\workspace\master.ubtrip.dev.ssharing.com\SSharing.Ubtrip.UI\SSharing.Ubtrip.UI.csproj]
这个怎么解决啊?
已经找到原因了,是因为web.config里边有空的节点,如下图。