Remove workarounds for referencing the DllImport source generator now that we use...
authorJeremy Koritzinsky <jekoritz@microsoft.com>
Tue, 30 Nov 2021 21:48:15 +0000 (13:48 -0800)
committerGitHub <noreply@github.com>
Tue, 30 Nov 2021 21:48:15 +0000 (13:48 -0800)
Co-authored-by: Andy Gocke <andy@commentout.net>
eng/Versions.props
eng/generators.targets
src/libraries/System.Runtime.InteropServices/gen/DllImportGenerator/DllImportGenerator.csproj
src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Microsoft.Interop.SourceGeneration.csproj

index 37534ce..2217604 100644 (file)
@@ -16,7 +16,6 @@
     <StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
     <DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
     <!-- Opt-in/out repo features -->
-    <UsingToolMicrosoftNetCompilers>true</UsingToolMicrosoftNetCompilers>
     <UsingToolMicrosoftNetILLinkTasks>true</UsingToolMicrosoftNetILLinkTasks>
     <UsingToolIbcOptimization>false</UsingToolIbcOptimization>
     <UsingToolXliff>false</UsingToolXliff>
@@ -52,8 +51,6 @@
     <MicrosoftCodeAnalysisCSharpCodeStyleVersion>4.0.0-4.final</MicrosoftCodeAnalysisCSharpCodeStyleVersion>
     <MicrosoftCodeAnalysisCSharpVersion>4.0.0-4.final</MicrosoftCodeAnalysisCSharpVersion>
     <MicrosoftCodeAnalysisNetAnalyzersVersion>7.0.0-preview1.21572.6</MicrosoftCodeAnalysisNetAnalyzersVersion>
-    <!-- Pin compiler version to workaround issue: https://github.com/dotnet/runtime/issues/59908 -->
-    <MicrosoftNetCompilersToolsetVersion>4.0.0-5.21453.15</MicrosoftNetCompilersToolsetVersion>
     <!-- SDK dependencies -->
     <MicrosoftDotNetCompatibilityVersion>2.0.0-alpha.1.21525.11</MicrosoftDotNetCompatibilityVersion>
     <!-- Arcade dependencies -->
index 5283236..13926ce 100644 (file)
                         and @(EnabledGenerators->AnyHaveMetadataValue('Identity', 'DllImportGenerator'))">
     <ProjectReference
       Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\gen\DllImportGenerator\DllImportGenerator.csproj"
-      OutputItemType="InRepoSourceGenerator"
+      OutputItemType="Analyzer"
       ReferenceOutputAssembly="false" />
     <ProjectReference
       Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj"
-      OutputItemType="InRepoSourceGenerator"
+      OutputItemType="Analyzer"
       ReferenceOutputAssembly="false" />
   </ItemGroup>
   <ItemGroup Condition="'@(EnabledGenerators)' != ''
         <DefineConstants>$(DefineConstants);DLLIMPORTGENERATOR_INTERNALUNSAFE</DefineConstants>
     </PropertyGroup>
 
-    <!-- We binplace Microsoft.Interop.SourceGeneration.dll and Microsoft.Interop.DllImportGenerator.dll into a directory that we control and add them as Analyzer items from there
-         to work around https://github.com/dotnet/roslyn/issues/56442, which is fixed in the 6.0 RTM SDK. When we consume the 6.0 SDK, we can remove this and instead change the
-         ProjectReferences to the source generator projects to have OutputItemType="Analyzer" -->
-    <Copy SourceFiles="@(InRepoSourceGenerator)" DestinationFolder="$(IntermediateOutputPath)referencedGenerators" SkipUnchangedFiles="true">
-      <Output TaskParameter="DestinationFiles" ItemName="Analyzer" />
-    </Copy>
     <PropertyGroup>
       <DefineConstants>$(DefineConstants);DLLIMPORTGENERATOR_ENABLED</DefineConstants>
     </PropertyGroup>
index 843c889..85f7a7c 100644 (file)
@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <AssemblyName>Microsoft.Interop.DllImportGenerator</AssemblyName>
-    <TargetFramework>netstandard2.0</TargetFramework>
+    <TargetFrameworks>netstandard2.0</TargetFrameworks>
     <IncludeBuildOutput>false</IncludeBuildOutput>
     <SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
     <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
index e8f403d..f5148d4 100644 (file)
@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>netstandard2.0</TargetFramework>
+    <TargetFrameworks>netstandard2.0</TargetFrameworks>
     <Packable>false</Packable>
     <Nullable>enable</Nullable>
     <RootNamespace>Microsoft.Interop</RootNamespace>