Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/276.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# 如何在没有visual studio的情况下在CLI项目中添加.dll文件?_C#_.net Core_Dotnet Cli - Fatal编程技术网

C# 如何在没有visual studio的情况下在CLI项目中添加.dll文件?

C# 如何在没有visual studio的情况下在CLI项目中添加.dll文件?,c#,.net-core,dotnet-cli,C#,.net Core,Dotnet Cli,我删除了Visual Studio,但我喜欢c。我从下载并安装了dotnet。然后我在命令行dotnet新控制台中写入所有工作,dotnet运行work。然后我创建了另一个文件夹,在那里编写了dotnet新的classlib(is.dll),它就可以工作了。但我不知道如何将.dll文件添加到我的项目中。如何操作?您可以手动编辑.csproj文件的XML,或者: 这将为您添加XML: <ItemGroup> <ProjectReference Include="..

我删除了Visual Studio,但我喜欢c。我从下载并安装了dotnet。然后我在命令行
dotnet新控制台
中写入所有工作,
dotnet运行
work。然后我创建了另一个文件夹,在那里编写了
dotnet新的classlib
(is.dll),它就可以工作了。但我不知道如何将.dll文件添加到我的项目中。如何操作?

您可以手动编辑.csproj文件的XML,或者:

这将为您添加XML:

<ItemGroup>
  <ProjectReference Include="..\lib\lib.csproj" />
</ItemGroup>


“我删除了Visual Studio”-我从来没有听说过这样的亵渎行为。我在磁盘C上没有内存:/@CodeCaster你能给我一些xml代码吗?
<ItemGroup>
  <ProjectReference Include="..\lib\lib.csproj" />
</ItemGroup>