Skip to content

Commit 84b55d9

Browse files
jkoritzinskyagocke
andauthored
Remove workarounds for referencing the DllImport source generator now that we use the RTM sdk. (#62156)
Co-authored-by: Andy Gocke <andy@commentout.net>
1 parent f53075c commit 84b55d9

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

eng/Versions.props

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
1717
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
1818
<!-- Opt-in/out repo features -->
19-
<UsingToolMicrosoftNetCompilers>true</UsingToolMicrosoftNetCompilers>
2019
<UsingToolMicrosoftNetILLinkTasks>true</UsingToolMicrosoftNetILLinkTasks>
2120
<UsingToolIbcOptimization>false</UsingToolIbcOptimization>
2221
<UsingToolXliff>false</UsingToolXliff>
@@ -52,8 +51,6 @@
5251
<MicrosoftCodeAnalysisCSharpCodeStyleVersion>4.0.0-4.final</MicrosoftCodeAnalysisCSharpCodeStyleVersion>
5352
<MicrosoftCodeAnalysisCSharpVersion>4.0.0-4.final</MicrosoftCodeAnalysisCSharpVersion>
5453
<MicrosoftCodeAnalysisNetAnalyzersVersion>7.0.0-preview1.21572.6</MicrosoftCodeAnalysisNetAnalyzersVersion>
55-
<!-- Pin compiler version to workaround issue: https://github.com/dotnet/runtime/issues/59908 -->
56-
<MicrosoftNetCompilersToolsetVersion>4.0.0-5.21453.15</MicrosoftNetCompilersToolsetVersion>
5754
<!-- SDK dependencies -->
5855
<MicrosoftDotNetCompatibilityVersion>2.0.0-alpha.1.21525.11</MicrosoftDotNetCompatibilityVersion>
5956
<!-- Arcade dependencies -->

eng/generators.targets

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
and @(EnabledGenerators->AnyHaveMetadataValue('Identity', 'DllImportGenerator'))">
3535
<ProjectReference
3636
Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\gen\DllImportGenerator\DllImportGenerator.csproj"
37-
OutputItemType="InRepoSourceGenerator"
37+
OutputItemType="Analyzer"
3838
ReferenceOutputAssembly="false" />
3939
<ProjectReference
4040
Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\gen\Microsoft.Interop.SourceGeneration\Microsoft.Interop.SourceGeneration.csproj"
41-
OutputItemType="InRepoSourceGenerator"
41+
OutputItemType="Analyzer"
4242
ReferenceOutputAssembly="false" />
4343
</ItemGroup>
4444
<ItemGroup Condition="'@(EnabledGenerators)' != ''
@@ -83,12 +83,6 @@
8383
<DefineConstants>$(DefineConstants);DLLIMPORTGENERATOR_INTERNALUNSAFE</DefineConstants>
8484
</PropertyGroup>
8585

86-
<!-- 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
87-
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
88-
ProjectReferences to the source generator projects to have OutputItemType="Analyzer" -->
89-
<Copy SourceFiles="@(InRepoSourceGenerator)" DestinationFolder="$(IntermediateOutputPath)referencedGenerators" SkipUnchangedFiles="true">
90-
<Output TaskParameter="DestinationFiles" ItemName="Analyzer" />
91-
</Copy>
9286
<PropertyGroup>
9387
<DefineConstants>$(DefineConstants);DLLIMPORTGENERATOR_ENABLED</DefineConstants>
9488
</PropertyGroup>

src/libraries/System.Runtime.InteropServices/gen/DllImportGenerator/DllImportGenerator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<AssemblyName>Microsoft.Interop.DllImportGenerator</AssemblyName>
5-
<TargetFramework>netstandard2.0</TargetFramework>
5+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
66
<IncludeBuildOutput>false</IncludeBuildOutput>
77
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
88
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>

src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Microsoft.Interop.SourceGeneration.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
4+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
55
<Packable>false</Packable>
66
<Nullable>enable</Nullable>
77
<RootNamespace>Microsoft.Interop</RootNamespace>

0 commit comments

Comments
 (0)