diff --git a/eng/pipelines/search-cache-pipeline.yml b/eng/pipelines/search-cache-pipeline.yml index d3da5712557a..4312a7de52d4 100644 --- a/eng/pipelines/search-cache-pipeline.yml +++ b/eng/pipelines/search-cache-pipeline.yml @@ -5,8 +5,8 @@ trigger: none # Trigger periodically instead. schedules: -- cron: 0 * * * * - displayName: Run every hour +- cron: 0 0 * * * + displayName: Run once a day branches: include: - main @@ -137,10 +137,14 @@ extends: -SkipNonVersionedFiles displayName: Install latest daily .NET version - - bash: > - $(Build.SourcesDirectory)/.dotnet/dotnet run --no-build - --project $(Build.SourcesDirectory)/tools/Microsoft.TemplateSearch.TemplateDiscovery/Microsoft.TemplateSearch.TemplateDiscovery.csproj - -- --basePath $(System.DefaultWorkingDirectory)/NugetDownloadDirectory --allowPreviewPacks -v --test --diff $(EnableDiffMode) + - bash: | + projectPath=$(Build.SourcesDirectory)/tools/Microsoft.TemplateSearch.TemplateDiscovery/Microsoft.TemplateSearch.TemplateDiscovery.csproj + netCurrent=$($(Build.SourcesDirectory)/.dotnet/dotnet msbuild $projectPath -getProperty:NetCurrent) + echo "Resolved NetCurrent: $netCurrent" + $(Build.SourcesDirectory)/.dotnet/dotnet run --no-build \ + --framework $netCurrent \ + --project $projectPath \ + -- --basePath $(System.DefaultWorkingDirectory)/NugetDownloadDirectory --allowPreviewPacks -v --test --diff $(EnableDiffMode) displayName: Run Cache Updater - task: CopyFiles@2 diff --git a/test/TemplateEngine/Microsoft.TemplateEngine.Mocks/MockTemplateInfo.cs b/test/TemplateEngine/Microsoft.TemplateEngine.Mocks/MockTemplateInfo.cs index 073b2f25524a..2b8ac3006918 100644 --- a/test/TemplateEngine/Microsoft.TemplateEngine.Mocks/MockTemplateInfo.cs +++ b/test/TemplateEngine/Microsoft.TemplateEngine.Mocks/MockTemplateInfo.cs @@ -92,10 +92,10 @@ public string ShortName public bool PreferDefaultName => _preferDefaultName; [Obsolete("Use ParameterDefinitionSet instead.")] - IReadOnlyDictionary ITemplateInfo.Tags => throw new NotImplementedException(); + IReadOnlyDictionary ITemplateInfo.Tags => null!; [Obsolete("Use ParameterDefinitionSet instead.")] - IReadOnlyDictionary ITemplateInfo.CacheParameters => throw new NotImplementedException(); + IReadOnlyDictionary ITemplateInfo.CacheParameters => null!; public IParameterDefinitionSet ParameterDefinitions {