Adds resx to proj gen

This commit is contained in:
AndrewPeters 2014-01-29 14:10:09 -08:00 committed by anpete
parent e79aefce8b
commit f4e3bb768d
1 changed files with 13 additions and 6 deletions

View File

@ -195,12 +195,10 @@ functions
}
// Get the list of files
var filesString = String.Join(Environment.NewLine,
Directory.GetFiles(projectDir, "*.cs", SearchOption.AllDirectories)
.Select(p => p.Substring(projectDir.Length).Trim(Path.DirectorySeparatorChar))
.Where(p => !p.StartsWith("obj"))
.Select(p => String.Format(
@"<Compile Include=""{0}"" />", p)));
var filesString
= String.Join(Environment.NewLine,
BuildFileList(projectDir, "*.cs", "Compile"),
BuildFileList(projectDir, "*.resx", "EmbeddedResource"));
var packageReferences = dependencies.Where(r => !projectMapping.ContainsKey(r.Key))
.ToDictionary(k => k.Key, k => (string)k.Value);
@ -302,6 +300,15 @@ functions
}
}
private static string BuildFileList(string projectDir, string pattern, string elementName)
{
return String.Join(Environment.NewLine,
Directory.GetFiles(projectDir, pattern, SearchOption.AllDirectories)
.Select(p => p.Substring(projectDir.Length).Trim(Path.DirectorySeparatorChar))
.Where(p => !p.StartsWith(@"obj\"))
.Select(p => String.Format(@"<{0} Include=""{1}"" />", elementName, p)));
}
private static string GetProjectKTargets(string packagesDir)
{
var projectK = Directory.GetDirectories(packagesDir, "ProjectK*")