是什么之间的区别的.vcproj和.vcxproj Visual Studio项目文件?是的.vcproj仅在2010年之前的Visual Studio版本格式?
我问,因为我正在阅读日期为10/12的MSDN教程,该教程说明将文本插入.vcproj文件中不存在的.vcproj文件的某个区域.试图将文本放在类似的区域会破坏项目.
我正在尝试使用许多解决方案运行复杂构建的纯x64构建(一些用于CI,一些用于开发人员)和数百个项目并且遇到"错误MSB8013:此项目不包含配置和平台组合的调试| Win32"
我把它简化为一个简单的配置:
没有任何项目或解决方案包含Win32平台 - 它已被删除.
当我构建解决方案B(作为x64)时,我收到了
错误MSB8013:此项目不包含Debug | Win32的Configuration和Platform组合
错误消息有时包含其他信息:
如果某个其他项目正在尝试遵循项目到项目对此项目的引用,此项目已卸载或未包含在解决方案中,并且引用项目不使用相同或等效项目构建,则也可能出现此错误配置或平台.
问题是参考项目确实 "使用相同或相当的配置或平台建设."
查看msbuild诊断,正在构建项目Y,因为项目X包含对它的项目引用.但是在构建项目Y之前,正在删除配置和平台属性:
1>Task "MSBuild" (TaskId:28)
1> Removing Properties: (TaskId:28)
1> Configuration (TaskId:28)
1> Platform (TaskId:28)
Run Code Online (Sandbox Code Playgroud)
因此,Microsoft.Cpp.Default.props启动并将这些设置为Debug | Win32:
1>Task "Message" (TaskId:11)
1> Configuration=Debug (TaskId:11)
1>Done executing task "Message". (TaskId:11)
1>Task "Message" (TaskId:12)
1> Platform=Win32 (TaskId:12)
1>Done executing task "Message". (TaskId:12)
Run Code Online (Sandbox Code Playgroud)
如何防止这种情况并使msbuild通过所选的配置和平台?
(我理解使用NuGet来管理包依赖性的最终解决方案,但这在短期内是不可行的)
我使用以下工具/版本进行编程:Windows 10/VS2017 Professional/C++
升级到15.5.1后,我收到以下错误:
MIDL2338:交换机是矛盾的 - no_robust与 - 目标
Microsoft编译器错误说明列表说:编译IDL文件时,不能同时使用/ osf和/ ms_ext命令行开关.
我的项目属性中没有指定这些开关.
我试图降级回15.4.1,但发现除非它是N-1,否则不可能恢复到旧版本.这是基于我读过的许多博客(包括Stack Overflow).
我碰到了一堵墙,我一直处于停滞状态,直到找到这个开关问题.
非常感谢您的帮助.
这里的开发人员安装了不同的 SDK,我希望我的 Visual Studio 项目使用任何大于 10.0 的可用 SDK,而无需确切指定是哪一个。有没有办法做到这一点?
在 vcxproj 文件中:
<WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion>
Run Code Online (Sandbox Code Playgroud) 当我在vs 2017中构建项目时,会出现如下错误:
1>------ Build started: Project: TortoiseGitMerge, Configuration: Debug Win32 ------
1>Performing Custom Build Tools
1>The system cannot find the path specified.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 3.
1>Done building project "TortoiseMerge.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 10 up-to-date, 0 skipped ==========
Run Code Online (Sandbox Code Playgroud)
在此错误消息中,没有任何信息可以使我更接近解决方案。指定了哪个路径?
我如何找到?导致该错误消息中未写入问题路径的确切原因是什么?
我正在尝试使用 Python 和 lxml 解析 vcxproj。当我尝试这样做时,除非我删除<Project >.
这是我的 .vcxproj(我将其缩减为测试):
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ReleaseDebug|Win32">
<Configuration>ReleaseDebug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ReleaseDebug|x64">
<Configuration>ReleaseDebug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
</Project>
Run Code Online (Sandbox Code Playgroud)
我的python代码:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from lxml import etree
tree = etree.parse("core.xml")
for conf in tree.xpath("/Project/ItemGroup/ProjectConfiguration/Configuration"):
print(conf.text)
Run Code Online (Sandbox Code Playgroud)
如果我这样运行,脚本可以工作但什么也不显示。如果我DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"在节点项目脚本中删除工作...
我是 xml …