MSBuild 社区任务的智能感知不起作用

发布于 2024-08-26 17:30:53 字数 720 浏览 14 评论 0原文

我使用的是 VS 2010 RC1。我下载 MSBuild 社区任务 (MCT) 并安装它。 (为了提供完整信息,我还安装了 MSBuild Extension Pack)

然后,为了让 Intellisense 能够执行 MCT 的任务,我将文件 C:\Program Files\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.xsd 复制到C:\Program Files\Microsoft Visual Studio 10.0\Xml\Schemas\1033\MSBuild\MSBuild.Community.Tasks.xsd

我启动 VS 并创建一个项目(构建)文件,如下所示:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
  <_
 </Project>

当开始键入目标时,我没有那里有智能感知。

我尝试打开属性窗格,单击架构浏览按钮,添加文件 C:\Program Files\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.xsd 但 Intellisense 仍然无法工作!删除此 shcema 后,Intellisense 将恢复工作,当然,仅适用于除 MCT 任务之外的其他任务。

有人遇到和我一样的问题吗?请帮忙!

I'm using VS 2010 RC1. I download MSBuild Community Tasks (MCT) and install it. (To give full information, I have also installed MSBuild Extension Pack)

Then, in order to have Intellisense work for MCT 's tasks, I copied the file C:\Program Files\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.xsd to C:\Program Files\Microsoft Visual Studio 10.0\Xml\Schemas\1033\MSBuild\MSBuild.Community.Tasks.xsd

I start VS and create a project (build) file as below:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
  <_
 </Project>

As starting to type a Target, I have no Intellisense there.

I try to open the property pane, click the schema browsing button, add the file C:\Program Files\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.xsd but Intellisense still not work! Removing this shcema, the Intellisense returns to work and of course, just works for other tasks but MCT tasks.

Does anyone have met the same problem like me? Please help!

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

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

发布评论

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

评论(3

世界等同你 2024-09-02 17:30:53

您需要将以下行添加到 C:\program files\Microsoft Visual Studio 10.0\Xml\Schemas\1033\Microsoft.Build.xsd

<xs:include schemaLocation="MSBuild\MSBuild.Community.Tasks.xsd"/>

它应该放在文件的末尾,之前

You need to add the following line to C:\program files\Microsoft Visual Studio 10.0\Xml\Schemas\1033\Microsoft.Build.xsd

<xs:include schemaLocation="MSBuild\MSBuild.Community.Tasks.xsd"/>

It should be put at the end of the file, before the </xs:schema>

安静 2024-09-02 17:30:53

我使用的是 VS2008,并且手动将 MSBuild 社区任务架构文件 (.xsd) 复制到正确的 Visual Studio 目录中。然而,这还不足以让我的社区任务注册到 Intellisense。

我必须在 Visual Studio 中打开 .csproj 文件,然后转到“XML”菜单并选择“架构...”。 MSBuild 社区架构文件不在任何地方的列表中,因此我单击“添加”,然后添加该文件。一旦我这样做并关闭了对话框,中提琴!我有智能感知来完成社区任务。

我受到 这篇文章的启发MDSN

I am using VS2008 and I manually copied the MSBuild Community Tasks schema file (.xsd) into the proper Visual Studio directory. However that wasn't enough for my community tasks to register with Intellisense.

I had to open the .csproj file within Visual Studio and then go to the 'XML' menu and select 'Schemas...'. The MSBuild Community Schema file was not on the list anywhere, so I clicked 'Add' and then added the file. Once I did that and closed the dialog, viola! I had intellisense for the community tasks.

I was inspired by this posting on MDSN

像你 2024-09-02 17:30:53

当我第一次开始使用 VS 2010 RC1 时,我遇到了同样的问题。我重新安装了,它运行了一段时间然后停止了。

我已经下载并安装了 VS 2010 Pro 的试用版在此处下载

从那以后我没有遇到任何问题。

I had the same issue when I first started using VS 2010 RC1. I re-installed and it worked for a bit and stopped.

I have since downloaded and installed the trial version of VS 2010 Pro Download Here

I have not had any issues since.

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