该字符串中的非法字符是什么?我收到 MSBUILD:错误 MSB3095

发布于 11-30 23:20 字数 2126 浏览 0 评论 0原文

到目前为止,我一直在 TFS2010 中创建一些构建定义,没有出现任何问题。

MSBUILD 命令:


C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe /nologo /noconsolelogger "C:\Builds\Neptune\Sources\\Branches\v5.0-Ehub\EHub-5.0 .sln"/m:1/fl /flp:"logfile=C:\Builds\Neptune\Sources\\Branches\v5.0-Ehub\EHub-5.0.log;编码=Unicode;verbosity=详细" /p:SkipInvalidConfigurations=true /p:OutDir=" C:\Builds\Neptune\Binaries\\" /p:Configuration="站点" /p:Platform="混合平台" /p:RunCodeAnalysis="False" /p:VCBuildOverride="C:\Builds\Neptune\Sources\\Branches\v5.0-Ehub\EHub-5.0.sln.Mixed Platforms.Site.vsprops" /dl:WorkflowCentralLogger, “C:\Program Files\Microsoft Team Foundation Server 2010\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Detailed;BuildUri=vstfs:///Build/Build/1222;InformationNodeId=2168680;目标sNotLogged=GetNativeManifest,GetCopyToOutputDirectoryItems,GetTargetPath;TFSUrl=http://ldu01:8080/tfs/Nova.com;"*WorkflowForwardingLogger,"C:\Program Files\Microsoft Team Foundation Server 2010\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Detailed;"

我收到此错误:


(站点目标) -> MSBUILD:错误 MSB3095:参数无效。路径中存在非法字符。 [C:\Builds\Neptune\Sources\Branches\v5.0-EHub\EHub-5.0.sln]

但我在路径中没有看到任何非法内容,它只是一个简单的路径并且可以工作。到底是怎么回事?


编辑:删除了双斜杠,删除了多余的点,删除了减号,没有任何效果。

编辑:让我更具体一些。它构建了解决方案的一部分,但是一旦到达某个点,它就会给我这个错误并返回。

编辑:还有更多细节。它似乎失败的具体行:

Using "CombinePath" task from assembly "Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "CombinePath"
MSBUILD : error MSB3095: Invalid argument. Illegal characters in path. [C:\Builds\Pluto\Sources\Branches\v5.0-Ehub\EHub-5.0.sln]
Done executing task "CombinePath" -- FAILED.
Done building target "Site" in project "EHub-5.0.sln" -- FAILED.
Done executing task "CallTarget" -- FAILED.
Done building target "Build" in project "EHub-5.0.sln" -- FAILED.
Done Building Project "C:\Builds\Pluto\Sources\Branches\v5.0-Ehub\EHub-5.0.sln" (default targets) -- FAILED.

I was creating some build definitions in TFS2010 without problem until now.

MSBUILD Command:


C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe /nologo /noconsolelogger "C:\Builds\Neptune\Sources\\Branches\v5.0-Ehub\EHub-5.0.sln" /m:1 /fl /flp:"logfile=C:\Builds\Neptune\Sources\\Branches\v5.0-Ehub\EHub-5.0.log;encoding=Unicode;verbosity=detailed" /p:SkipInvalidConfigurations=true /p:OutDir="C:\Builds\Neptune\Binaries\\" /p:Configuration="Site" /p:Platform="Mixed Platforms" /p:RunCodeAnalysis="False" /p:VCBuildOverride="C:\Builds\Neptune\Sources\\Branches\v5.0-Ehub\EHub-5.0.sln.Mixed Platforms.Site.vsprops" /dl:WorkflowCentralLogger,"C:\Program Files\Microsoft Team Foundation Server 2010\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Detailed;BuildUri=vstfs:///Build/Build/1222;InformationNodeId=2168680;TargetsNotLogged=GetNativeManifest,GetCopyToOutputDirectoryItems,GetTargetPath;TFSUrl=http://ldu01:8080/tfs/Nova.com;"*WorkflowForwardingLogger,"C:\Program Files\Microsoft Team Foundation Server 2010\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Detailed;"

I'm getting this error:


