diff options
author | Elinor Fung <elfung@microsoft.com> | 2022-03-16 06:05:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-16 06:05:50 +0300 |
commit | d2688883510318aa0114268930fb2022d3dc64cf (patch) | |
tree | 187dce6ec6afbcb180cac35f8ece1e1e8e457c37 /eng/generators.targets | |
parent | c3dbdea91835d67cc461b22125e652ad5063d746 (diff) |
Expose `LibraryImportAttribute` (#66434)
Diffstat (limited to 'eng/generators.targets')
-rw-r--r-- | eng/generators.targets | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/eng/generators.targets b/eng/generators.targets index 9ca826c5cc7..24c5c2db8d8 100644 --- a/eng/generators.targets +++ b/eng/generators.targets @@ -44,8 +44,12 @@ <ItemGroup Condition="'@(EnabledGenerators)' != '' and @(EnabledGenerators->AnyHaveMetadataValue('Identity', 'LibraryImportGenerator')) and '$(IncludeLibraryImportGeneratorSources)' == 'true'"> - <Compile Include="$(LibrariesProjectRoot)Common\src\System\Runtime\InteropServices\LibraryImportAttribute.cs" /> - <Compile Include="$(LibrariesProjectRoot)Common\src\System\Runtime\InteropServices\StringMarshalling.cs" /> + + <!-- Only add the following files if we are not on the latest TFM. --> + <Compile Condition="'$(NetCoreAppCurrentTargetFrameworkMoniker)' != '$(TargetFrameworkMoniker)'" + Include="$(CoreLibSharedDir)System\Runtime\InteropServices\LibraryImportAttribute.cs" /> + <Compile Condition="'$(NetCoreAppCurrentTargetFrameworkMoniker)' != '$(TargetFrameworkMoniker)'" + Include="$(CoreLibSharedDir)System\Runtime\InteropServices\StringMarshalling.cs" /> <!-- Only add the following files if we are on the latest TFM (that is, net7). --> <Compile Condition="'$(NetCoreAppCurrentTargetFrameworkMoniker)' == '$(TargetFrameworkMoniker)'" Include="$(LibrariesProjectRoot)Common\src\System\Runtime\InteropServices\GeneratedMarshallingAttribute.cs" /> |