How do I import a .NET Core project to another .NET Core project in Visual Studio?

前端 未结 3 1530
南旧
南旧 2020-12-18 02:48

I need to use some classes from another project. How can I just import or create a reference to that project in Visual Studio?

Right now if I use \"Add reference\" i

3条回答
  •  [愿得一人]
    2020-12-18 03:25

    I had a .Net core project and i wanted to create another project for services in my solution. After adding the project I added the reference as follows:

    1. Right click Dependencies in your solution.
    2. Select Add Reference option.
    3. In the next window, in Projects dropdown select the project you want to add.

    Alternatively, you can add a reference by editing the csproj file of the project in which you want to add the dependency/reference. Open the file and add the following:

    
       
    
    

    Hope this helps someone.

提交回复
热议问题