Giter VIP home page Giter VIP logo

Comments (25)

1iveowl avatar 1iveowl commented on July 28, 2024 6

Bingo!

Below did the trick.

What happens if at a later stage that Microsoft.AppCenter references some later version of the two excluded packages? Will I need to maintain this or can I use wildcards like Version="*"?

  <ItemGroup>
    <PackageReference Include="Microsoft.AppCenter">
      <Version>1.1.0</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
      <Version>6.0.5</Version>
    </PackageReference>
    <PackageReference Include="sqlite-net-base">
      <Version>1.5.166-beta</Version>
    </PackageReference>
    <PackageReference Include="sqlite-net-pcl">
      <Version>1.3.1</Version>
      <ExcludeAssets>All</ExcludeAssets>
    </PackageReference>
        <PackageReference Include="SQLitePCLRaw.bundle_green">
      <Version>1.1.2</Version>
      <ExcludeAssets>All</ExcludeAssets>
    </PackageReference>
    <PackageReference Include="SQLitePCLRaw.bundle_sqlcipher">
      <Version>1.1.9</Version>
    </PackageReference>
  </ItemGroup>

from appcenter-sdk-dotnet.

1iveowl avatar 1iveowl commented on July 28, 2024 3

Version="*" test confirms this.

from appcenter-sdk-dotnet.

ElektrojungeAtWork avatar ElektrojungeAtWork commented on July 28, 2024 3

Hey @andrechi1,

We are tracking this feature request in our backlog but I cannot provide you with any info if/when we are working on this.

from appcenter-sdk-dotnet.

guperrot avatar guperrot commented on July 28, 2024 3

The AppCenter .NET SDK does not depend on sqlite-net-pcl anymore in version 3.0.0. It however depends on https://www.nuget.org/packages/SQLitePCLRaw.bundle_green/ version 2.0.2 (which is also a dependency of sqlite-net-pcl).

However sqlite-net-pcl users might need to use the beta of sqlite-net-pcl to be compatible with AppCenter: https://www.nuget.org/packages/sqlite-net-pcl/1.7.302-beta.

from appcenter-sdk-dotnet.

JKennedy24 avatar JKennedy24 commented on July 28, 2024 2

@1iveowl the way I got it working was to use Sqlite-Net-PCL and add a SqliteRaw.Bundle_Green reference and set ExcludeAssets on the SqliteRaw.Bundle_green package.

Let me know if that works

from appcenter-sdk-dotnet.

achocron avatar achocron commented on July 28, 2024 1

We don't have plans to release separate NuGet packages for these scenarios, but I think you can solve the issue at the project level using these instructions. (See the section about excluding references.)

from appcenter-sdk-dotnet.

1iveowl avatar 1iveowl commented on July 28, 2024 1

Yes, I'm using csproj. An no, making the change did not help. Maybe, I'm doing it wrong. I just don't know what the right way is then.

Just tried to create an all new blank UWP project.

The key part of the csproj looks like this:

  <ItemGroup>
    <PackageReference Include="Microsoft.AppCenter">
      <Version>1.1.0</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
      <Version>6.0.5</Version>
    </PackageReference>
    <PackageReference Include="sqlite-net-base">
      <Version>1.5.166-beta</Version>
    </PackageReference>
    <PackageReference Include="SQLitePCLRaw.bundle_sqlcipher">
      <Version>1.1.9</Version>
    </PackageReference>
    <PackageReference Include="sqlite-net-pcl" Version="1.3.1" Exclude="All" />
  </ItemGroup>

If I try and compile I get this error:

Severity Code Description Project File Line Suppression State
Error Payload contains two or more files with the same destination path 'SQLitePCLRaw.batteries_v2.dll'. Source files:
C:\Users\jaspe.nuget\packages\sqlitepclraw.bundle_green\1.1.2\lib\uap10.0\SQLitePCLRaw.batteries_v2.dll
C:\Users\jaspe.nuget\packages\sqlitepclraw.bundle_sqlcipher\1.1.9\lib\uap10.0\SQLitePCLRaw.batteries_v2.dll AppCenterSQLiteResearch

from appcenter-sdk-dotnet.

achocron avatar achocron commented on July 28, 2024 1

Just to give you an update- I have reproduced the issue on my end and can't seem to get the Exclude attribute to work. I'm still looking into this and will let you know when I have something.

from appcenter-sdk-dotnet.

JKennedy24 avatar JKennedy24 commented on July 28, 2024 1

Exclude attribute doesn't work. There is an error in the documentation, use ExcludeAssets see here: NuGet/Home#6399 (comment)

from appcenter-sdk-dotnet.

1iveowl avatar 1iveowl commented on July 28, 2024 1

Thank you @JKennedy24

I've change the csproj to this:

...
  <ItemGroup>
    <PackageReference Include="Microsoft.AppCenter">
      <Version>1.1.0</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
      <Version>6.0.5</Version>
    </PackageReference>
    <PackageReference Include="sqlite-net-base">
      <Version>1.5.166-beta</Version>
    </PackageReference>
    <PackageReference Include="sqlite-net-pcl">
      <Version>1.3.1</Version>
      <ExcludeAssets>All</ExcludeAssets>
    </PackageReference>
    <PackageReference Include="SQLitePCLRaw.bundle_sqlcipher">
      <Version>1.1.9</Version>
    </PackageReference>
  </ItemGroup>
...

However, unfortunately the error remains the same.

What I'm trying to accomplish here is to exclude sqlite-net-pcl and all of it's assets.

sqlite-net-pcl is a dependency that comes from Microsoft.AppCenter. However, in this project I want 'sqlite-net-base' + SQLitePCLRaw.bundle_sqlcipher to be the replacement of sqlite-net-pcl.

from appcenter-sdk-dotnet.

JKennedy24 avatar JKennedy24 commented on July 28, 2024 1

@1iveowl Thats a good question. I don't know the answer but I think using Version="*" may be the answer

from appcenter-sdk-dotnet.

andres-gimenez avatar andres-gimenez commented on July 28, 2024 1

This solution has been proposed for 8 months and there is no other better approach. Is SQLite-Net-base reliable? Who supports it?

from appcenter-sdk-dotnet.

deakjahn avatar deakjahn commented on July 28, 2024 1

No, although I don't say I exercise every single muscle of SQLite in my app. But reading, writing, transcations, all seem to work so far.

from appcenter-sdk-dotnet.

1iveowl avatar 1iveowl commented on July 28, 2024

I thought so too, specifically using the guidance in the section "Excluding references", however that didn't work for me.

Maybe, there is something I don't understand. Were you thing about "Excluding references" too in the reply?

from appcenter-sdk-dotnet.

achocron avatar achocron commented on July 28, 2024

Yeah that's what I meant. Are you using project.json, packages.config, or just csproj? And did the error change at all when you made the changes?

from appcenter-sdk-dotnet.

1iveowl avatar 1iveowl commented on July 28, 2024

Thank you.

from appcenter-sdk-dotnet.

JKennedy24 avatar JKennedy24 commented on July 28, 2024

@1iveowl I did get some trouble later on down the line using Version="* I'm not sure whether this is valid for nuget as outlined here: https://docs.microsoft.com/en-us/nuget/consume-packages/dependency-resolution#floating-versions.

It may be you can only use Version="1.*"

from appcenter-sdk-dotnet.

poumason avatar poumason commented on July 28, 2024

Hello,
Because my app already use
sqlite-net-base
SQLitePCLRaw.core
SQLitePCLRaw.provider.sqlite3.uwp10

I use the SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_sqlite3()); to init my local sqlite.
When I install App Center and call start method, VS got the exception on the code: SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_sqlite3());

