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

[release/3.1] Microsoft.Data.Sqlite: Set temp and data directory on UWP #20077

Merged
merged 1 commit into from
Mar 24, 2020

Conversation

bricelam
Copy link
Contributor

@bricelam bricelam commented Feb 26, 2020

Fixes #19754

Description

The native SQLite interop library we depend on (SQLitePCL.raw) made a breaking change to stop setting the temp and data directories on UWP. Our guidance was for users to manually set these in their application. If users don't set these and specify a relative database file in their connection string, they'll get a SQLite error:

unable to open database file

Customer Impact

Several customers are encountering the error without understanding why or how to fix it.

By reintroducing code to set these directories automatically for the user, it will lower the barrier to get started using Microsoft.Data.Sqlite and EF Core on UWP.

How found

Reported by multiple customers.

Test coverage

Manually verified that this works on UWP using both the version of SQLite that we include and winsqlite3.dll. Also verified that it works on .NET Native.

Regression?

Yes, from 2.2 to 3.0

Risk

Low. This is a no-op on all platforms besides UWP. There is a flag to disable the new behavior if it proves to be problematic.


namespace Microsoft.Data.Sqlite.Utilities
{
internal class ApplicationDataHelper
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, this is the same code we had in 1.1

@bricelam bricelam changed the title Microsoft.Data.SQLite: Set temp and data directory on UWP [release/3.1] Microsoft.Data.SQLite: Set temp and data directory on UWP Feb 26, 2020
@bricelam bricelam changed the title [release/3.1] Microsoft.Data.SQLite: Set temp and data directory on UWP [release/3.1] Microsoft.Data.Sqlite: Set temp and data directory on UWP Feb 26, 2020
@bricelam bricelam added this to the 3.1.x milestone Feb 26, 2020
@leecow leecow modified the milestones: 3.1.x, 3.1.4 Mar 5, 2020
@ajcvickers
Copy link
Member

Approved by tactics for 3.1.4. Wait for branch to open before merging.

@bricelam bricelam changed the base branch from release/3.1 to release/3.1.4 March 19, 2020 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants