Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/323.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 从csproj引用xproj_C#_Visual Studio_Asp.net Core_.net Core - Fatal编程技术网

C# 从csproj引用xproj

C# 从csproj引用xproj,c#,visual-studio,asp.net-core,.net-core,C#,Visual Studio,Asp.net Core,.net Core,我在VisualStudio中添加了从csproj到xproj的引用 我在参考资料中看到库,dll的路径是正确的。Intelisens可以工作,但编译时不能工作,但有错误: the type could not be found. 如何将其付诸实施?您不能直接从csproj中引用xproj项目,相反的方式 您可以使用dotnet-pack(或者dnu-pack,如果您使用的是rc1),从xproj创建一个nuget包,然后在csproj中安装该nuget。可能重复的

我在VisualStudio中添加了从
csproj
xproj
的引用

我在参考资料中看到库,dll的路径是正确的。Intelisens可以工作,但编译时不能工作,但有错误:

the type could not be found. 

如何将其付诸实施?

您不能直接从csproj中引用xproj项目,相反的方式

您可以使用
dotnet-pack
(或者
dnu-pack
,如果您使用的是
rc1
),从xproj创建一个nuget包,然后在csproj中安装该nuget。

可能重复的