diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/DiagnosticCategory.cs b/src/Microsoft.NetCore.Analyzers/Core/Composition/DiagnosticCategory.cs
deleted file mode 100644
index c9b67bafe3..0000000000
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/DiagnosticCategory.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-namespace Microsoft.NetCore.Analyzers.Composition
-{
- internal static class DiagnosticCategory
- { public static readonly string Reliability = MicrosoftCompositionAnalyzersResources.CategoryReliability; }
-}
\ No newline at end of file
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/MicrosoftCompositionAnalyzersResources.resx b/src/Microsoft.NetCore.Analyzers/Core/Composition/MicrosoftCompositionAnalyzersResources.resx
deleted file mode 100644
index f44a8c8365..0000000000
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/MicrosoftCompositionAnalyzersResources.resx
+++ /dev/null
@@ -1,142 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
-
- Do not mix attributes from different versions of MEF
-
-
- Do not mix attributes from different versions of MEF
-
-
- Attribute '{0}' comes from a different version of MEF than the export attribute on '{1}'
-
-
- Parts exported with MEFv2 must be marked as Shared
-
-
- Part exported with MEFv2 must be marked with the Shared attribute.
-
-
- '{0}' is exported with MEFv2 and hence must be marked as Shared
-
-
- Reliability
-
-
\ No newline at end of file
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.cs.xlf b/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.cs.xlf
deleted file mode 100644
index fa85adc9a8..0000000000
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.cs.xlf
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- Nekombinujte atributy z různých verzí rozhraní MEF.
-
-
-
-
- Nekombinujte atributy z různých verzí rozhraní MEF.
-
-
-
-
- Atribut {0} pochází z jiné verze rozhraní MEF než atribut exportu u {1}.
-
-
-
-
- Části exportované pomocí rozhraní MEFv2 musí být označené jako sdílené.
-
-
-
-
- Část exportovaná pomocí rozhraní MEFv2 musí být označená atributem Shared.
-
-
-
-
- Část {0} je exportovaná pomocí rozhraní MEFv2 a musí být proto označená jako sdílená.
-
-
-
-
- Spolehlivost
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.de.xlf b/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.de.xlf
deleted file mode 100644
index 022fc832cb..0000000000
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.de.xlf
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- Keine Attribute aus verschiedenen Versionen des MEF kombinieren
-
-
-
-
- Keine Attribute aus verschiedenen Versionen des MEF kombinieren
-
-
-
-
- Das Attribut "{0}" stammt aus einer anderen Version des MEF als das Exportattribut für "{1}".
-
-
-
-
- Mit MEFv2 exportierte Teile müssen als "Shared" markiert werden
-
-
-
-
- Ein mit MEFv2 exportiertes Teil muss mit dem Shared-Attribut markiert werden.
-
-
-
-
- "{0}" wurde mit MEFv2 exportiert und muss daher als "Shared" markiert werden.
-
-
-
-
- Zuverlässigkeit
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.es.xlf b/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.es.xlf
deleted file mode 100644
index cdb4df725d..0000000000
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.es.xlf
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- No se deben mezclar atributos de distintas versiones de MEF
-
-
-
-
- No se deben mezclar atributos de distintas versiones de MEF.
-
-
-
-
- El atributo “{0}” procede de una versión de MEF distinta a la del atributo de exportación en “{1}”.
-
-
-
-
- Las partes exportadas con MEFv2 deben marcarse como Shared
-
-
-
-
- Las partes exportadas con MEFv2 deben marcarse con el atributo Shared.
-
-
-
-
- “{0}” se exporta con MEFv2 y, por lo tanto, debe marcarse como Shared.
-
-
-
-
- Confiabilidad
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.fr.xlf b/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.fr.xlf
deleted file mode 100644
index 8062552030..0000000000
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.fr.xlf
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- Ne pas mélanger les attributs de différentes versions de MEF
-
-
-
-
- Ne pas mélanger les attributs de différentes versions de MEF
-
-
-
-
- L'attribut '{0}' provient d'une autre version de MEF que l'attribut d'exportation sur '{1}'
-
-
-
-
- Les parties exportées avec MEFv2 doivent être marquées comme étant Shared
-
-
-
-
- La partie exportée avec MEFv2 doit être marquée avec l'attribut Shared.
-
-
-
-
- '{0}' est exporté avec MEFv2 et doit donc être marqué comme étant Shared
-
-
-
-
- Fiabilité
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.it.xlf b/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.it.xlf
deleted file mode 100644
index 03bd18a82b..0000000000
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.it.xlf
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- Non combinare attributi di versioni diverse di MEF
-
-
-
-
- Non combinare attributi di versioni diverse di MEF
-
-
-
-
- L'attributo '{0}' proviene da una versione di MEF diversa rispetto all'attributo export su '{1}'
-
-
-
-
- Le parti esportate con MEFv2 devono essere contrassegnate come Shared
-
-
-
-
- La parte esportata con MEFv2 deve essere contrassegnata con l'attributo Shared.
-
-
-
-
- '{0}' viene esportato con MEFv2 e di conseguenza deve essere contrassegnato come Shared
-
-
-
-
- Affidabilità
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.ja.xlf b/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.ja.xlf
deleted file mode 100644
index 8485f5dc40..0000000000
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.ja.xlf
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- 複数のバージョンの MEF の属性を混用しないでください
-
-
-
-
- 複数のバージョンの MEF の属性を混用しないでください
-
-
-
-
- 属性 '{0}' は、'{1}' のエクスポート属性とは別のバージョンの MEF の属性です
-
-
-
-
- MEFv2 でエクスポートされたパーツは、共有としてマークする必要があります
-
-
-
-
- MEFv2 でエクスポートされたパーツは、共有属性でマークする必要があります。
-
-
-
-
- '{0}' は MEFv2 でエクスポートされるため、共有としてマークする必要があります
-
-
-
-
- 信頼性
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.ko.xlf b/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.ko.xlf
deleted file mode 100644
index 5223ccf492..0000000000
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.ko.xlf
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- 다른 버전의 MEF 특성을 조합하지 마세요.
-
-
-
-
- 다른 버전의 MEF 특성을 조합하지 마세요.
-
-
-
-
- '{0}' 특성은 '{1}'의 export 특성이 아닌 다른 버전의 MEF에서 가져온 것입니다.
-
-
-
-
- MEFv2를 통해 내보낸 파트는 Shared로 표시되어야 합니다.
-
-
-
-
- MEFv2를 통해 내보낸 파트는 Shared 특성으로 표시되어야 합니다.
-
-
-
-
- '{0}'을(를) MEFv2를 통해 내보냈으므로 Shared로 표시해야 합니다.
-
-
-
-
- 안정성
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.pl.xlf b/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.pl.xlf
deleted file mode 100644
index 24a464a0d7..0000000000
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.pl.xlf
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- Nie mieszaj atrybutów z różnych wersji MEF
-
-
-
-
- Nie mieszaj atrybutów z różnych wersji MEF
-
-
-
-
- Atrybut „{0}” pochodzi z innej wersji MEF niż atrybut eksportu „{1}”
-
-
-
-
- Części wyeksportowane z MEFv2 muszą być oznaczone jako udostępnione
-
-
-
-
- Część wyeksportowana z MEFv2 musi być oznaczona atrybutem Shared.
-
-
-
-
- Element „{0}” jest eksportowany z MEFv2, a więc musi być oznaczony jako udostępniony
-
-
-
-
- Niezawodność
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.pt-BR.xlf b/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.pt-BR.xlf
deleted file mode 100644
index ad8b42992c..0000000000
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.pt-BR.xlf
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- Não combinar atributos de versões diferentes de MEF
-
-
-
-
- Não combinar atributos de versões diferentes de MEF
-
-
-
-
- O atributo '{0}' vem de uma versão diferente de MEF do que o atributo de exportação em '{1}'
-
-
-
-
- As partes exportadas com MEFv2 devem ser marcadas como Shared
-
-
-
-
- A parte exportada com MEFv2 deve ser marcada com o atributo Shared.
-
-
-
-
- '{0}' é exportado com MEFv2 e, portanto, deve ser marcado com Shared
-
-
-
-
- Confiabilidade
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.ru.xlf b/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.ru.xlf
deleted file mode 100644
index 5438cb0387..0000000000
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.ru.xlf
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- Не смешивайте атрибуты из разных версий MEF
-
-
-
-
- Не смешивайте атрибуты из разных версий MEF
-
-
-
-
- Атрибут "{0}" отличается версией MEF от атрибута экспорта в "{1}"
-
-
-
-
- Части, экспортированные с помощью MEF версии 2, должны быть помечены как Shared
-
-
-
-
- Часть, экспортированная с помощью MEF версии 2, должна быть помечена с помощью атрибута Shared.
-
-
-
-
- "{0}" экспортируется с помощью MEF версии 2 и поэтому должна быть помечена как Shared
-
-
-
-
- Надежность
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.tr.xlf b/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.tr.xlf
deleted file mode 100644
index 8a0d772747..0000000000
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.tr.xlf
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- Farklı MEF sürümlerine ait öznitelikleri karışık kullanmayın
-
-
-
-
- Farklı MEF sürümlerine ait öznitelikleri karışık kullanmayın
-
-
-
-
- '{0}' özniteliği, '{1}' üzerindeki dışarı aktarma özniteliğinden farklı bir MEF sürümüne ait
-
-
-
-
- MEFv2 ile dışarı aktarılan parçalar Shared olarak işaretlenmelidir
-
-
-
-
- MEFv2 ile dışarı aktarılan parçalar Shared özniteliğiyle işaretlenmelidir.
-
-
-
-
- '{0}' MEFv2 ile dışarı aktarıldığından, Shared olarak işaretlenmelidir
-
-
-
-
- Güvenilirlik
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.zh-Hans.xlf b/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.zh-Hans.xlf
deleted file mode 100644
index 251903ebf2..0000000000
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.zh-Hans.xlf
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- 切勿混合不同版本 MEF 中的属性
-
-
-
-
- 切勿混合不同版本 MEF 中的属性
-
-
-
-
- 属性“{0}”来自与“{1}”上的导出属性不同的 MEF 版本
-
-
-
-
- 通过 MEFv2 导出的部件必须标记为 Shared
-
-
-
-
- 通过 MEFv2 导出的部件必须标记为 Shared 属性。
-
-
-
-
- “{0}”是通过 MEFv2 导出的,因此必须标记为 Shared
-
-
-
-
- 可靠性
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.zh-Hant.xlf b/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.zh-Hant.xlf
deleted file mode 100644
index 70242022c8..0000000000
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/xlf/MicrosoftCompositionAnalyzersResources.zh-Hant.xlf
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
- 請勿混合來自不同 MEF 版本的屬性
-
-
-
-
- 請勿混合來自不同 MEF 版本的屬性
-
-
-
-
- 屬性 '{0}' 來自與 '{1}' 上的匯出屬性不同的 MEF 版本
-
-
-
-
- 使用 MEFv2 匯出的部分必須標記為 Shared
-
-
-
-
- 使用 MEFv2 匯出的部分必須標記為 Shared 屬性。
-
-
-
-
- '{0}' 以 MEFv2 所匯出,因此必須標記為「共用」
-
-
-
-
- 可靠性
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.NetCore.Analyzers/CSharp/Composition/CSharpDoNotMixAttributesFromDifferentVersionsOfMEF.Fixer.cs b/src/Roslyn.Diagnostics.Analyzers/CSharp/CSharpDoNotMixAttributesFromDifferentVersionsOfMEF.Fixer.cs
similarity index 84%
rename from src/Microsoft.NetCore.Analyzers/CSharp/Composition/CSharpDoNotMixAttributesFromDifferentVersionsOfMEF.Fixer.cs
rename to src/Roslyn.Diagnostics.Analyzers/CSharp/CSharpDoNotMixAttributesFromDifferentVersionsOfMEF.Fixer.cs
index 707e055fd7..b148176e95 100644
--- a/src/Microsoft.NetCore.Analyzers/CSharp/Composition/CSharpDoNotMixAttributesFromDifferentVersionsOfMEF.Fixer.cs
+++ b/src/Roslyn.Diagnostics.Analyzers/CSharp/CSharpDoNotMixAttributesFromDifferentVersionsOfMEF.Fixer.cs
@@ -3,9 +3,9 @@
using System.Composition;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeFixes;
-using Microsoft.NetCore.Analyzers.Composition;
+using Roslyn.Diagnostics.Analyzers;
-namespace Microsoft.NetCore.CSharp.Analyzers.Composition
+namespace Roslyn.Diagnostics.CSharp.Analyzers
{
///
/// RS0006: Do not mix attributes from different versions of MEF
diff --git a/src/Microsoft.NetCore.Analyzers/CSharp/Composition/CSharpPartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs b/src/Roslyn.Diagnostics.Analyzers/CSharp/CSharpPartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs
similarity index 84%
rename from src/Microsoft.NetCore.Analyzers/CSharp/Composition/CSharpPartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs
rename to src/Roslyn.Diagnostics.Analyzers/CSharp/CSharpPartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs
index 915cb396bd..e74ebf1fe5 100644
--- a/src/Microsoft.NetCore.Analyzers/CSharp/Composition/CSharpPartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs
+++ b/src/Roslyn.Diagnostics.Analyzers/CSharp/CSharpPartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs
@@ -3,9 +3,9 @@
using System.Composition;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeFixes;
-using Microsoft.NetCore.Analyzers.Composition;
+using Roslyn.Diagnostics.Analyzers;
-namespace Microsoft.NetCore.CSharp.Analyzers.Composition
+namespace Roslyn.Diagnostics.CSharp.Analyzers
{
///
/// RS0023: Parts exported with MEFv2 must be marked as Shared
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/DoNotMixAttributesFromDifferentVersionsOfMEF.Fixer.cs b/src/Roslyn.Diagnostics.Analyzers/Core/DoNotMixAttributesFromDifferentVersionsOfMEF.Fixer.cs
similarity index 87%
rename from src/Microsoft.NetCore.Analyzers/Core/Composition/DoNotMixAttributesFromDifferentVersionsOfMEF.Fixer.cs
rename to src/Roslyn.Diagnostics.Analyzers/Core/DoNotMixAttributesFromDifferentVersionsOfMEF.Fixer.cs
index e2e243d9f3..d19e6708cb 100644
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/DoNotMixAttributesFromDifferentVersionsOfMEF.Fixer.cs
+++ b/src/Roslyn.Diagnostics.Analyzers/Core/DoNotMixAttributesFromDifferentVersionsOfMEF.Fixer.cs
@@ -5,14 +5,14 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
-namespace Microsoft.NetCore.Analyzers.Composition
+namespace Roslyn.Diagnostics.Analyzers
{
///
/// RS0006: Do not mix attributes from different versions of MEF
///
public abstract class DoNotMixAttributesFromDifferentVersionsOfMEFFixer : CodeFixProvider
{
- public sealed override ImmutableArray FixableDiagnosticIds => ImmutableArray.Create(DoNotMixAttributesFromDifferentVersionsOfMEFAnalyzer.RuleId);
+ public sealed override ImmutableArray FixableDiagnosticIds => ImmutableArray.Create(RoslynDiagnosticIds.MixedVersionsOfMefAttributesRuleId);
public sealed override FixAllProvider GetFixAllProvider()
{
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/DoNotMixAttributesFromDifferentVersionsOfMEF.cs b/src/Roslyn.Diagnostics.Analyzers/Core/DoNotMixAttributesFromDifferentVersionsOfMEF.cs
similarity index 88%
rename from src/Microsoft.NetCore.Analyzers/Core/Composition/DoNotMixAttributesFromDifferentVersionsOfMEF.cs
rename to src/Roslyn.Diagnostics.Analyzers/Core/DoNotMixAttributesFromDifferentVersionsOfMEF.cs
index 43d4e9f502..82fa905ae5 100644
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/DoNotMixAttributesFromDifferentVersionsOfMEF.cs
+++ b/src/Roslyn.Diagnostics.Analyzers/Core/DoNotMixAttributesFromDifferentVersionsOfMEF.cs
@@ -9,7 +9,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
-namespace Microsoft.NetCore.Analyzers.Composition
+namespace Roslyn.Diagnostics.Analyzers
{
///
/// RS0006: Do not mix attributes from different versions of MEF
@@ -17,14 +17,12 @@ namespace Microsoft.NetCore.Analyzers.Composition
[DiagnosticAnalyzer(LanguageNames.CSharp, LanguageNames.VisualBasic)]
public sealed class DoNotMixAttributesFromDifferentVersionsOfMEFAnalyzer : DiagnosticAnalyzer
{
- internal const string RuleId = "RS0006";
+ private static readonly LocalizableString s_localizableTitle = new LocalizableResourceString(nameof(RoslynDiagnosticsAnalyzersResources.DoNotMixAttributesFromDifferentVersionsOfMEFTitle), RoslynDiagnosticsAnalyzersResources.ResourceManager, typeof(RoslynDiagnosticsAnalyzersResources));
- private static readonly LocalizableString s_localizableTitle = new LocalizableResourceString(nameof(MicrosoftCompositionAnalyzersResources.DoNotMixAttributesFromDifferentVersionsOfMEFTitle), MicrosoftCompositionAnalyzersResources.ResourceManager, typeof(MicrosoftCompositionAnalyzersResources));
+ private static readonly LocalizableString s_localizableMessage = new LocalizableResourceString(nameof(RoslynDiagnosticsAnalyzersResources.DoNotMixAttributesFromDifferentVersionsOfMEFMessage), RoslynDiagnosticsAnalyzersResources.ResourceManager, typeof(RoslynDiagnosticsAnalyzersResources));
+ private static readonly LocalizableString s_localizableDescription = new LocalizableResourceString(nameof(RoslynDiagnosticsAnalyzersResources.DoNotMixAttributesFromDifferentVersionsOfMEFDescription), RoslynDiagnosticsAnalyzersResources.ResourceManager, typeof(RoslynDiagnosticsAnalyzersResources));
- private static readonly LocalizableString s_localizableMessage = new LocalizableResourceString(nameof(MicrosoftCompositionAnalyzersResources.DoNotMixAttributesFromDifferentVersionsOfMEFMessage), MicrosoftCompositionAnalyzersResources.ResourceManager, typeof(MicrosoftCompositionAnalyzersResources));
- private static readonly LocalizableString s_localizableDescription = new LocalizableResourceString(nameof(MicrosoftCompositionAnalyzersResources.DoNotMixAttributesFromDifferentVersionsOfMEFDescription), MicrosoftCompositionAnalyzersResources.ResourceManager, typeof(MicrosoftCompositionAnalyzersResources));
-
- internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(RuleId,
+ internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(RoslynDiagnosticIds.MixedVersionsOfMefAttributesRuleId,
s_localizableTitle,
s_localizableMessage,
DiagnosticCategory.Reliability,
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/PartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs b/src/Roslyn.Diagnostics.Analyzers/Core/PartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs
similarity index 87%
rename from src/Microsoft.NetCore.Analyzers/Core/Composition/PartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs
rename to src/Roslyn.Diagnostics.Analyzers/Core/PartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs
index 134ad8e064..585ea2bba1 100644
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/PartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs
+++ b/src/Roslyn.Diagnostics.Analyzers/Core/PartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs
@@ -5,14 +5,14 @@
using System.Collections.Immutable;
using System.Threading.Tasks;
-namespace Microsoft.NetCore.Analyzers.Composition
+namespace Roslyn.Diagnostics.Analyzers
{
///
/// RS0023: Parts exported with MEFv2 must be marked as Shared
///
public abstract class PartsExportedWithMEFv2MustBeMarkedAsSharedFixer : CodeFixProvider
{
- public sealed override ImmutableArray FixableDiagnosticIds => ImmutableArray.Create(PartsExportedWithMEFv2MustBeMarkedAsSharedAnalyzer.RuleId);
+ public sealed override ImmutableArray FixableDiagnosticIds => ImmutableArray.Create(RoslynDiagnosticIds.MissingSharedAttributeRuleId);
public sealed override FixAllProvider GetFixAllProvider()
{
diff --git a/src/Microsoft.NetCore.Analyzers/Core/Composition/PartsExportedWithMEFv2MustBeMarkedAsShared.cs b/src/Roslyn.Diagnostics.Analyzers/Core/PartsExportedWithMEFv2MustBeMarkedAsShared.cs
similarity index 81%
rename from src/Microsoft.NetCore.Analyzers/Core/Composition/PartsExportedWithMEFv2MustBeMarkedAsShared.cs
rename to src/Roslyn.Diagnostics.Analyzers/Core/PartsExportedWithMEFv2MustBeMarkedAsShared.cs
index 2d8dcf3c69..d4418be71d 100644
--- a/src/Microsoft.NetCore.Analyzers/Core/Composition/PartsExportedWithMEFv2MustBeMarkedAsShared.cs
+++ b/src/Roslyn.Diagnostics.Analyzers/Core/PartsExportedWithMEFv2MustBeMarkedAsShared.cs
@@ -7,7 +7,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
-namespace Microsoft.NetCore.Analyzers.Composition
+namespace Roslyn.Diagnostics.Analyzers
{
///
/// RS0023: Parts exported with MEFv2 must be marked as Shared
@@ -15,14 +15,12 @@ namespace Microsoft.NetCore.Analyzers.Composition
[DiagnosticAnalyzer(LanguageNames.CSharp, LanguageNames.VisualBasic)]
public sealed class PartsExportedWithMEFv2MustBeMarkedAsSharedAnalyzer : DiagnosticAnalyzer
{
- internal const string RuleId = "RS0023";
+ private static readonly LocalizableString s_localizableTitle = new LocalizableResourceString(nameof(RoslynDiagnosticsAnalyzersResources.PartsExportedWithMEFv2MustBeMarkedAsSharedTitle), RoslynDiagnosticsAnalyzersResources.ResourceManager, typeof(RoslynDiagnosticsAnalyzersResources));
- private static readonly LocalizableString s_localizableTitle = new LocalizableResourceString(nameof(MicrosoftCompositionAnalyzersResources.PartsExportedWithMEFv2MustBeMarkedAsSharedTitle), MicrosoftCompositionAnalyzersResources.ResourceManager, typeof(MicrosoftCompositionAnalyzersResources));
+ private static readonly LocalizableString s_localizableMessage = new LocalizableResourceString(nameof(RoslynDiagnosticsAnalyzersResources.PartsExportedWithMEFv2MustBeMarkedAsSharedMessage), RoslynDiagnosticsAnalyzersResources.ResourceManager, typeof(RoslynDiagnosticsAnalyzersResources));
+ private static readonly LocalizableString s_localizableDescription = new LocalizableResourceString(nameof(RoslynDiagnosticsAnalyzersResources.PartsExportedWithMEFv2MustBeMarkedAsSharedDescription), RoslynDiagnosticsAnalyzersResources.ResourceManager, typeof(RoslynDiagnosticsAnalyzersResources));
- private static readonly LocalizableString s_localizableMessage = new LocalizableResourceString(nameof(MicrosoftCompositionAnalyzersResources.PartsExportedWithMEFv2MustBeMarkedAsSharedMessage), MicrosoftCompositionAnalyzersResources.ResourceManager, typeof(MicrosoftCompositionAnalyzersResources));
- private static readonly LocalizableString s_localizableDescription = new LocalizableResourceString(nameof(MicrosoftCompositionAnalyzersResources.PartsExportedWithMEFv2MustBeMarkedAsSharedDescription), MicrosoftCompositionAnalyzersResources.ResourceManager, typeof(MicrosoftCompositionAnalyzersResources));
-
- internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(RuleId,
+ internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(RoslynDiagnosticIds.MissingSharedAttributeRuleId,
s_localizableTitle,
s_localizableMessage,
DiagnosticCategory.Reliability,
diff --git a/src/Roslyn.Diagnostics.Analyzers/Core/RoslynDiagnosticIds.cs b/src/Roslyn.Diagnostics.Analyzers/Core/RoslynDiagnosticIds.cs
index 75159816f7..52368f276d 100644
--- a/src/Roslyn.Diagnostics.Analyzers/Core/RoslynDiagnosticIds.cs
+++ b/src/Roslyn.Diagnostics.Analyzers/Core/RoslynDiagnosticIds.cs
@@ -9,7 +9,7 @@ internal static class RoslynDiagnosticIds
// public const string DirectlyAwaitingTaskAnalyzerRuleId = "RS0003"; // Now CA2007 => Microsoft.ApiDesignGuidelines.Analyzers.DoNotDirectlyAwaitATaskAnalyzer
public const string UseSiteDiagnosticsCheckerRuleId = "RS0004";
public const string DoNotUseCodeActionCreateRuleId = "RS0005";
- // public const string MixedVersionsOfMefAttributesRuleId = "RS0006"; // Now RS0006 => Microsoft.Composition.Analyzers.DoNotMixAttributesFromDifferentVersionsOfMEFAnalyzer
+ public const string MixedVersionsOfMefAttributesRuleId = "RS0006";
// public const string UseArrayEmptyRuleId = "RS0007"; // Now CA1825 => System.Runtime.Analyzers.AvoidZeroLengthArrayAllocationsAnalyzer
// public const string ImplementIEquatableRuleId = "RS0008"; // Now CA1067 => Microsoft.ApiDesignGuidelines.Analyzers.EquatableAnalyzer
// public const string OverrideObjectEqualsRuleId = "RS0009"; // Now CA1815 => Microsoft.ApiDesignGuidelines.Analyzers.OverrideEqualsAndOperatorEqualsOnValueTypesAnalyzer
@@ -26,7 +26,7 @@ internal static class RoslynDiagnosticIds
// public const string DeadCodeRuleId = "RS0020"; // Now ???
// public const string DeadCodeTriggerRuleId = "RS0021"; // Now ???
public const string ExposedNoninstantiableTypeRuleId = "RS0022";
- // public const string MissingSharedAttributeRuleId = "RS0023"; // Now RS0023 => Microsoft.Composition.Analyzers.PartsExportedWithMEFv2MustBeMarkedAsSharedAnalyzer
+ public const string MissingSharedAttributeRuleId = "RS0023";
public const string PublicApiFilesInvalid = "RS0024";
public const string DuplicatedSymbolInPublicApiFiles = "RS0025";
public const string AvoidMultipleOverloadsWithOptionalParameters = "RS0026";
diff --git a/src/Roslyn.Diagnostics.Analyzers/Core/RoslynDiagnosticsAnalyzersResources.resx b/src/Roslyn.Diagnostics.Analyzers/Core/RoslynDiagnosticsAnalyzersResources.resx
index b54e12f5ca..757b6f762a 100644
--- a/src/Roslyn.Diagnostics.Analyzers/Core/RoslynDiagnosticsAnalyzersResources.resx
+++ b/src/Roslyn.Diagnostics.Analyzers/Core/RoslynDiagnosticsAnalyzersResources.resx
@@ -232,4 +232,22 @@
Symbol '{0}' violates the backcompat requirement: 'Public API with optional parameter(s) should have the most parameters amongst its public overloads'. See '{1}' for details.
+
+ Do not mix attributes from different versions of MEF
+
+
+ Do not mix attributes from different versions of MEF
+
+
+ Attribute '{0}' comes from a different version of MEF than the export attribute on '{1}'
+
+
+ Parts exported with MEFv2 must be marked as Shared
+
+
+ Part exported with MEFv2 must be marked with the Shared attribute.
+
+
+ '{0}' is exported with MEFv2 and hence must be marked as Shared
+
\ No newline at end of file
diff --git a/src/Roslyn.Diagnostics.Analyzers/Core/xlf/RoslynDiagnosticsAnalyzersResources.cs.xlf b/src/Roslyn.Diagnostics.Analyzers/Core/xlf/RoslynDiagnosticsAnalyzersResources.cs.xlf
index 8437b6f95e..707a4485fc 100644
--- a/src/Roslyn.Diagnostics.Analyzers/Core/xlf/RoslynDiagnosticsAnalyzersResources.cs.xlf
+++ b/src/Roslyn.Diagnostics.Analyzers/Core/xlf/RoslynDiagnosticsAnalyzersResources.cs.xlf
@@ -192,6 +192,36 @@
Symbol {0} narušuje požadavek na zpětnou kompatibilitu: Veřejné rozhraní API s nepovinnými parametry má mít většinu parametrů mezi svými veřejnými přetíženími. Podrobnosti najdete zde: {1}.
+
+
+ Do not mix attributes from different versions of MEF
+
+
+
+
+ Do not mix attributes from different versions of MEF
+
+
+
+
+ Attribute '{0}' comes from a different version of MEF than the export attribute on '{1}'
+
+
+
+
+ Parts exported with MEFv2 must be marked as Shared
+
+
+
+
+ Part exported with MEFv2 must be marked with the Shared attribute.
+
+
+
+
+ '{0}' is exported with MEFv2 and hence must be marked as Shared
+
+