Remove ExcludeFromDotnetBuild from restore target, add nugetconfig for test

This commit is contained in:
Jackson Schuster 2024-04-01 13:55:14 -07:00
parent df7cd4ff54
commit 60306f3cbb
3 changed files with 12 additions and 3 deletions

View file

@ -117,10 +117,9 @@
Condition="'$(ShortStack)' != 'true' and '$(PortableBuild)' == 'true' and '$(PgoInstrument)' != 'true'" > Condition="'$(ShortStack)' != 'true' and '$(PortableBuild)' == 'true' and '$(PgoInstrument)' != 'true'" >
<MSBuild Projects="../../test/Microsoft.DotNet.UnifiedBuild.Tests/Microsoft.DotNet.UnifiedBuild.Tests.csproj" <MSBuild Projects="../../test/Microsoft.DotNet.UnifiedBuild.Tests/Microsoft.DotNet.UnifiedBuild.Tests.csproj"
Targets="Restore" Targets="Restore"
Properties="MSBuildRestoreSessionId=$([System.Guid]::NewGuid());ExcludeFromDotNetBuild=false" /> Properties="MSBuildRestoreSessionId=$([System.Guid]::NewGuid())" />
<MSBuild Projects="../../test/Microsoft.DotNet.UnifiedBuild.Tests/Microsoft.DotNet.UnifiedBuild.Tests.csproj" <MSBuild Projects="../../test/Microsoft.DotNet.UnifiedBuild.Tests/Microsoft.DotNet.UnifiedBuild.Tests.csproj"
Targets="Build" Targets="Build" />
Properties="ExcludeFromDotNetBuild=false" />
</Target> </Target>
<Target Name="GenerateRootFs" <Target Name="GenerateRootFs"

View file

@ -8,6 +8,10 @@
<VSTestLogger>console%3bverbosity=diagnostic;trx%3bverbosity=diagnostic%3bLogFileName=Microsoft.DotNet.UnifiedBuild.Tests.xml</VSTestLogger> <VSTestLogger>console%3bverbosity=diagnostic;trx%3bverbosity=diagnostic%3bLogFileName=Microsoft.DotNet.UnifiedBuild.Tests.xml</VSTestLogger>
<VSTestResultsDirectory>$(ArtifactsTestResultsDir)</VSTestResultsDirectory> <VSTestResultsDirectory>$(ArtifactsTestResultsDir)</VSTestResultsDirectory>
<VsTestUseMSBuildOutput>true</VsTestUseMSBuildOutput> <VsTestUseMSBuildOutput>true</VsTestUseMSBuildOutput>
<!-- DOTNET_ROOT is not set when running the test, so the testhost looks in the global installation location for preview framework assemblies, which aren't there -->
<!-- As a workaround, just publish self-contained to copy the framework assemblies from the local sdk -->
<SelfContained>true</SelfContained>
<RuntimeIdentifier>$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
</packageSources>
</configuration>