Skip to content

Commit

Permalink
Support newer .NET Core csproj files
Browse files Browse the repository at this point in the history
  • Loading branch information
drewnoakes authored and khellang committed Dec 30, 2017
1 parent 5985cb8 commit e2f3337
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion LangVersionFixer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ private static void FixLangVersion(this DirectoryInfo directory, string langVers

var document = file.ReadXmlDocument();

document.AddLangVersionElement(@namespace, langVersion);
var isNetCore = document.Root?.Attribute("Sdk") != null;

document.AddLangVersionElement(isNetCore ? "" : @namespace, langVersion);

if (cleanDocument)
{
Expand Down

0 comments on commit e2f3337

Please sign in to comment.