diff --git a/src/MSIdentityScaffolding/Microsoft.DotNet.MSIdentity/CodeReaderWriter/ProjectModifier.cs b/src/MSIdentityScaffolding/Microsoft.DotNet.MSIdentity/CodeReaderWriter/ProjectModifier.cs index 8ae33f386..71ab9562a 100644 --- a/src/MSIdentityScaffolding/Microsoft.DotNet.MSIdentity/CodeReaderWriter/ProjectModifier.cs +++ b/src/MSIdentityScaffolding/Microsoft.DotNet.MSIdentity/CodeReaderWriter/ProjectModifier.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; @@ -45,7 +44,6 @@ public ProjectModifier(ProvisioningToolOptions toolOptions, IEnumerable /// public async Task AddAuthCodeAsync() { - Debugger.Launch(); if (string.IsNullOrEmpty(_toolOptions.ProjectFilePath)) { var csProjFiles = _files.Where(file => file.EndsWith(".csproj")); diff --git a/src/Shared/Microsoft.DotNet.Scaffolding.Shared/Project/ProjectModifierHelper.cs b/src/Shared/Microsoft.DotNet.Scaffolding.Shared/Project/ProjectModifierHelper.cs index 166f199eb..7ce8ded0d 100644 --- a/src/Shared/Microsoft.DotNet.Scaffolding.Shared/Project/ProjectModifierHelper.cs +++ b/src/Shared/Microsoft.DotNet.Scaffolding.Shared/Project/ProjectModifierHelper.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; using System.Text; @@ -9,7 +8,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; -using Microsoft.DotNet.MSIdentity.Shared; using Microsoft.DotNet.Scaffolding.Shared.CodeModifier; using Microsoft.DotNet.Scaffolding.Shared.CodeModifier.CodeChange; @@ -497,12 +495,8 @@ internal static async Task ModifyDocumentText(Document fileDoc, IEnume internal static async Task UpdateDocument(Document document) { - Debugger.Launch(); var classFileTxt = await document.GetTextAsync(); - - // Note: For files without .cs extension, document.Name is the full filepath - var filePath = document.Name.EndsWith(".cs") ? document.FilePath : document.Name; - File.WriteAllText(filePath, classFileTxt.ToString(), new UTF8Encoding(false)); + File.WriteAllText(document.Name, classFileTxt.ToString(), new UTF8Encoding(false)); return $"Modified {document.Name}.\n"; // todo strings. }