nant: invalid element nunit2. Unknown task or datatype

我怕爱的太早我们不能终老 提交于 2019-11-27 08:39:47

问题


How to solve this problem?

I have this ProjectName.UnitTests.config file, and I did exactly what the documentation said: http://nant.sourceforge.net/release/latest/help/tasks/nunit2.html

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
     <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="Neutral" /> 
                <bindingRedirect oldVersion="2.0.6.0" newVersion="2.2.8.0" /> 
                <bindingRedirect oldVersion="2.1.4.0" newVersion="2.2.8.0" /> 
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
</configuration>

回答1:


Find this thread on Sourceforge's nant-users mailing list. I would provide the same advice Erich Eichinger gives:

I recommend avoiding the nunit2 task at all and simply switch to <exec> nunit-console [...]

Additionally you get some extra goodness with NUnit 2.5.



来源:https://stackoverflow.com/questions/2806287/nant-invalid-element-nunit2-unknown-task-or-datatype

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