zoukankan      html  css  js  c++  java
  • VS中warning MSB8004和error MSB4018解决方案

    问题如下:

     

    warning MSB8004: Output Directory does not end with a trailing slash.  This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.

    其实这个问题很简单,因为把英文翻译过来即可,输出路径结尾缺少一个反斜线。

    解决方案:项目-项目属性-配置属性-常规-输出路径,现在的路径是下图这样的:

     将其改为

    即可。

    问题如下:

     

    error MSB4018: The "VCMessage" task failed unexpectedly.

    System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

       at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)

       at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)

       at System.String.Format(IFormatProvider provider, String format, Object[] args)

       at Microsoft.Build.Shared.ResourceUtilities.FormatString(String unformatted, Object[] args)

       at Microsoft.Build.Utilities.TaskLoggingHelper.FormatString(String unformatted, Object[] args)

       at Microsoft.Build.Utilities.TaskLoggingHelper.FormatResourceString(String resourceName, Object[] args)

       at Microsoft.Build.Utilities.TaskLoggingHelper.LogWarningWithCodeFromResources(String messageResourceName, Object[] messageArgs)

       at Microsoft.Build.CPPTasks.VCMessage.Execute()

       at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()

       at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()

    大概错误是这个样子的,这个错误主要是在链接器的输出路径中,我是从一篇文章中看到的解决方案的,文章原地址如下:

    https://stackoverflow.com/questions/11985085/how-do-i-fix-error-msb4018-in-visual-studio-2010/17771120

    解决方案:项目-项目属性-配置属性-链接器-常规-输出文件,原来是如下图的样子

     

    点击<继承>的那个选项,得到结果如下图所示:

    再次运行,成功!希望能对一些人有所帮助,如有问题希望各位多指教。

  • 相关阅读:
    day27_递归
    Linux常用命令
    Linux中的标准输入输出文件
    秋招日记《三》——字节三面挂
    《秋招日记》阿里一面
    秋招日记<->PDD一面挂
    十大排序
    第 254 场周赛 数组元素的最小非零乘积
    找不到boost/bind.hpp
    如何在Google浏览器中批量下载网页上的图片
  • 原文地址:https://www.cnblogs.com/tangcumalaxia/p/8309985.html
Copyright © 2011-2022 走看看