VSTS构建失败,MSB4184路径不是合法形式 [英] VSTS build fails with MSB4184 The path is not of a legal form

查看:167
本文介绍了VSTS构建失败,MSB4184路径不是合法形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用VSTS中的构建系统来构建和部署c#.net Web应用程序.我创建了一个新的单项目解决方案(因为似乎没有任何方法可以指定要在多项目解决方案中构建/部署的项目!?!),并设置构建定义以指向该新解决方案.我已将其设置为使用VS2017构建代理.

I'm attempting to use the build system in VSTS to build and deploy a c# .net web app. I've created a new single-project solution (as there doesn't seem to be any way to specify which project to build/deploy in a multi project solution!?!) and set up my build definition to point to this new solution. I've set it up to use the VS2017 build agent.

NuGet还原完成并开始构建,但失败,并显示以下错误:

The NuGet restore completes and it begins to build but fails with the error:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk.Publish\build\netstandard1.0\PublishTargets\Microsoft.NET.Sdk.Publish.MSDeployPackage.targets(124,7): Error MSB4184: The expression "[System.IO.Path]::GetDirectoryName('')" cannot be evaluated. The path is not of a legal form.

有人遇到过这个问题,知道如何解决吗? 谢谢

Has anyone encountered this and knows how to fix it? Thanks

推荐答案

改为使用.Net Core步骤/任务. (命令:发布;参数:--configuration $(BuildConfiguration)-输出$(build.artifactstagingdirectory))

Using .Net Core step/task instead. (Command: publish; Arguments: --configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory))

类似的问题: VSTS失败构建我真正非常简单的ASP.NET Core应用

这篇关于VSTS构建失败,MSB4184路径不是合法形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