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

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CustomTasksFolder>$(MSBuildThisFileDirectory)tasks/netstandard2.0/</CustomTasksFolder>
<CustomTasksAssembly>$(CustomTasksFolder)$(MSBuildThisFileName).dll</CustomTasksAssembly>
</PropertyGroup>
<UsingTask
TaskName="GenerateProxyNodesTask"
AssemblyFile="$(CustomTasksAssembly)"
/>
</Project>

View File

@@ -0,0 +1,3 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

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>

42
Resources.resx Normal file
View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AB0001Description" xml:space="preserve">
<value>Type names should not contain the company name.</value><comment>An optional longer localizable description of the diagnostic.</comment>
</data>
<data name="AB0001MessageFormat" xml:space="preserve">
<value>Type name '{0}' contains the company name</value><comment>The format-able message the diagnostic displays.</comment>
</data>
<data name="AB0001Title" xml:space="preserve">
<value>Type name contains the company name</value><comment>The title of the diagnostic.</comment>
</data>
<data name="AB0001CodeFixTitle" xml:space="preserve">
<value>Replace '{0}' with '{1}'</value><comment>The title of the code fix.</comment>
</data>
<data name="AB0002Description" xml:space="preserve">
<value>The speed must be lower than the Speed of Light.</value><comment>An optional longer localizable description of the diagnostic.</comment>
</data>
<data name="AB0002MessageFormat" xml:space="preserve">
<value>The specified speed '{0}' must be lower than the Speed of Light</value><comment>The format-able message the diagnostic displays.</comment>
</data>
<data name="AB0002Title" xml:space="preserve">
<value>The impossible speed</value><comment>The title of the diagnostic.</comment>
</data>
</root>

2
publish Normal file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
dotnet nuget push "$(ls -t ./bin/Debug/Polonium.Tasks.*.nupkg | head -n 1)" --source hangman-lab