How do I add an assembly to a Visual Studio project and reference it?

前端 未结 5 1206
夕颜
夕颜 2020-12-20 15:42

I\'ve compiled an assembly for MySql.Data.dll and would like to add it to a new Visual Studio Project. I\'m lost on the correct terminology and how best to go

相关标签:
5条回答
  • 2020-12-20 16:25

    Right-click on References and select Add Reference..., navigate to the to DLL and presto ... you're done.

    0 讨论(0)
  • 2020-12-20 16:28

    Right click on the project in Solution Explorer and select 'Add Reference...'. Then you can browse to the file.

    0 讨论(0)
  • 2020-12-20 16:30

    Right Click References -> Add Reference -> Wait forever for the list to load -> Browse -> Select your Dll

    Then when it has been added to the reference list, set it to Copy Local (if it is not already). This will put it in the output folders for you.

    0 讨论(0)
  • 2020-12-20 16:38

    Try the following

    • Right cilck on the References Node
    • Choose "Add Reference"
    • Click on the Browse tab
    • Navigate to the dll MySql.Data.dll on disk and hit OK

    Once it's added, click on the reference under the References folder and hit F4. This will bring up the properties tool window. Make sure it is set to "Copy Local" = True. This will ensure it gets deployed with your application by the standard installers (MSI and ClickOnce)

    0 讨论(0)
  • 2020-12-20 16:42

    Right click on the "References" folder in the list and choose Add reference. On the Browse tab, browse to the directory containing your project, and the subfolder. Select the assembly and add it to the project.

    0 讨论(0)
提交回复
热议问题