禁用警告 MSB8012
Disable warning MSB8012
我想在 Visual Studio 2017 年将目标文件与输出二进制文件分开,但随后收到警告 MSB8012 - TargetPath does not match the Library's OutputFile property value
。
有什么方法可以跳过这个警告吗?
Is there some way to skip this warning?
如果您仍然希望此警告 MSB8012 不显示在 VS 中,您可以将其添加到 xxxx.xxxproj
文件中:
<PropertyGroup>
<MSBuildWarningsAsMessages>MSB8012</MSBuildWarningsAsMessages>
</PropertyGroup>
注意这是自VS2017以来的新功能。
另外,就像Hans说的,你可以直接修复这个警告,可以参考this similar case试试。
希望对您有所帮助。
我想在 Visual Studio 2017 年将目标文件与输出二进制文件分开,但随后收到警告 MSB8012 - TargetPath does not match the Library's OutputFile property value
。
有什么方法可以跳过这个警告吗?
Is there some way to skip this warning?
如果您仍然希望此警告 MSB8012 不显示在 VS 中,您可以将其添加到 xxxx.xxxproj
文件中:
<PropertyGroup>
<MSBuildWarningsAsMessages>MSB8012</MSBuildWarningsAsMessages>
</PropertyGroup>
注意这是自VS2017以来的新功能。
另外,就像Hans说的,你可以直接修复这个警告,可以参考this similar case试试。
希望对您有所帮助。