TFS 2008 构建脚本

发布于 2024-09-03 16:38:33 字数 611 浏览 2 评论 0原文

在 TFS 2008 中,我尝试修改构建脚本 (TFSBuild.proj)。我收到以下警告:

The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'TeamProject' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'.

这是正确的,元素 PropertyGroup 确实有一个名为 TeamProject 的子元素。

我假设这是由于以下行引起的:

<Project DefaultTargets="DesktopBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">

据我所知,Xml 命名空间似乎不存在,尽管它看起来像标准命名空间。请问谁能告诉我这是否是标准 XML 命名空间、如何或在哪里可以查看其内容以及我看到的警告是否可能是由它引起的?

In TFS 2008, I am trying to modify a build script (TFSBuild.proj). I get the following warning:

The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'TeamProject' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'.

Which is correct, The element PropertyGroup does indeed have a child called TeamProject.

I’m making an assumption that this is caused because of the following line:

<Project DefaultTargets="DesktopBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">

The Xml Namespace doesn’t appear to exist as far as I can tell, although it looks like a standard one. Please can anyone tell me if this is a standard XML namespace, how or where I can view its contents and whether the warning that I am seeing may be caused by it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梅倚清风 2024-09-10 16:38:33

您正在 Visual Studio 编辑器中编辑 SCRIPT 文件,它将始终尝试在命名空间中查找丢失的元素。当我使用自定义任务或自定义库时,我有相同的“信息”(不是错误)。解决它的最好方法就是习惯它:)。
请记住,这些只是编辑的警告。

You're editing A SCRIPT file in Visual Studio editor, it will always try to find missing elements in the namespaces. I have the same "infos" (not errors) when I'm using custom tasks or custom libraries. The best way to solve it is to get used to it:).
Remember these are only warnings from the editor.

白首有我共你 2024-09-10 16:38:33

您的问题的答案可以在此链接中找到< /a>,并总结一下:

您可以安全地忽略此警告。 MSBuild 是否验证您的
针对架构的项目文件?是的,确实如此,但我不确定
这是如何完成的,所以我给巴克·霍奇斯发了一封电子邮件。他
很高兴将它传递给 MSBuild 上的尚未命名的开发人员
团队。开发者表示

“...MSBuild 确实尝试根据架构进行验证。但是,
验证是在运行时由我们的代码完成的,而不是加载
[project] 文件使用带有 xsd 的验证读取器(主要用于性能
原因)。 MSBuild 应该让任何不遵守的项目失败
架构。”

The answer to your question can be found at this link, and to summarise:

You can safely ignore this warning. So does MSBuild validate your
project files against the schema? Yes it does, but I wasn't sure just
how it was accomplished, so I fired off an email to Buck Hodges. He
was nice enough to pass it by an as-yet-unnamed-dev on the MSBuild
team. The dev stated that

"...MSBuild does try to validate against the schema. However, the
validation is done at runtime by our code rather than loading the
[project] file using a validate reader with the xsd (mainly for perf
reasons). MSBuild should fail any projects which don't adhere to the
schema."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文