(Site target) ->
MSBUILD : error MSB3095: Invalid argument. Illegal characters in path. [C:\Builds\Neptune\Sources\Branches\v5.0-EHub\EHub-5.0.sln]

Yet I don't see anything illegal in the path, it's just a plain path and it works. What is going on?

EDIT: Removed the double slashes, removed the extra dot, removed the minus sign, nothing worked.

EDIT: Let me be more specific. It builds part of the solution, but as soon as it gets to a point, it gives me this error and returns.

EDIT: Yet more details. the specific lines where it seems to fail:

Using "CombinePath" task from assembly "Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "CombinePath"
MSBUILD : error MSB3095: Invalid argument. Illegal characters in path. [C:\Builds\Pluto\Sources\Branches\v5.0-Ehub\EHub-5.0.sln]
Done executing task "CombinePath" -- FAILED.
Done building target "Site" in project "EHub-5.0.sln" -- FAILED.
Done executing task "CallTarget" -- FAILED.
Done building target "Build" in project "EHub-5.0.sln" -- FAILED.
Done Building Project "C:\Builds\Pluto\Sources\Branches\v5.0-Ehub\EHub-5.0.sln" (default targets) -- FAILED.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

一身软味2024-12-07 23:20:41

令人惊讶的是(或不是),问题似乎与非法字符完全无关,也与 [C:\Builds\Neptune\Sources\Branches\v5.0-EHub\EHub-5.0.sln] 无关。 字符串。

解决方案中的项目之一具有无效引用。另一个有一个无效的 dll.refresh 路径

这两件事之一导致了问题,但我没有时间,所以我不会测试是哪一件事造成的。

我修复了参考文献,问题就消失了。

我仍然好奇为什么我收到错误 error MSB3095: Invalid argument。不过,路径中存在非法字符。

Surprisingly (or not), it seems the problem had absolutely nothing to do with an Illegal Character, nor with the [C:\Builds\Neptune\Sources\Branches\v5.0-EHub\EHub-5.0.sln] string.

One of the projects in the solution had an invalid reference. Other one had an invalid dll.refresh path.

One of these two things caused the problem, but I'm out of time so I won't test which one did.

I fixed the references and the problem went away.

I'm still curious why I got the error error MSB3095: Invalid argument. Illegal characters in path., though.

·深蓝2024-12-07 23:20:41

减号('-')怎么样?
我不确定减号在这里是否有效。

How about minus characters ('-') ?
I'm not sure that the minus symbol is valid here.

嘿哥们儿2024-12-07 23:20:41

我遇到此错误,发现几个 .refresh 文件保存为 ANSI 文件类型。我将它们加载到记事本中并将它们保存为 Unicode 文件,这解决了我的问题。

I encountered this error and found that several of the .refresh files were saved as ANSI file types. I loaded them in notepad and saved them back down as Unicode files and this fixed my problem.

沫离伤花2024-12-07 23:20:41

我在从 VSS 迁移到 TFS 时遇到了同样的问题。我认为该错误是由 asmx Web 服务引起的。

解决方案:

  1. 转到文件、源代码控制、更改源代码控制
  2. 选择生成错误的项目
  3. 单击取消绑定
  4. 重新选择项目
  5. 单击绑定

它应该可以工作。如果没有,请在第一步(更改源代码控制)之前删除 Web 引用,并在第五步(单击绑定)之后右键单击项目,然后撤消签出。

I had the same problem while migrating from VSS to TFS. I think that the error was caused by the asmx web services.

Resolution :

  1. Go to File, Source control, Change source control
  2. Select the project which generate the error
  3. Click unbind
  4. Reselect the project
  5. Click bind

It should work. If it doesn't, before the first step (Change source control) delete the web references and after the fifth step (click bind) right click on the prject then undo checkouts.

庆幸我还是我2024-12-07 23:20:41

我就遇到过一次这种情况。我从命令提示符运行 msbuild,并且需要从提升命令提示符(即以管理员身份)运行它。

完全误导性的错误消息!

I encountered this once. I was running msbuild from a command prompt and I needed to be running it from an elevated command prompt (i.e. as Administrator).

Totally misleading error message!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文