-4

Imagine I have different methods written in c#. And these are included in the main class now and work completely fine. But I have a plan to add an upadter function to this project. In this case my idea is to include each function in a DLL file with the function name. So my updater function can easily replace the old DLL file with the new if there's a new version available. The problem is I don't know how to create a DLL file by just including a method.

Isuru
  • 430
  • 5
  • 21
  • Your question is very unclear. What exactly do you want to do and what have you tried. Please read the help pages for Stack Overflow on how to write a good question. If you have code that does not work then please also read [mcve]. – AdrianHHH Oct 19 '15 at 07:58
  • This SO post might help [running msbuild programatically](http://stackoverflow.com/questions/7264682/running-msbuild-programmatically) – blogbydev Oct 19 '15 at 07:58

1 Answers1

0

You shouldn't make a seperate .dll for each function. When writing the library I suggest adding a new project to the current solution of the type C# class library. Now you can easily use your newly written library inside the project you are using it for. Like this:enter image description here

in the solution explorer you see a library project and a windows forms application project. The windows forms application uses the library's code to work. You can use the library when it's finished and compiled to a .dll by referencing it in the other project(s) under 'add reference'

online Thomas
  • 8,864
  • 6
  • 44
  • 85