This is a migrated thread and some comments may be shown as answers.

Visual Studio File BuildAction and Copy to Output Directory questions

2 Answers 928 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 16 Nov 2010, 04:30 PM
Hi All,

I use Teleriks controls for asp ajax and have a question regarding the
skin files...

I've copied the Skins folder to my project folder and have included it
in my project, but almost all of the items in these folders have a
"Build Action" of "Content" and a "Copy to Output Directory" value of
"Do not copy" in the properties window.

Do I have to go through all these folders to change the "Copy to
Output Directory" to "Copy Always" to ensure all my skin items are
copied over when I publish or build my site?

Of course, this question relates to any file that gets included to a
project, not just Telerik skins...

This page (http://msdn.microsoft.com/en-us/library/0c6xyb66.aspx)
suggests that the "Build Action" - "Content" that...

"The file is not compiled, but is included in the Content output
group. For example, this setting is the default value for an .htm or
other kind of Web file."

but this page also states the seetings for "Copy to Output Directory"
are ...

"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."

If I do have to set all my content skins and images etc to "Copy
Always", is there a quick way to do this when there could be hundreds
of these files spread through a large number of folders and sub
folders?

2 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 19 Nov 2010, 12:36 PM
Hello Karl,

If you need to use the controls' embedded skins, then no skin files are necessary to be copied or deployed, for that matter, anywhere as all those are embedded in the Telerik.Web.UI.dll assembly.

If, however, you need to create a custom skin, then you should copy the telerik skin files manually (no build actions required) and adjust the

Regards,
Tsvetoslav
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Strange
Top achievements
Rank 1
answered on 09 Aug 2018, 12:02 AM
You can add any directory recursively.
Edit project file Project, csproj
Add the directories you want to be published, and select Always to copy to the output directory.
Example:

<ItemGroup
    <Content Include="Content\**">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
</ItemGroup>
Tags
General Discussions
Asked by
Karl
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Strange
Top achievements
Rank 1
Share this question
or