错误:元素 <ParameterGroup>在元素下方 <UsingTask>不被承认 [英] Error: The element <ParameterGroup> beneath element <UsingTask> is unrecognized
问题描述
我在使用 msbuild 构建解决方案时收到此错误.
I am receiving this error, when building the solution using the msbuild.
The element <ParameterGroup> beneath element <UsingTask> is
unrecognized.
该错误在 msbuild 和 Visual Studio 中均显示.
The error is showing both in msbuild and in Visual Studio.
推荐答案
这是因为您的项目之一是针对 .NET 3.5.您的所有项目都应至少面向 .NET 4.0.
This is because one of your project is targeting .NET 3.5. All of your projects should be targeted to .NET 4.0 at least.
如果您的 .cs 项目不允许查看或更改目标框架,就像我的情况一样:您需要在 .csproj 中手动更改它.在记事本中打开 .csproj.在这一行
If your .cs project does not allow to view or change the Target Framework, as it was in my situation: You will need to change it manually in .csproj. Open the .csproj in notepad. In this line
<Project ToolsVersion="3.5"...
将 ToolsVersion 更改为至少 4.0.
change the ToolsVersion to at least 4.0.
这篇关于错误:元素 <ParameterGroup>在元素下方 <UsingTask>不被承认的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!