Error: The element <ParameterGroup> beneath element <UsingTask> is unrecognized

梦想的初衷 提交于 2021-01-27 07:00:06

问题


I am receiving this error, when building the solution using the msbuild.

The element <ParameterGroup> beneath element <UsingTask> is
  unrecognized.

The error is showing both in msbuild and in Visual Studio.


回答1:


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.

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"...

change the ToolsVersion to at least 4.0.




回答2:


Other possibility, is that you are using <UsingTask> inside a <Target> element.

You MUST declare it outside the <Target />.

Tested on 2017 and 2019.

The error is the following otherwise. (I would bet this is @Crono sees with Roslyn).

proj(2300,5): error MSB4067: L'élément "ParameterGroup" situé sous l'élément <UsingTask> n'est pas reconnu.



回答3:


  1. Just copy the config below and create a specflow.exe.config file
  2. Put this config file next to your specflow.exe and you will be able to create the nunitexecutionreport report.

also can use this link https://github.com/techtalk/SpecFlow/wiki/Reporting

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <startup> 
         <supportedRuntime version="v4.0.30319" /> 
    </startup> 
</configuration> 


来源:https://stackoverflow.com/questions/22966200/error-the-element-parametergroup-beneath-element-usingtask-is-unrecognized

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!