从CSPROJ引用ASP.NET XPROJ [英] Referencing an ASP.NET xproj from a csproj

查看:67
本文介绍了从CSPROJ引用ASP.NET XPROJ的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio中的一个新的类库(NuGet包)模板之一,并且我想为其创建一个xUnit测试库。

I'm using one of those new "Class Library (NuGet Package)" templates from Visual Studio, and I want to create an xUnit test library for it.

问题是,当我创建一个新的.csproj库并尝试引用.xproj包时,Visual Studio说无法解析对XXXX的引用。

The problem is, when I create a new .csproj library and try to reference the .xproj package, Visual Studio says "The reference to XXXX could not be resolved."

为什么会发生这种情况,我该怎么解决?

Why is this happening and what can I do to fix this?

推荐答案

您可以使用 SideWaffle 模板包VS扩展来创建使用新的xproj项目类型的xUnit项目模板。它由Microsoft开发人员开发,是目前推荐的方法(这是他们在ASP.NET 5中使用的方法)。

You can use the SideWaffle template pack VS extension to create xUnit project templates using the new xproj project type. It is developed by a Microsoft developer and is the recommended approach at the moment (It is what they use in ASP.NET 5).

这篇关于从CSPROJ引用ASP.NET XPROJ的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