Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dotnet Build -t:Test with ReadyToRun currently not allowing project references and content references combined #30718

Open
ivdiazsa opened this issue Feb 18, 2023 · 1 comment
Labels
Area-ReadyToRun untriaged Request triage from a team member
Milestone

Comments

@ivdiazsa
Copy link
Member

Describe the bug

When trying to run tests by means of the dotnet build -t:Test command using R2R, one must exclude any content references (dll references for instance) in the csproj file. Otherwise, the SDK fails when building.

To Reproduce

cd /path/to/runtime/repo
./build.sh -s clr+libs -c Release
  • Move to one of the faulty tests location:
cd src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests
  • Now, looking at that specific test's csproj file (./System.Diagnostics.FileVersionInfo.Tests.csproj), you'll see at the bottom in line 55 that a dll is excluded from PublishReadyToRun:
<PublishReadyToRunExclude Include="System.Diagnostics.FileVersionInfo.TestAssembly.dll" />
  • Remove/Comment out that line and then run the test with R2R to trigger the bug:
dotnet build -c Release -t:Test -p:TestReadyToRun=true

Exceptions (if any)

/usr/local/share/dotnet/sdk/8.0.100-preview.1.23108.10/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(472,28): error MSB4094: "/path/to/runtime/repo/artifacts/bin/System.Diagnostics.FileVersionInfo.TestAssembly/Release/net8.0/System.Diagnostics.FileVersionInfo.TestAssembly.dll;/path/to/runtime/repo/artifacts/bin/System.Diagnostics.FileVersionInfo.TestAssembly/Release/net8.0/System.Diagnostics.FileVersionInfo.TestAssembly.dll" is an invalid value for the "CompilationEntry" parameter of the "RunReadyToRunCompiler" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem". [/path/to/runtime/repo/src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj::TargetFramework=net8.0-unix]

Further technical details

  • No IDE used to reproduce this bug, just a terminal.
  • I also got the bug to reproduce on Linux x64 (Ubuntu 20.04 LTS).
  • My dotnet --info output:
.NET SDK:
 Version:   8.0.100-preview.1.23108.10
 Commit:    5725657a6b

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  13.2
 OS Platform: Darwin
 RID:         osx.13-arm64
 Base Path:   /usr/local/share/dotnet/sdk/8.0.100-preview.1.23108.10/

Host:
  Version:      8.0.0-preview.1.23106.5
  Architecture: arm64
  Commit:       9f654effb1

.NET SDKs installed:
  6.0.405 [/usr/local/share/dotnet/sdk]
  7.0.102 [/usr/local/share/dotnet/sdk]
  8.0.100-preview.1.23108.10 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.13 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0-preview.1.23107.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0-preview.1.23106.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/usr/local/share/dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
@ivdiazsa ivdiazsa added this to the 8.0.1xx milestone Feb 18, 2023
@ivdiazsa
Copy link
Member Author

@marcpopMSFT marcpopMSFT added the untriaged Request triage from a team member label Mar 8, 2023
@marcpopMSFT marcpopMSFT modified the milestones: 8.0.1xx, 8.0.4xx Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-ReadyToRun untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

2 participants