Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

visual studio code - VSCode c# add reference to custom assembly

in Visual Studio Code I simply want to add a reference to an custom c# assembly like

"../libs/mylib.dll"

how can I add this dependency?

I tried to add the path to the dependency but was not able to compile because its just wrong :)

"dependencies": {
    "myassembly" : "../libs/Common.dll"
  },

or

"dependencies": {
    "log4net" : { "assembly":"../libs/log4net.dll" }
  },
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

simpler, just add the following:

1) modify the myproject.csproj file

    <ItemGroup>
     <Reference Include="DllComunVb2008">
       <HintPath>..DllsDllComunVb2008.dll</HintPath>
     </Reference>
    </ItemGroup>

2) Add the using of the library you are going to use. Example: using Dllcomun;


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...