from appcenter-sdk-dotnet.

Jamminroot avatar Jamminroot commented on July 28, 2024

Hey, @poumason, as of @ElektrojungeAtWork's comment, we have it tracked, but unfortunatelly no ETAs we can provide yet.
Also, just so you know, I've pinged our PMs today about same problem in App Center's portal intercom to bring this request to their attention again.

from appcenter-sdk-dotnet.

poumason avatar poumason commented on July 28, 2024

I use sqlite-net-pcl to replace :
sqlite-net-base
SQLitePCLRaw.core
SQLitePCLRaw.provider.sqlite3.uwp10

the issue be solved.

from appcenter-sdk-dotnet.

mklemarczyk avatar mklemarczyk commented on July 28, 2024

Windows Store rejects the publications because of usage e_sqlite.dll file.

from appcenter-sdk-dotnet.

deakjahn avatar deakjahn commented on July 28, 2024

Two years later, I've just added AppCenter to a perfectly functioning app and hey, presto, this error message.

(Using Microsoft.Data.Sqlite.Core with the dependency (SQLitePCLRaw.bundle_winsqlite3) that the MS documentation specifies to use on UWP.)

from appcenter-sdk-dotnet.

Zofware avatar Zofware commented on July 28, 2024

@deakjahn, if it helps here is the list of dependencies for my UWP app, including both AppCenter and SQLitePCLRaw.bundle_green, and they all seem to play nice with each other.

  <ItemGroup>
    <PackageReference Include="Microsoft.AppCenter.Analytics">
      <Version>4.1.0</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.AppCenter.Crashes">
      <Version>4.1.0</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.SourceLink.AzureRepos.Git">
      <Version>1.0.0</Version>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
      <Version>6.2.11</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.Toolkit.Uwp">
      <Version>6.1.1</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.Toolkit.Uwp.UI">
      <Version>6.1.1</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls">
      <Version>6.1.1</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.UI.Xaml">
      <Version>2.5.0</Version>
    </PackageReference>
    <PackageReference Include="morelinq">
      <Version>3.3.2</Version>
    </PackageReference>
    <PackageReference Include="Newtonsoft.Json">
      <Version>12.0.3</Version>
    </PackageReference>
    <PackageReference Include="PemUtils">
      <Version>3.0.0.82</Version>
    </PackageReference>
    <PackageReference Include="sqlite-net-pcl">
      <Version>1.7.335</Version>
    </PackageReference>
    <PackageReference Include="SQLiteNetExtensions">
      <Version>2.1.0</Version>
    </PackageReference>
    <PackageReference Include="SQLitePCLRaw.bundle_green">
      <Version>2.0.4</Version>
    </PackageReference>
    <PackageReference Include="System.IdentityModel.Tokens.Jwt">
      <Version>6.8.0</Version>
    </PackageReference>
    <PackageReference Include="System.Text.Json">
      <Version>5.0.0</Version>
    </PackageReference>
    <PackageReference Include="Telerik.UI.for.UniversalWindowsPlatform">
      <Version>1.0.1.9-z6</Version>
    </PackageReference>
    <PackageReference Include="Win2D.uwp">
      <Version>1.25.0</Version>
    </PackageReference>
    <PackageReference Include="WinPixEventRuntime">
      <Version>1.0.200127001</Version>
    </PackageReference>
  </ItemGroup>

from appcenter-sdk-dotnet.

deakjahn avatar deakjahn commented on July 28, 2024

Although you don't use Microsoft.Data.Sqlite.Core... But I also tried the green version and it seems to work for me, too, so I mentioned this in Eric's issue queue: ericsink/SQLitePCL.raw#229 He should be in a better position to judge what the real issue is.

from appcenter-sdk-dotnet.

russelarms avatar russelarms commented on July 28, 2024

Hi @deakjahn, do you still have any issues after switching to the green version?

from appcenter-sdk-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.