- Allow identical `@using` directives in the primary document. This means that if a user types `@using System` twice in the primary document (i.e. `Index.cshtml`) then we'll generate that using statement twice; this enables proper C# IntelliSense to light up on both using statements and allows auto-completion to work because there's no more magical distinction logic for Razor code that is in the current document. - Prior to this change if you had two identical using statements in the same document one would be in no-mans land mapped to nothing (not C#, not HTML) and the other would be mapped to C#; the second a user differentiated the two statements (i.e. adding a `.`) we'd distinctify the using statements resulting in an invalid completion. - This PR has an end-user impact where they will now receive the normal C# warning about having duplicate using. I treated this prior behavior more as a bug because we threw away the first using directive instance which impacted editing and in general was a silly thing to correct for the user. - Added new integration test showing how using directives are not de-duplicated in the primary document. #1255 |
||
|---|---|---|
| .. | ||
| Microsoft.AspNetCore.Mvc.Razor.Extensions.Test | ||
| Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X.Test | ||
| Microsoft.AspNetCore.Razor.Design.Test | ||
| Microsoft.AspNetCore.Razor.Language.Test | ||
| Microsoft.AspNetCore.Razor.Runtime.Test | ||
| Microsoft.AspNetCore.Razor.Test | ||
| Microsoft.AspNetCore.Razor.Test.Common | ||
| Microsoft.AspNetCore.Razor.Test.MvcShim | ||
| Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib | ||
| Microsoft.AspNetCore.Razor.Test.MvcShim.Version1_X | ||
| Microsoft.AspNetCore.Razor.Tools.Test | ||
| Microsoft.CodeAnalysis.Razor.Test | ||
| Microsoft.CodeAnalysis.Razor.Workspaces.Test | ||
| Microsoft.CodeAnalysis.Razor.Workspaces.Test.Common | ||
| Microsoft.VisualStudio.Editor.Razor.Test | ||
| Microsoft.VisualStudio.Editor.Razor.Test.Common | ||
| Microsoft.VisualStudio.LanguageServices.Razor.Test | ||
| Microsoft.VisualStudio.Mac.LanguageServices.Razor.Test | ||
| RazorPageGenerator.Test | ||
| testapps | ||
| Directory.Build.props | ||