Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean-up generators.targets #82304

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions eng/generators.targets
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,26 @@
OutputItemType="Analyzer" />
</ItemGroup>

<Target Name="ConfigureGenerators"
DependsOnTargets="ConfigureLibraryImportGenerator"
BeforeTargets="CoreCompile" />

<!-- Microsoft.Interop.LibraryImportGenerator -->
<Target Name="ConfigureLibraryImportGenerator"
Condition="'@(EnabledGenerators)' != '' and @(EnabledGenerators->AnyHaveMetadataValue('Identity', 'LibraryImportGenerator'))"
DependsOnTargets="ResolveProjectReferences"
BeforeTargets="GenerateMSBuildEditorConfigFileShouldRun">
<PropertyGroup>
<LibraryImportGenerator_UseMarshalType>true</LibraryImportGenerator_UseMarshalType>
</PropertyGroup>
<!--
Define all of the configuration options supported for the LibraryImportGenerator.
To use, set an MSBuild property with the name of the option to `true`.
See OptionsHelper.cs for more information on usage.
-->
<ItemGroup>
<!--
Use the System.Runtime.InteropServices.Marshal type instead of
the System.Runtime.InteropServices.MarshalEx type when emitting code.
-->
<CompilerVisibleProperty Include="LibraryImportGenerator_UseMarshalType" />
<!--
Generate a stub that forwards to a runtime implemented P/Invoke stub instead
of generating a stub that handles all of the marshalling.
-->
<CompilerVisibleProperty Include="LibraryImportGenerator_GenerateForwarders" />

<ItemGroup Condition="'$(NetCoreAppCurrentTargetFrameworkMoniker)' == '$(TargetFrameworkMoniker)' and '$(IncludeLibraryImportGeneratorSources)' != 'false'">
</ItemGroup>
</Target>
<!-- These properies are defined by the MSBuild SDK but are used in the interop source generators' TFM calculations -->
<CompilerVisibleProperty Include="TargetFrameworkIdentifier" />
<CompilerVisibleProperty Include="TargetFrameworkVersion" />
</ItemGroup>

<Import Project="$(LibrariesProjectRoot)System.Runtime.InteropServices\gen\LibraryImportGenerator\Microsoft.Interop.LibraryImportGenerator.props" />
</Project>

This file was deleted.