在Visual Studio中"[some_platform,0]"是什么意思? [英] What does '[some_platform, 0]' mean in Visual Studio?

查看:124
本文介绍了在Visual Studio中"[some_platform,0]"是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

打开生成的解决方案+项目文件时,对于项目文件中包含的每个平台,都会收到以下警告:

When I open a generated solution+project file, I get the following warning for each platform I have in the project file:

path/to/project.vcxproj:警告:找不到项目文件"project"中引用的平台"[some_platform,0]".

path/to/project.vcxproj : warning : Platform '[some_platform, 0]' referenced in the project file 'project' cannot be found.

some_platform是项目中的有效平台,构建,浏览等均正常工作.没有行号显示问题所在.

some_platform is a valid platform in the project, and building, browsing etc all work normally. There is no line number showing where the problem is.

我的问题是,'[some_platform, 0]'的真正含义是什么?

My question is, what does '[some_platform, 0]' really mean?

来自Linux,我最初认为引号表示我已经[some_platform, 0]从字面上指定了某个地方,但我没有.我也没有在项目文件中的任何地方看到,\s*0.我该如何解密该消息才能发现它在抱怨什么?

Coming from Linux, I initially thought the quotes signify that I have [some_platform, 0] literally specified somewhere, which I don't. I don't see ,\s*0 used anywhere in the project file either. How do I decipher that message to be able to find out what it's complaining about?

这很重要,这是一个C ++项目.

This is a C++ project if that matters.

,甚至仅在两个消息和一个SDK参考中使用.所以[some_platform, 0]绝对是为了警告而构造的,但是第二部分(0)是什么意思?

The only places , is even used are inside two messages and an SDK reference. So the [some_platform, 0] is definitely something constructed for the sake of warning, but what does the second part (0) mean?

已解决:为什么VS会生成这样的输出,我不知道,谁知道0是什么意思.但是,事实证明,平台名称是SDK将在VS中注册的名称(或类似名称),并且VS希望它区分大小写.我将ORBIS和Durango更改为orbis和durango,引起了警告.解决问题可以消除警告(无论项目是否正在加载和构建都可以).

Resolved: Why VS generates an output like that, I don't know, and who knows what the 0 means. However, it turned out that the platform name is something an SDK would register with VS (or something along those lines) and VS expects it case-sensitive. I had changed ORBIS and Durango to orbis and durango, causing the warning. Fixing the case makes the warning go away (the project was loading and building fine regardless).

推荐答案

我认为您可能具有无与伦比的解决方案/项目平台和构建配置,导致在Visual Studio定义或创建新配置的情况很少见:

I think you might have unmatched solution/project platform and build configurations, resulting in the rare case when visual studio defines or creates new ones: https://msdn.microsoft.com/en-us/library/kkz9kefa.aspx ending in the odd platform names '[some_platform, 0]', '[durango, 0]' and '[orbis, 0]' you have.

现在这完全是我的猜测(因为我找不到任何文档来确认).但是0的实际含义是对目标针对那些单独平台时项目应使用的默认构建配置的引用.例如,在解决方案(.sln)文件中通常具有与此类似的行:
{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU

Now this is entirely my guess (since I could not find any documents to confirm it). But what that 0 actually means, is the reference to the default build configuration that project should use when you target those individual platforms. For instance, you usually have lines similar to this in the solution (.sln) file:
{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU

在上述情况下,从控制台使用msbuild solutionname.sln时,将使用构建配置0作为默认构建配置.但是由于整个平台都是针对该项目生成的,因此我们当然也没有默认的构建配置,因此...让我们生成.这篇文章中提供了默认构建配置的更多详细信息和示例:

In the case above you would use build configuration 0 as the default build configuration when using msbuild solutionname.sln from the console. But since the entire platform was generated for that project, we of-course don't have a default build configuration either, so... lets generate. There is more details and examples of the default build-configuration in this post: Visual Studio solution file - what does the "Build.0" mean?

现在回到实际可能是您真正的问题.您提到了SDK参考,是否确定它们指向正确的位置以及Visual Studio中是否正确配置了任何环境变量?如果不是,则问题可能与此处提到的警告有关: ​​项目中引用的平台"Android"找不到文件"san-angeles" .该问题上的警告消息肯定看起来与您所收到的警告类似,只是您具有那些奇怪生成的平台名称.

Now back to what might actually be your real problem. You mentioned SDK references, have you made sure they are pointing to the correct place and any environment variables is properly configured in visual studio? If not, the problem might be related to the warnings mentioned here: Platform 'Android' referenced in the project file 'san-angeles' cannot be found. The warning message on that question sure looks similar to the warning you have, only you have those oddly generated platform names.

希望这可以帮助您解决问题.

Hope this will help you solve the problem.

这篇关于在Visual Studio中"[some_platform,0]"是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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