简体   繁体   中英

How to add DLL reference in Visual Studio Code

I'm working on an application where I can get the CPU and GPU temperature. I followed the steps here ( http://www.lattepanda.com/topic-f11t3004.html ) while developing the application, but I'm using VS Code and I couldn't add the OpenHardwareMonitorLib.dll file as a reference like in Visual Studio. I'm not so sure how I should add the dll file to the project. I would be glad if you help. Here is my project files;

在此处输入图像描述

Don't know way to do this with VSCode, but...

Not every tool is good for everything. I'll try use Visual Studio 2022 Community to add this DLL. It should make changes to the project, which are independent of the editor you are using. Or do it manually like @hotdog_buns said. I hope it works.

You need to add a reference to any.dll files in your csTemp.csproj file as such:

  <ItemGroup>
     <Reference Include="OpenHardwareMonitorLib">
      <HintPath>**path\to\your\dll**</HintPath>
     </Reference>
  </ItemGroup>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM