Tweaks to enable test-templates to build in VMR (#366)

* Tweaks to enable test-templates to build in VMR
- Correctly check for product build in restore-toolset.ps1
- Don't attempt to build acceptance tests solution if not building tests (single test csproj).

* Update Build.props

* Update Build.props

Update flag

* Update Build.props
This commit is contained in:
Matt Mitchell 2024-02-08 15:00:11 -08:00 коммит произвёл GitHub
Родитель 23a6d5c63f
Коммит 777cf69d17
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -5,6 +5,7 @@
<ProjectToBuild Include="$(MSBuildThisFileDirectory)..\template_feed\NetCoreTestTemplates.sln" />
<ProjectToBuild Include="$(MSBuildThisFileDirectory)..\Templates\MSTestTemplates.sln" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
<ProjectToBuild Include="$(MSBuildThisFileDirectory)..\WizardExtensions\WizardExtensions.sln" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
<ProjectToBuild Include="$(MSBuildThisFileDirectory)..\test\Microsoft.TestTemplates.Acceptance.Tests.sln" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
<!-- Contains only a single test project. Exclude if not building tests. Otherwise nuget will fail to find a project to restore -->
<ProjectToBuild Include="$(MSBuildThisFileDirectory)..\test\Microsoft.TestTemplates.Acceptance.Tests.sln" Condition="'$(DotNetBuildTests)' == 'true'" />
</ItemGroup>
</Project>

Просмотреть файл

@ -6,7 +6,7 @@ function InitializeCustomSDKToolset {
# The following frameworks and tools are used only for testing.
# Do not attempt to install them in source build.
if ($env:DotNetBuildFromSource -eq "true") {
if ($productBuild -or $properties -like "*DotNetBuildRepo=true*") {
return
}