Deploying NLog Using a ClickOnce Application
I found the answer to this question when yours NLog.config
will not be copied into your program if installed with ClickOnce
.
You need to select the NLog.config
file in Project
with Solution Explorer
and install it Properties
like this:
- Build action . Content
- Copy to output directory : always copy
Now when deployed using ClickOnce
files should be copied too! :)
source to share
Add the dll to your project and set BuildAction = None and "copy to output directory" as "don't copy".
Remove the reference to NLog in your project. Re-add the reference and point it to the DLL added to the project. Set Copy Local to true in the link properties.
Now when you run the application it will point to the local version and when deploying the application it will deploy the local version and point to it.
This works for many third party DLLs, but not all. Your best bet is to try this.
source to share