You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are the errors encountered when we tried to enable building tests in VMR:
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(23,67): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(30,67): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(406,67): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(409,68): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(420,67): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(423,68): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(625,67): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(689,67): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\PrimitiveCollectionsQueryTestBase.cs(696,67): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\NorthwindWhereQueryTestBase.cs(1633,29): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\NorthwindWhereQueryTestBase.cs(1707,29): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\NorthwindAggregateOperatorsQueryTestBase.cs(950,49): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\NorthwindAggregateOperatorsQueryTestBase.cs(956,49): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\NorthwindAggregateOperatorsQueryTestBase.cs(1350,52): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\NorthwindAggregateOperatorsQueryTestBase.cs(1361,52): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\Query\GearsOfWarQueryTestBase.cs(5982,54): error CS0854: An expression tree may not contain a call or invocation that uses optional arguments [C:\git\dotnet\src\efcore\test\EFCore.Specification.Tests\EFCore.Specification.Tests.csproj]
For repro, add /p:DotNetBuildTests=true to your Windows VMR build command, i.e.: build -prepareMachine -c Release /p:TargetOS=windows /p:TargetArchitecture=x64 /bl /p:DotNetBuildTests=true
The text was updated successfully, but these errors were encountered:
This is a result of dotnet/runtime#110197, which adds an overload of MemoryExtensions.Contains that has an optional comparer parameter, but expression trees do not support optional parameters (in this repo we haven't yet updated to a version of the SDK which has this).
FYI I've submitted #35569 to temporary comment out the problematic tests and allow EF to build with the latest SDK - until we decide how to properly fix the situation.
roji
changed the title
Numerous failures while building efcore tests in VMR
Tests do not compile because of new Contains overload with an optional argument
Feb 10, 2025
Here are the errors encountered when we tried to enable building tests in VMR:
For repro, add
/p:DotNetBuildTests=true
to your Windows VMR build command, i.e.:build -prepareMachine -c Release /p:TargetOS=windows /p:TargetArchitecture=x64 /bl /p:DotNetBuildTests=true
The text was updated successfully, but these errors were encountered: