Sharing code between 2 projects without a dll

前端 未结 7 1841
孤城傲影
孤城傲影 2020-12-29 23:18

How can I have code-sharing between two projects without making a dll?

The issue is: I have a tool that syncs users & groups from LDAP to a database.

Now

7条回答
  •  被撕碎了的回忆
    2020-12-29 23:51

    Necromancing - As per Visual Studio 2017:

    You can create a shared project, and then reference the shared project in another project.

    It will use the framework-version and libraries from the project you reference the shared-project from. You can also use the same shared project in multiple projects, provided you get no conflict.

    This is basically statical linking on a source-code level.
    This also works with HTML&JavaScript-files (specifically, it works with publishing), but with HTML & JS files, you will run into problems while debugging...

    It's under "Classical Windows Desktop", but you can also use it for .NET Core etc.

提交回复
热议问题