diff --git a/Sharpmake.Generators/VisualStudio/Csproj.cs b/Sharpmake.Generators/VisualStudio/Csproj.cs index 8af4f06a2..9e1e5f225 100644 --- a/Sharpmake.Generators/VisualStudio/Csproj.cs +++ b/Sharpmake.Generators/VisualStudio/Csproj.cs @@ -1630,13 +1630,6 @@ private static void WriteCustomProperties(Dictionary customPrope } } - internal enum CopyToOutputDirectory - { - Never, - Always, - PreserveNewest - } - private void GenerateFiles( CSharpProject project, List configurations, @@ -1650,7 +1643,7 @@ List skipFiles foreach (var file in project.ResolvedContentFullFileNames) { string include = Util.PathGetRelative(_projectPathCapitalized, file); - itemGroups.Contents.Add(new ItemGroups.Content { Include = include, LinkFolder = project.GetLinkFolder(include) }); + itemGroups.Contents.Add(new ItemGroups.Content { Include = include, CopyToOutputDirectory = project.DefaultContentCopyOperation, LinkFolder = project.GetLinkFolder(include) }); } diff --git a/Sharpmake/Project.cs b/Sharpmake/Project.cs index 9d678780a..e0c5ee2e9 100644 --- a/Sharpmake/Project.cs +++ b/Sharpmake/Project.cs @@ -2060,6 +2060,13 @@ public enum FileType Assembly, File } + + public enum CopyToOutputDirectory + { + Never, + Always, + PreserveNewest + } public class PublishFile { @@ -2258,6 +2265,7 @@ public void AddDefaultReferences(Configuration conf) public class CSharpProject : Project { public Strings ContentExtension = new Strings(); + public CopyToOutputDirectory? DefaultContentCopyOperation = null; public Strings VsctExtension = new Strings(".vsct"); public CSharpProjectType ProjectTypeGuids = CSharpProjectType.Default; public CSharpProjectSchema ProjectSchema = CSharpProjectSchema.Default;