-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
.Net: Enable unit tests to build and pass on .NET Framework #6326
Conversation
<IsTestProject>true</IsTestProject> | ||
<IsPackable>false</IsPackable> | ||
<NoWarn>$(NoWarn);CA2007,CA1861,VSTHRD111,SKEXP0001,SKEXP0010,SKEXP0020,SKEXP0040,SKEXP0050,SKEXP0060,SKEXP0070,SKEXP0110</NoWarn> | ||
<UserSecretsId>b7762d10-e29b-4bb1-8b74-b6d69a667dd4</UserSecretsId> | ||
<Nullable>annotations</Nullable> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is warning at the moment. Do we have to switch down to annotations?
@@ -1,5 +1,6 @@ | |||
// Copyright (c) Microsoft. All rights reserved. | |||
|
|||
#if NET // TODO: Tests fail with "Unable to load DLL 'duckdb': The specified module could not be found." on .NET Framework |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be related to this issue:
Giorgi/DuckDB.NET#151
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, looks like it's the issue, the duckdb tests work for me in net462 when executed using x64.
dotnet test -a x64 -f net462 --filter "SemanticKernel.Connectors.UnitTests.DuckDB.DuckDBMemoryStoreTests.CollectionsCanBeDeletedAsync"
@@ -1,5 +1,6 @@ | |||
// Copyright (c) Microsoft. All rights reserved. | |||
|
|||
#if NET // TODO: Tests fail with "Library e_sqlite3 not found" on .NET Framework |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems related to this issue and the linked issues:
ericsink/SQLitePCL.raw#252
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it's related to shadow copying and how SQLitePCLRaw.core.DLL is trying to load e_sqlite3.dll.
A workaround is referred to here, i.e. turn off shadow copying: dotnet/efcore#19396.
When shadow copying is enabled for xunit, SQLitePCLRaw.core.DLL tries to load e_sqlite3.dll from a path relative to where the shadow copied SQLitePCLRaw.core.DLL resides, but the shadow copy folder structure doesn't match the build output folder structure, so it fails to load the dll.
@stephentoub, bumping this up for you. We are doing a review of PRs and wanted to check if this is something you still wanted to complete or if you think it's something the team should pick up? |
Thanks, Matthew. I think it's still worth adding in such validation, but I'm not planning on pushing it forward right now. If someone else can spare a few cycles to land it, that'd be great. |
@dmytrostruk is going to continue this work, tracking with #8109 |
@dmytrostruk, in conjunction with #6323 and #6324, this enables all of the tests projects for .NET Framework, gets all of them building, and gets the unit tests passing for me locally.
Contributes to #6063