How to set library/include path and library files at VC# project?

Stan Huang 421 Reputation points
2021-01-26T07:31:32.29+00:00

I can add paths of header include, library folders, and library files to be linked at VC++ easily. How to do them at VC#? I can't find at VC#2019 and the web?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,888 questions
{count} votes

3 additional answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 29,446 Reputation points Microsoft Vendor
    2021-01-27T02:44:26.693+00:00

    Hi @Stan Huang ,

    You can refer to @Viorel and @David Lowndes ‘s suggestions and use both Nuget packages and Add references in a VC#(.NET) project.

    For using Nuget packages, see Quickstart: Install and use a package in Visual Studio (Windows only), and for add references(dependencies), see How to: Add or remove references by using the Reference Manager.

    If you want to know more about the differences between NuGet Packages and References, please check this explanation: Difference between Reference, Template, and a NuGet package?

    Best Regards,
    Tianyu

    • If the answer is helpful, please click "Accept Answer" and upvote it.
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    1 person found this answer helpful.
    0 comments No comments

  2. Stan Huang 421 Reputation points
    2021-01-29T07:46:33.963+00:00

    I know it's inappropriate to post this issue here: https://learn.microsoft.com/en-us/answers/questions/212805/language-setting-of-visual-c-causes-error.html

    , but since it's hanging here longer than one month but no one can close it. Could you also help with it?

    0 comments No comments

  3. Stan Huang 421 Reputation points
    2021-02-03T11:45:29.42+00:00

    Now, I consider building both (C# application & C++ DLL) in 64-bit. I did it successfully for C# application, but failed in building a 64-bit C++ DLL. I changed it 'Target Machine' option to x64 on Property Page. I got "fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64'" in re-building it. How come? Could you tell me how to configure to build a 64-bit C++ DLL. I found its platform option contains only Win32 & Active(Win32) in Property page. Why is there no x64 option?