1010 <!-- If we are going to merge files, we need to copy local -->
1111 <CopyLocalLockFileAssemblies Condition =" '$(MergeAnalyzerAssemblies)' == 'true'" >true</CopyLocalLockFileAssemblies >
1212
13- <!-- Read public key we validate manifests against -->
14- <DevloopedJwk >$([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)SponsorLink/devlooped.pub.jwk'))</DevloopedJwk >
15-
1613 <!-- Default funding product the Product, which already part of ThisAssembly -->
1714 <FundingProduct Condition =" '$(FundingProduct)' == ''" >$(Product)</FundingProduct >
1815 <!-- Default prefix is the joined upper-case letters in the product name (i.e. for ThisAssembly, TA) -->
2219 </PropertyGroup >
2320
2421 <ItemGroup >
25- <AssemblyMetadata Include =" Funding.GitHub.devlooped" Value =" $(DevloopedJwk)" />
2622 <Constant Include =" Funding.Product" Value =" $(FundingProduct)" />
2723 <Constant Include =" Funding.Prefix" Value =" $(FundingPrefix)" />
2824 <Constant Include =" Funding.Grace" Value =" $(FundingGrace)" />
123119 <!-- <ILRepackArgs>$(ILRepackArgs) "/lib:$(NetstandardDirectory)"</ILRepackArgs> -->
124120 <!-- This is needed for ilrepack to find netstandard.dll, which is referenced by the System.Text.Json assembly -->
125121 </PropertyGroup >
126- <Exec Command =" " $(ILRepack)" $(ILRepackArgs)" WorkingDirectory =" $(MSBuildProjectDirectory)\$(OutputPath)" StandardErrorImportance =" high" StandardOutputImportance =" low" ConsoleToMSBuild =" true" ContinueOnError =" true" >
122+ <Exec Command =' " $(ILRepack)" $(ILRepackArgs)' WorkingDirectory =" $(MSBuildProjectDirectory)\$(OutputPath)" StandardErrorImportance =" high" IgnoreStandardErrorWarningFormat = " true " StandardOutputImportance =" low" ConsoleToMSBuild =" true" ContinueOnError =" true" >
127123 <Output TaskParameter =" ConsoleOutput" PropertyName =" ILRepackOutput" />
128124 <Output TaskParameter =" ExitCode" PropertyName =" ExitCode" />
129125 </Exec >
138134 <Delete Files =" @(MergedAssembliesToRemove -> '$(MSBuildProjectDirectory)\$(OutputPath)%(Filename)%(Extension)')" Condition =" Exists('$(MSBuildProjectDirectory)\$(OutputPath)%(Filename)%(Extension)')" />
139135 </Target >
140136
137+ <Target Name =" DownloadDevloopedJwk" BeforeTargets =" GetAssemblyAttributes" Inputs =" $(MSBuildProjectFullPath)" Outputs =" $(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)devlooped.jwk" >
138+ <Exec Command =' pwsh -nop -f "$(MSBuildThisFileDirectory)jwk.ps1"' ConsoleToMSBuild =" true" EchoOff =" true" >
139+ <Output TaskParameter =" ConsoleOutput" PropertyName =" RawJwk" />
140+ <Output TaskParameter =" ExitCode" PropertyName =" MSBuildLastExitCode" />
141+ </Exec >
142+ <Error Text =" $(RawJwk)" Condition =" '$(MSBuildLastExitCode)' != '0'" />
143+ <WriteLinesToFile File =" $(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)devlooped.jwk" Lines =" $(RawJwk)" Overwrite =" true" />
144+ </Target >
145+
146+ <Target Name =" ReadDevloopedJwk" DependsOnTargets =" DownloadDevloopedJwk" BeforeTargets =" GetAssemblyAttributes" >
147+ <PropertyGroup >
148+ <!-- Read public key we validate manifests against -->
149+ <DevloopedJwk >$([System.IO.File]::ReadAllText('$(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)devlooped.jwk'))</DevloopedJwk >
150+ </PropertyGroup >
151+ <ItemGroup >
152+ <AssemblyMetadata Include =" Funding.GitHub.devlooped" Value =" $(DevloopedJwk)" />
153+ </ItemGroup >
154+ </Target >
155+
141156</Project >
0 commit comments