Search code examples
visual-studio-2010iis-7publish

Visual Studio Publish: Copy Embedded Resource


I am publishing a web application from Visual Studio 2010 in IIS. The solution structure is depicted below:

enter image description here

Now everything is fine, except the Log4Net.xml is copied into the bin directory of the published forlder, while Data.xml is copied in right place. So I am manually copying the Log4Net.xml.

Why this is happening? Is there any script I can write for this publishing process?


Solution

  • Right click on Log4Net.xml and go to Properties.

    Change the Build Action from 'Embedded Resource' to 'Content'

    Change Copy to Output Directory to 'Copy always'.