chore: reduce nuget package size by copying intellisense files before build (#4129)
This commit is contained in:
Родитель
4ad8e7ceab
Коммит
d93817ad54
|
@ -25,15 +25,17 @@
|
|||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<DocumentationFile>./LocalizedIntellisenseFiles/$(AssemblyName).xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<TfmSpecificPackageFile Include="LocalizedIntellisenseFiles\**\*.xml" Exclude="LocalizedIntellisenseFiles/$(AssemblyName).xml" PackagePath="/lib/$(TargetFramework)" />
|
||||
<Content Include="LocalizedIntellisenseFiles\**\*.xml" Exclude="LocalizedIntellisenseFiles/$(AssemblyName).xml" PackagePath="/content/LocalizedIntellisenseFiles" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<!-- The nuget package icon -->
|
||||
<None Include="..\README.md" Pack="true" PackagePath="" />
|
||||
<None Include="logo.png" Pack="true" PackagePath="" />
|
||||
|
||||
<Content Include="AntDesign.targets" PackagePath="build\$(PackageId).targets" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -83,7 +85,7 @@
|
|||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="OneOf" Version="2.1.155" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<AntDesignNugetLibRoot>$(MSBuildThisFileDirectory)..\lib</AntDesignNugetLibRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--only copy at debug mode-->
|
||||
<Target Name="_CopyAntDesignLocalizedIntellisenseFiles"
|
||||
BeforeTargets="BeforeBuild"
|
||||
Condition="'$(Configuration)' == 'Debug'"
|
||||
Inputs="$(MSBuildThisFileDirectory)..\content\LocalizedIntellisenseFiles\**\*.xml"
|
||||
Outputs="$(AntDesignNugetLibRoot)\netstandard2.1\**\*.xml;$(AntDesignNugetLibRoot)\net5.0\**\*.xml;$(AntDesignNugetLibRoot)\net6.0\**\*.xml;$(AntDesignNugetLibRoot)\net7.0\**\*.xml;$(AntDesignNugetLibRoot)\net8.0\**\*.xml">
|
||||
<ItemGroup>
|
||||
<LocalizedIntellisenseFilesSourceFiles Include="$(MSBuildThisFileDirectory)..\content\LocalizedIntellisenseFiles\**\*.xml" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--add tfms-->
|
||||
<Copy SourceFiles="@(LocalizedIntellisenseFilesSourceFiles)" DestinationFolder="$(AntDesignNugetLibRoot)\netstandard2.1\%(RecursiveDir)" SkipUnchangedFiles="true" ContinueOnError="true" />
|
||||
<Copy SourceFiles="@(LocalizedIntellisenseFilesSourceFiles)" DestinationFolder="$(AntDesignNugetLibRoot)\net5.0\%(RecursiveDir)" SkipUnchangedFiles="true" ContinueOnError="true" />
|
||||
<Copy SourceFiles="@(LocalizedIntellisenseFilesSourceFiles)" DestinationFolder="$(AntDesignNugetLibRoot)\net6.0\%(RecursiveDir)" SkipUnchangedFiles="true" ContinueOnError="true" />
|
||||
<Copy SourceFiles="@(LocalizedIntellisenseFilesSourceFiles)" DestinationFolder="$(AntDesignNugetLibRoot)\net7.0\%(RecursiveDir)" SkipUnchangedFiles="true" ContinueOnError="true" />
|
||||
<Copy SourceFiles="@(LocalizedIntellisenseFilesSourceFiles)" DestinationFolder="$(AntDesignNugetLibRoot)\net8.0\%(RecursiveDir)" SkipUnchangedFiles="true" ContinueOnError="true" />
|
||||
</Target>
|
||||
</Project>
|
Загрузка…
Ссылка в новой задаче