csc.exe reference external .dll file

前端 未结 3 630
逝去的感伤
逝去的感伤 2020-12-01 21:59

I am trying to make a simple c# program using Growl C# API.

I tried to compile my program in two different ways:

1)

3条回答
  •  旧时难觅i
    2020-12-01 22:35

    So, my question is what is the correct way to reference .dll file in csc when files are in an external folder.

    You're already referencing them at build time. You just need to make them available at execution time too, but copying them into the same directory as the executable, when you want to run it.

    You could also investigate using the Global Assembly Cache if these are signed assemblies, but personally I'd stick with just keeping the executable with the libraries on which it depends.

提交回复
热议问题