fix: Enable tasks to generate proxy nodes

This commit is contained in:
h z
2025-02-10 15:20:57 +00:00
parent 8bf643f194
commit e80a2d9315
5 changed files with 116 additions and 8 deletions

View File

@@ -5,18 +5,36 @@
<IsPackable>true</IsPackable>
<Nullable>disable</Nullable>
<LangVersion>latest</LangVersion>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<RootNamespace>Polonium.Tasks</RootNamespace>
<AssemblyName>Polonium.Tasks</AssemblyName>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>0.0.9</Version>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<GenerateDependencyFile>true</GenerateDependencyFile>
<TargetsForTfmSpecificBuildOutput>
$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage
</TargetsForTfmSpecificBuildOutput>
<BuildOutputTargetFolder>build/tasks</BuildOutputTargetFolder>
<NoWarn>NU5100</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="17.12.6" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="17.12.6" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.0"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.3.0"/>
<PackageReference
Include="Microsoft.Build"
Version="17.12.6"
PrivateAssets="all"
/>
<PackageReference
Include="Microsoft.Build.Tasks.Core"
Version="17.12.6"
PrivateAssets="all"
/>
<PackageReference
Include="Microsoft.CodeAnalysis"
Version="4.12.0"
PrivateAssets="all"
/>
</ItemGroup>
<ItemGroup>
@@ -38,5 +56,37 @@
<AdditionalFiles Remove="AnalyzerReleases.Shipped.md" />
<AdditionalFiles Remove="AnalyzerReleases.Unshipped.md" />
</ItemGroup>
<ItemGroup>
<None
Include="Package\build\$(AssemblyName).targets"
Pack="true"
PackagePath="build"
/>
<None
Include="Package\build\$(AssemblyName).props"
Pack="true"
PackagePath="build"
/>
</ItemGroup>
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences">
<ItemGroup>
<BuildOutputInPackage
Include="@(ReferenceCopyLocalPaths)"
TargetPath="%(ReferenceCopyLocalPaths.DestinationSubPath)"
/>
</ItemGroup>
</Target>
<Target
Name="AddBuildDependencyFileToBuiltProjectOutputGroupOutput"
BeforeTargets="BuiltProjectOutputGroup"
Condition="'$(GenerateDependencyFile)' == 'true'"
>
<ItemGroup>
<BuiltProjectOutputGroupOutput
Include="$(ProjectDepsFilePath)"
TargetPath="$(ProjectDepsFileName)"
FinalOutputPath="$(ProjectDepsFilePath)"
/>
</ItemGroup>
</Target>
</Project>