I'm trying to publish my web solution to the file system, using the "Only files needed to run this appllication" option.
I have the following problems:
a) I have a connectionStrings.config file that should be included; I've marked this file as Content and Copy Always.
b) For testing purposes, I've added a textfile.txt that should not be included; I've marked this as Content and Do Not Copy.
Both of these settings fail... It seems that the setting "Copy to output directory" is simply disregarded.
Any ideas why this happens, and what to do about it?
The "Copy to output directory" is for when you are building your application, not publishing it.
This property specifies the conditions under which the selected source file will be copied to the output directory. Select Do not copy if the file is never to be copied to the output directory. Select Copy always if the file is always to be copied to the output directory. Select Copy if newer if the file is to be copied only when it is newer than an existing file of the same name in the output directory.
Source
There's more information on publishing web sites and applications here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With