简体   繁体   English

是否可以使用xUnit .net Core测试.net Framework项目

[英]Is it possible to test .net framework project with xUnit .net core

I have aa asp.net framework 4.5.2 project, can I use xUnit with .net core 2.0 to test it? 我有一个asp.net framework 4.5.2项目,可以将xUnit与.net core 2.0一起使用进行测试吗?

If yes, is it recommended? 如果可以,建议吗?

if not, what alternatives I have? 如果没有,我有什么选择?

No, 没有,

If the application references things like "System.Windows.Forms" - the .netcore Unit Test project won't be able to load it. 如果应用程序引用“ System.Windows.Forms”之类的内容,则.netcore单元测试项目将无法加载该项目。

We just ran into this issue- and are converting our .netcore unit test project to match the .net 4.5.2 of our production assemblies. 我们刚遇到这个问题,并且正在转换.netcore单元测试项目以匹配我们的生产程序集的.n​​et 4.5.2。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 VS 2017 中针对完整的 .net 框架 asp.net 核心项目运行 XUnit 2.2.0 单元测试时出现 System.BadImageFormatException - System.BadImageFormatException when running XUnit 2.2.0 unit test in VS 2017 against a full .net framework asp.net core project XUnit .Net Core 如何在测试项目中获取本地设置 - XUnit .Net Core How to get local settings inside Test project 测试 .NET 框架时,在 .NET Core xUnit 测试项目中发现无法加载类型“System.Web.HttpContextBase”错误 - Could not load type 'System.Web.HttpContextBase' error found in .NET Core xUnit test project when testing a .NET Framework NLog 适用于 ASP.NET Core App 但不适用于 .NET Core xUnit 测试项目 - NLog works in ASP.NET Core App but not in .NET Core xUnit Test Project 如何在 .NET Core 中使用 xUnit 测试 Xamarin ViewModel? - How to Test Xamarin ViewModel with xUnit in .NET Core? 在 xUnit 测试项目 (.NET Core) 中完成集成测试后如何关闭 Resharper 测试运行器? - How to close Resharper test runner after finishing integration test in xUnit Test project (.NET Core)? .net core 2.0 ConfigureLogging xunit test - .net core 2.0 ConfigureLogging xunit test xUnit,Moq-测试.Net核心存储库 - xUnit, Moq - test .Net Core Repository xUnit测试asp net core Mapper未初始化 - xUnit test asp net core Mapper not initialized ASP.NET Core Test xUnit控制器 - ASP.NET Core Test xUnit Controller
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM