Updating a *.CSPROJ using MSBUILD API.

Posted by BENBUN Coder on Stack Overflow See other posts from Stack Overflow or by BENBUN Coder
Published on 2011-02-14T15:09:04Z Indexed on 2011/02/14 15:25 UTC
Read the original article Hit count: 347

Filed under:
|
|

Based on question : Reading a *.CSPROJ file in C#

I have code to extract some properties out of a *.csproj file, along the lines of :

Project project = new Project();

var Property001=
            from pg in project.PropertyGroups.Cast<BuildPropertyGroup>()
            from item in pg.Cast<BuildProperty>()
            where item.Name == "Property001"
            select item.Value.ToString();

This works fine, but the next question is how do I update the property using LINQ as well?

© Stack Overflow or respective owner

Related posts about c#

Related posts about LINQ