The default implementation always returns Compile
Compile
protected override string GetElementNameFor(Project project, string file) { var relativePath = ToProjectRelativePath(project, file, "resources"); if (relativePath.StartsWith("wpf" + Path.DirectorySeparatorChar)) return "Resource"; else return "EmbeddedResource"; }