小编Ger*_*elt的帖子

如何修复错误MSB4018:Visual Studio 2013中的"VCMessage"任务意外失败

这就是我所看到的:

1>------ Build started: Project: xxx (xxx\xxx), Configuration: Debug Win32 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB4018: The "VCMessage" task failed unexpectedly.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB4018: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB4018:    at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB4018:    at System.String.Format(IFormatProvider provider, String format, Object[] args)
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB4018:    at Microsoft.Build.Shared.ResourceUtilities.FormatString(String unformatted, Object[] …
Run Code Online (Sandbox Code Playgroud)

msvc12

10
推荐指数
1
解决办法
8098
查看次数

为什么bash"test -n"命令为$!($ at)位置参数提供了错误的结果而"!test -z"有效?

使用$@一个bash内test表达产生奇怪的结果.

这里有一个最小的测试脚本来重现问题(在相同的测试,其中:替代配方中通无误差):

#! /bin/bash
# file path: ./bash_weirdness.sh

echo "args: '$@'"

echo "--- empty ---"

if test "" ; then echo      "1.A1.TEST      - not empty?"; fi
if test -z "" ; then echo   "1.A2.EMPTY     - empty?"; fi
if test -n "" ; then echo   "1.A3.NE        - not empty?"; fi
if ! test "" ; then echo    "1.B1.NOT.TEST  - empty?"; fi
if ! test -z "" ; then echo "1.B2.NOT.EMPTY - not empty?"; fi
if …
Run Code Online (Sandbox Code Playgroud)

bash shell

7
推荐指数
2
解决办法
621
查看次数

标签 统计

bash ×1

msvc12 ×1

shell ×1