我是NUnit的新手,正在尝试在Visual Studio Community 2017下开始使用它。我很难起床并开始跑步。
NUnit的实际安装进行得很顺利。我按照NUnit Wiki上“安装”页面上的过程(选项1)添加了NUnit和NUnit.console,现在在解决方案中具有了它们(以及NUnit.ConsoleRunner和少数NUnit.Extension。*扩展名)。
NUnit Wiki的.NET Core和.NET Standard页面说,下一步是安装NUnit模板,这就是我遇到的问题。它显示为“运行dotnet new -i NUnit3.DotNetNew.Template
以安装NUnit模板。” 我的系统上似乎没有dotnet.exe。查看Windows上的dotnet命令可执行文件在哪里?它看起来像是要安装的方法Microsoft.EntityFrameworkCore.Tools
,这导致我进入https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Tools/。基于此,我Install-Package Microsoft.EntityFrameworkCore.Tools -Version 2.0.1
从程序包管理器控制台尝试过;但这给了我错误:
PM> Install-Package Microsoft.EntityFrameworkCore.Tools -Version 2.0.1
Install-Package : Could not install package
'Microsoft.EntityFrameworkCore.Tools 2.0.1'. You are trying to install this
package into a project that targets '.NETFramework,Version=v4.5', but the
package does not contain any assembly references or content files that are
compatible with that framework. For more information, contact the package
author.
所以我真的要在这里钻一个兔子洞,从NUnit3.DotNetNew.Template
到dotnet.exe
到Microsoft.EntityFrameworkCore.Tools 2.0.1
。有什么想法下一步可以尝试吗?
你找错地方了。
要获取dotnet.exe
(未随VS2017进行安装的)包装,您需要从https://www.microsoft.com/net/download/windows下载并安装.NET Core SDK。
您需要选择以下选项:.NET Core SDK
.NET Core SDK
跨平台.NET实现。使用命令行工具和任何编辑器来构建.NET应用程序的最小下载。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句