[Build][Installer]Fix NU1503 build warnings (#33938)

## Summary of the Pull Request

This PR aims for fix some CI build warnings.
## Detailed Description of the Pull Request / Additional comments

### Warning NU1503
Fix warning NU1503 for wix toolset projects marking them as restorable
and adding an empty restore target.
### No test result files matching '[ '**/*.trx' ]' were found.
Skip publishing of test results for ARM64 since pipeline isn't running
ARM64 tests

![image](https://github.com/user-attachments/assets/10a64ca2-2bff-42a8-ade9-07bd5ad88e3c)
This commit is contained in:
Davide Giacometti 2024-07-24 17:49:08 +02:00 committed by GitHub
parent 7479ef6e65
commit 0a9e889b1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 1 deletions

View File

@ -246,7 +246,7 @@ steps:
inputs:
testResultsFormat: VSTest
testResultsFiles: '**/*.trx'
condition: always()
condition: ne(variables['BuildPlatform'],'arm64')
# Native dlls
- task: VSTest@2

View File

@ -76,4 +76,12 @@
<Error Condition="!Exists('..\wix.props')"
Text="$([System.String]::Format('$(ErrorText)', '..\wix.props'))" />
</Target>
<!-- Prevents NU1503 -->
<Target Name="_IsProjectRestoreSupported" Returns="@(_ValidProjectsForRestore)">
<ItemGroup>
<_ValidProjectsForRestore Include="$(MSBuildProjectFullPath)" />
</ItemGroup>
</Target>
<Target Name="Restore" />
</Project>

View File

@ -185,4 +185,12 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
<Target Name="BeforeBuild">
<HeatDirectory Directory="..\..\src\common\FilePreviewCommon\Assets\Monaco\monacoSRC" PreprocessorVariable="var.MonacoSRCHarvestPath" OutputFile="MonacoSRC.wxs" ComponentGroupName="MonacoSRCHeatGenerated" DirectoryRefId="MonacoPreviewHandlerMonacoSRCFolder" AutogenerateGuids="false" GenerateGuidsNow="true" ToolPath="$(WixToolPath)" RunAsSeparateProcess="true" SuppressFragments="false" SuppressRegistry="false" SuppressRootDirectory="true"/>
</Target>
<!-- Prevents NU1503 -->
<Target Name="_IsProjectRestoreSupported" Returns="@(_ValidProjectsForRestore)">
<ItemGroup>
<_ValidProjectsForRestore Include="$(MSBuildProjectFullPath)" />
</ItemGroup>
</Target>
<Target Name="Restore" />
</Project>