Set RootNamespace for MS.VS.LanguageServices.Razor (#10653)

All of the types MS.VS.LanguageServices.Razor elide "LanguageServices"
from their namespaces. So, each type has `Microsoft.VisualStudio.Razor`
its root namespace. These have been kept in sync by pure discipline
until this change.

This change updates the `<RootNamespace>` for
MS.VS.LanguageServices.Razor to not include "LanguageServices". That
way, new files in this project will be created with a root namespace of
`Microsoft.VisualStudio.Razor`. Normally, changing the `<RootNamespace>`
should be a painless process. However, it was blocked due to issues
caused by the MS.ANC.Razor.Serialization.Json shared project's embedded
string resources. I've gone ahead and sorted that so that updating the
`<RootNamespace>` is now possible.
This commit is contained in:
Dustin Campbell 2024-07-19 15:49:10 -07:00 коммит произвёл GitHub
Родитель abec8947c6 7599a58a07
Коммит cb90af2a06
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
7 изменённых файлов: 7 добавлений и 8 удалений

Просмотреть файл

@ -4,9 +4,8 @@
using System;
using Microsoft.AspNetCore.Razor.PooledObjects;
using Microsoft.CodeAnalysis.Razor.Logging;
using Microsoft.VisualStudio.Razor.Logging;
namespace Microsoft.VisualStudio.LanguageServices.Razor.Logging;
namespace Microsoft.VisualStudio.Razor.Logging;
internal sealed partial class ActivityLogLoggerProvider
{

Просмотреть файл

@ -3,9 +3,8 @@
using System.ComponentModel.Composition;
using Microsoft.CodeAnalysis.Razor.Logging;
using Microsoft.VisualStudio.Razor.Logging;
namespace Microsoft.VisualStudio.LanguageServices.Razor.Logging;
namespace Microsoft.VisualStudio.Razor.Logging;
/// <summary>
/// An <see cref="ILoggerProvider"/> that logs any warnings or errors to the Visual Studio Activity Log.

Просмотреть файл

@ -8,6 +8,7 @@
<IsShippingPackage>false</IsShippingPackage>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
<IsPackable Condition="'$(OS)' != 'Windows_NT'">false</IsPackable>
<RootNamespace>Microsoft.VisualStudio.Razor</RootNamespace>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -7,7 +7,7 @@ using System.Diagnostics.CodeAnalysis;
using Microsoft.AspNetCore.Razor.PooledObjects;
using Microsoft.Extensions.ObjectPool;
using Newtonsoft.Json;
using SR = Microsoft.AspNetCore.Razor.Serialization.Json.Internal.SR;
using SR = Microsoft.AspNetCore.Razor.Serialization.Json.Internal.Strings;
namespace Microsoft.AspNetCore.Razor.Serialization.Json;

Просмотреть файл

@ -5,7 +5,7 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using Newtonsoft.Json;
using SR = Microsoft.AspNetCore.Razor.Serialization.Json.Internal.SR;
using SR = Microsoft.AspNetCore.Razor.Serialization.Json.Internal.Strings;
namespace Microsoft.AspNetCore.Razor.Serialization.Json;

Просмотреть файл

@ -24,7 +24,7 @@
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Internal\Strings.resx">
<GenerateSource>true</GenerateSource>
<ClassName>Microsoft.AspNetCore.Razor.Serialization.Json.Internal.SR</ClassName>
<Namespace>Microsoft.AspNetCore.Razor.Serialization.Json.Internal</Namespace>
</EmbeddedResource>
</ItemGroup>
</Project>

Просмотреть файл

@ -10,7 +10,7 @@ using Microsoft.AspNetCore.Razor.Utilities;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using static Microsoft.AspNetCore.Razor.Language.RequiredAttributeDescriptor;
using SR = Microsoft.AspNetCore.Razor.Serialization.Json.Internal.SR;
using SR = Microsoft.AspNetCore.Razor.Serialization.Json.Internal.Strings;
namespace Microsoft.AspNetCore.Razor.Serialization.Json;