I have this code:
function setupProject($projectFile) { [xml]$root = Get-Content $projectFile; $project = $root.Project; $beforeBuild = $root.CreateE
Check these for possible solutions:
Powershell and csproj
Xml namespace and C# csproj
Here is a workaround from the second solution that worked for OP:
$content = [xml] $content.OuterXml.Replace(" xmlns=`"`"", "") $content.Save($_.FullName);