Reading a *.CSPROJ file in C#

Why not use the MSBuild API?

Project project = new Project();
project.Load(fullPathName);
var embeddedResources =
    from grp in project.ItemGroups.Cast<BuildItemGroup>()
    from item in grp.Cast<BuildItem>()
    where item.Name == "EmbeddedResource"
    select item;

foreach(BuildItem item in embeddedResources)
{
    Console.WriteLine(item.Include); // prints the name of the resource file
}

You need to reference the Microsoft.Build.Engine assembly

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)