如何将.xproj引用到.csproj中? [英] How to Reference .xproj into .csproj?
问题描述
我有.csproj
项目,我想引用其他项目,即.xproj
,一切看起来都很好,但是当我尝试构建解决方案时,由于.dll丢失,我无法这样做.当我从\bin\release\net452\...
本身引用.dll
时,一切都很好.如何解决?
I have .csproj
project and I want to reference other project that is .xproj
, everything looks fine but when I try to build solution then I cannot because the .dll is missing. When i reference the .dll
from \bin\release\net452\...
itself then everything is ok. How to fix that?
我不是在寻找解决方法-现在我在gulp.move()中使用gulp.它工作正常,但感觉很脏...
I am not looking for workarounds - now I am using gulp with gulp.move(). It works fine but it feels dirty...
推荐答案
不可能直接从csproj引用xproj.
It is not possible to reference a xproj from a csproj directly.
您有2种可能的解决方案.
You have 2 possible solutions for this.
A)将xproj部署为NuGet软件包,并在csproj中使用NuGet软件包.
A) Deploy the xproj as a NuGet package and use the NuGet package in your csproj.
B)将您的csproj转换为xproj.
B) Convert your csproj to a xproj.
注意:xproj必须支持您使用的.NET csproj. net451等.
Note: the xproj must support your used .NET csproj. net451 etc.
这是一个引用xproj NuGet包的csproj示例
Here's an example of a csproj referencing a xproj NuGet package
https://github.com/damienbod/ElasticsearchCRUD/tree/master/samples/ConsoleElasticsearchCrudExample
这篇关于如何将.xproj引用到.csproj中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!