Skip to content

GivenThatWeHaveAPackageReferenceWithAliases tests failing in CI #39068

@ericstj

Description

@ericstj

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=581388
Build error leg or test failing: Microsoft.NET.Build.Tests.GivenThatWeHaveAPackageReferenceWithAliases.CanBuildProjectWithAPackageReferenceWithMultipleAliases
Pull request: #39066

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "error CS0118: 'First.A' is a namespace but is used like a type",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": true
}

Detailed error:

Expected command to pass but it did not.
File Name: /tmp/helix/working/A7A808BD/p/d/dotnet
Arguments: msbuild /t:Build /private/tmp/helix/working/A7A808BD/w/B3E1095E/e/testExecutionDirectory/CanBuildProje---B79B2BCA/Project/Project.csproj /restore
Exit Code: 1
StdOut:
MSBuild version 17.10.0-preview-24123-01+56c003594 for .NET
Determining projects to restore...
Restored /private/tmp/helix/working/A7A808BD/w/B3E1095E/e/testExecutionDirectory/CanBuildProje---B79B2BCA/Project/Project.csproj (in 1.06 sec).
/tmp/helix/working/A7A808BD/p/d/sdk/9.0.100-ci/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets(314,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [/private/tmp/helix/working/A7A808BD/w/B3E1095E/e/testExecutionDirectory/CanBuildProje---B79B2BCA/Project/Project.csproj]
/private/tmp/helix/working/A7A808BD/w/B3E1095E/e/testExecutionDirectory/CanBuildProje---B79B2BCA/Project/Project.cs(9,13): error CS0118: 'First.A' is a namespace but is used like a type [/private/tmp/helix/working/A7A808BD/w/B3E1095E/e/testExecutionDirectory/CanBuildProje---B79B2BCA/Project/Project.csproj]
/private/tmp/helix/working/A7A808BD/w/B3E1095E/e/testExecutionDirectory/CanBuildProje---B79B2BCA/Project/Project.cs(10,20): error CS0234: The type or namespace name 'B' does not exist in the namespace '<global namespace>' (are you missing an assembly reference?) [/private/tmp/helix/working/A7A808BD/w/B3E1095E/e/testExecutionDirectory/CanBuildProje---B79B2BCA/Project/Project.csproj]
StdErr:



Stack trace
   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(String message)
   at Microsoft.NET.TestFramework.Assertions.CommandResultAssertions.Pass() in /_/test/Microsoft.NET.TestFramework/Assertions/CommandResultAssertions.cs:line 29
   at Microsoft.NET.Build.Tests.GivenThatWeHaveAPackageReferenceWithAliases.CanBuildProjectWithAPackageReferenceWithMultipleAliases() in /_/test/Microsoft.NET.Build.Tests/GivenThatWeHaveAPackageReferenceWithAliases.cs:line 127

   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

It looks to me like this could be cross-talk between tests. I couldn't see what in these tests ensured that they used different project files, but that could just be that I am unfamiliar with the tests:

public void CanBuildProjectWithAPackageReferenceWithMultipleAliases()

#38268

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=581388
Error message validated: [error CS0118: 'First.A' is a namespace but is used like a type]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 2/27/2024 9:31:09 PM UTC

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions