Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This functionality isn't built into the Content item. But you can tack it on by adding a target to your project file. </p> <p>In your project you currently have this: </p> <pre><code>&lt;ItemGroup&gt; &lt;Content Include="test.stl"&gt; &lt;CopyToOutputDirectory&gt;PreserveNewest&lt;/CopyToOutputDirectory&gt; &lt;/Content&gt; &lt;/ItemGroup&gt; </code></pre> <p>Assuming you want that one specific file copied to a different location, add this to the end (before the closing "Project" tag): </p> <pre><code>&lt;Target Name="CopyStl" AfterTargets="AfterBuild"&gt; &lt;!-- One or the other of these Copy tasks should do what you want --&gt; &lt;Copy Condition="'%(Identity)' == 'test.stl'" SourceFiles="@(Content)" SkipUnchangedFiles="true" DestinationFolder="$(OutputPath)\path\under\outputpath" /&gt; &lt;Copy Condition="'%(Identity)' == 'test.stl'" SourceFiles="@(Content)" SkipUnchangedFiles="true" DestinationFolder="$(MSBuildProjectDirectory)\..\path\outside\project" /&gt; &lt;/Target&gt; </code></pre> <p>If you want to add a few more files to copy to the same folder, try this instead:</p> <pre><code>&lt;Target Name="CopySomeFiles" AfterTargets="AfterBuild"&gt; &lt;!-- One or the other of these Copy tasks should do what you want --&gt; &lt;Copy Condition="'%(Identity)' == 'test.stl' AND '%(Identity)' == 'test2.stl'" SourceFiles="@(Content)" SkipUnchangedFiles="true" DestinationFolder="$(OutputPath)\path\under\outputpath" /&gt; &lt;Copy Condition="'%(Identity)' == 'test.stl' AND '%(Identity)' == 'test2.stl'" SourceFiles="@(Content)" SkipUnchangedFiles="true" DestinationFolder="$(MSBuildProjectDirectory)\..\path\outside\project" /&gt; &lt;/Target </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload