我们的项目文件已经存在一段时间了,它们包括xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
。我正试图弄清楚如何在CONDITION
中执行子字符串匹配,所以我想我会查看模式,看看是否有什么东西跳出来。
尝试获取模式导致404:
$ wget http://schemas.microsoft.com/developer/msbuild/2003
--2016-10-04 22:44:43-- http://schemas.microsoft.com/developer/msbuild/2003
Resolving schemas.microsoft.com (schemas.microsoft.com)... 65.54.226.187
Connecting to schemas.microsoft.com (schemas.microsoft.com)|65.54.226.187|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
当我在Web浏览器中访问时,Microsoft返回以下消息给我,表明模式以前是可用的,但它不再可用:
您正在查找的资源已被删除已更改,或暂时不可用。
微软在MSBuild项目文件模式参考中有文档,但它没有列出可用的模式,模式的URL或它们之间的差异。
我猜我们应该不应该使用2003年的模式,因为它似乎已被弃用或撤回,但我不知道更多。我的问题是:- 我们应该使用什么模式?
- 模式的URL是什么?
- 2003年的模式和我应该使用的模式有什么不同?
版本似乎更相关,现在我们正试图与AppVeyor集成。我们在自动测试方面遇到了问题(无法在AppVeyor下执行64位测试?为什么AppVeyor使用VS2010工具VS2015图像?),AppVeyor支持建议更改XML头中的版本号。下面是一个典型的VCXPROJ文件的头部。
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Visual Studio 2015的XML编辑器(可能还有其他版本)在%InstallRoot%XmlSchemas
中提供了本地模式的缓存。在那里找msbuild.xsd
。
如果Microsoft在命名空间URI中提供它就好了,
http://schemas.microsoft.com/developer/msbuild/2003
但是XML名称空间名称uri不需要可检索。注意,上述名称空间URI在Visual Studio 2015中仍然是当前的。