Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElinor Fung <elfung@microsoft.com>2022-03-04 09:17:23 +0300
committerGitHub <noreply@github.com>2022-03-04 09:17:23 +0300
commita0635832f1c4cf02423b4cb40cb8611a4163a78d (patch)
tree1600cb01c0d92831b185e8aba5bb12d44a950362 /eng/generators.targets
parent20294957616061616e672b43f1d962460b7f4234 (diff)
Rename `DllImportGenerator` project to `LibraryImportGenerator` (#66029)
Diffstat (limited to 'eng/generators.targets')
-rw-r--r--eng/generators.targets40
1 files changed, 20 insertions, 20 deletions
diff --git a/eng/generators.targets b/eng/generators.targets
index 882affe1b25..7cd7b4ca935 100644
--- a/eng/generators.targets
+++ b/eng/generators.targets
@@ -1,18 +1,18 @@
<Project>
<PropertyGroup>
- <EnableDllImportGenerator Condition="'$(EnableDllImportGenerator)' == ''
- and '$(MSBuildProjectName)' == 'System.Private.CoreLib'">true</EnableDllImportGenerator>
- <IncludeDllImportGeneratorSources Condition="'$(IncludeDllImportGeneratorSources)' == ''">true</IncludeDllImportGeneratorSources>
+ <EnableLibraryImportGenerator Condition="'$(EnableLibraryImportGenerator)' == ''
+ and '$(MSBuildProjectName)' == 'System.Private.CoreLib'">true</EnableLibraryImportGenerator>
+ <IncludeLibraryImportGeneratorSources Condition="'$(IncludeLibraryImportGeneratorSources)' == ''">true</IncludeLibraryImportGeneratorSources>
</PropertyGroup>
<ItemGroup>
- <EnabledGenerators Include="DllImportGenerator" Condition="'$(EnableDllImportGenerator)' == 'true'" />
- <!-- If the current project is not System.Private.CoreLib, we enable the DllImportGenerator source generator
+ <EnabledGenerators Include="LibraryImportGenerator" Condition="'$(EnableLibraryImportGenerator)' == 'true'" />
+ <!-- If the current project is not System.Private.CoreLib, we enable the LibraryImportGenerator source generator
when the project is a C# source project that either:
- references System.Private.CoreLib, or
- references System.Runtime.InteropServices -->
- <EnabledGenerators Include="DllImportGenerator"
- Condition="'$(EnableDllImportGenerator)' == ''
+ <EnabledGenerators Include="LibraryImportGenerator"
+ Condition="'$(EnableLibraryImportGenerator)' == ''
and '$(IsSourceProject)' == 'true'
and '$(MSBuildProjectExtension)' == '.csproj'
and (
@@ -22,8 +22,8 @@
and @(ProjectReference->AnyHaveMetadataValue('Identity', '$(CoreLibProject)')))
or ('$(NetCoreAppCurrentTargetFrameworkMoniker)' == '$(TargetFrameworkMoniker)'
and '$(DisableImplicitAssemblyReferences)' == 'false'))" />
- <EnabledGenerators Include="DllImportGenerator"
- Condition="'$(EnableDllImportGenerator)' == ''
+ <EnabledGenerators Include="LibraryImportGenerator"
+ Condition="'$(EnableLibraryImportGenerator)' == ''
and '$(IsSourceProject)' == 'true'
and '$(MSBuildProjectExtension)' == '.csproj'
and ('$(TargetFrameworkIdentifier)' == '.NETStandard' or '$(TargetFrameworkIdentifier)' == '.NETFramework' or ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionLessThan($(TargetFrameworkVersion), '$(NetCoreAppCurrentVersion)'))))" />
@@ -31,9 +31,9 @@
<!-- Use this complex ItemGroup-based filtering to add the ProjectReference to make sure dotnet/runtime stays compatible with NuGet Static Graph Restore. -->
<ItemGroup Condition="'@(EnabledGenerators)' != ''
- and @(EnabledGenerators->AnyHaveMetadataValue('Identity', 'DllImportGenerator'))">
+ and @(EnabledGenerators->AnyHaveMetadataValue('Identity', 'LibraryImportGenerator'))">
<ProjectReference
- Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\gen\DllImportGenerator\DllImportGenerator.csproj"
+ Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\gen\LibraryImportGenerator\LibraryImportGenerator.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false" />
<ProjectReference
@@ -42,8 +42,8 @@
ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup Condition="'@(EnabledGenerators)' != ''
- and @(EnabledGenerators->AnyHaveMetadataValue('Identity', 'DllImportGenerator'))
- and '$(IncludeDllImportGeneratorSources)' == 'true'">
+ and @(EnabledGenerators->AnyHaveMetadataValue('Identity', 'LibraryImportGenerator'))
+ and '$(IncludeLibraryImportGeneratorSources)' == 'true'">
<Compile Include="$(LibrariesProjectRoot)Common\src\System\Runtime\InteropServices\GeneratedDllImportAttribute.cs" />
<Compile Include="$(LibrariesProjectRoot)Common\src\System\Runtime\InteropServices\StringMarshalling.cs" />
@@ -54,7 +54,7 @@
<Compile Condition="'$(NetCoreAppCurrentTargetFrameworkMoniker)' == '$(TargetFrameworkMoniker)'
and (
'$(MSBuildProjectName)' == 'System.Private.CoreLib'
- or '$(EnableDllImportGenerator)' == 'true'
+ or '$(EnableLibraryImportGenerator)' == 'true'
or ('@(Reference)' != ''
and @(Reference->AnyHaveMetadataValue('Identity', 'System.Memory')))
or ('@(ProjectReference)' != ''
@@ -75,18 +75,18 @@
</ItemGroup>
<Target Name="ConfigureGenerators"
- DependsOnTargets="ConfigureDllImportGenerator"
+ DependsOnTargets="ConfigureLibraryImportGenerator"
BeforeTargets="CoreCompile" />
- <!-- Microsoft.Interop.DllImportGenerator -->
- <Target Name="ConfigureDllImportGenerator"
- Condition="'@(EnabledGenerators)' != '' and @(EnabledGenerators->AnyHaveMetadataValue('Identity', 'DllImportGenerator'))"
+ <!-- Microsoft.Interop.LibraryImportGenerator -->
+ <Target Name="ConfigureLibraryImportGenerator"
+ Condition="'@(EnabledGenerators)' != '' and @(EnabledGenerators->AnyHaveMetadataValue('Identity', 'LibraryImportGenerator'))"
DependsOnTargets="ResolveProjectReferences"
BeforeTargets="GenerateMSBuildEditorConfigFileShouldRun">
<PropertyGroup>
- <DllImportGenerator_UseMarshalType>true</DllImportGenerator_UseMarshalType>
+ <LibraryImportGenerator_UseMarshalType>true</LibraryImportGenerator_UseMarshalType>
</PropertyGroup>
</Target>
- <Import Project="$(LibrariesProjectRoot)System.Runtime.InteropServices/gen/DllImportGenerator/Microsoft.Interop.DllImportGenerator.props" />
+ <Import Project="$(LibrariesProjectRoot)System.Runtime.InteropServices/gen/LibraryImportGenerator/Microsoft.Interop.LibraryImportGenerator.props" />
</Project>