SharedFxTests and TargetingPackTests tests are unable to find ASP.NET Core files on local Linux build
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
When we run the tests in our CI, the following tests fail:
```
Microsoft.AspNetCore.TargetingPackTests.PlatformManifestListsAllFiles
Microsoft.AspNetCore.TargetingPackTests.PackageOverridesContainsCorrectEntries
Microsoft.AspNetCore.TargetingPackTests.TargetingPackContainsListedAssemblies
Microsoft.AspNetCore.TargetingPackTests.FrameworkListContainsCorrectPaths
Microsoft.AspNetCore.TargetingPackTests.AssembliesAreReferenceAssemblies
Microsoft.AspNetCore.TargetingPackTests.FrameworkListContainsCorrectEntries
Microsoft.AspNetCore.TargetingPackTests.RefAssemblyReferencesHaveExpectedAssemblyVersions
Microsoft.AspNetCore.TargetingPackTests.FrameworkListContainsAnalyzerLanguage
Microsoft.AspNetCore.TargetingPackTests.RefAssembliesHaveExpectedAssemblyVersions
Microsoft.AspNetCore.SharedFxTests.SharedFrameworkContainsValidRuntimeConfigFile
Microsoft.AspNetCore.SharedFxTests.ItContainsVersionFile
Microsoft.AspNetCore.SharedFxTests.SharedFrameworkContainsValidDepsJson
Microsoft.AspNetCore.SharedFxTests.SharedFrameworkContainsExpectedFiles
Microsoft.AspNetCore.SharedFxTests.SharedFrameworkAssembliesHaveExpectedAssemblyVersions
Microsoft.AspNetCore.SharedFxTests.SharedFrameworkContainsListedAssemblies
Microsoft.AspNetCore.SharedFxTests.SharedFrameworkAssemblyReferencesHaveExpectedAssemblyVersions
```
Example test failure:
```
System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException : Could not find a part of the path '/home/tester/aspnetcore/.dotnet/packs/Microsoft.AspNetCore.App.Ref/9.0.0-ci/data/PlatformManifest.txt'.
```
The tests expect the shared framework files and targeting pack files to have been copied over to the DOTNET_ROOT.
That did not happen and leads to DirectoryNotFoundException/FileNotFoundException in the tests.
Our CI runs into the issue while executing all tests (`--test` on the `eng/build.sh` script).
This is a smaller reproducer:
```
./restore.sh
source activate.sh
cd src/Framework/test/
dotnet build
dotnet test
```
@dougbu @wtgodbe do you know what is missing to have the files copied over to DOTNET_ROOT by the time these tests run?
cc @omajid
Contributor guide
Assessment
This issue has not been assessed yet.