I'm having a bit of a senior moment trying to get SQLite working on a new WPF project. I've recently written a bunch of Windows Store and Phone projects and always used the same neat SQLite-net implementation there, but now I can't seem to do that with my WPF app.
I've added SQLite-net through nuget, but I can't find a version of SQLite3.dll that I can add to the project. When I download it from SQLite.org I get the following error.
What am I doing wrong? All the tutorials I find tell me to use System.Data.Sqlite instead but I don't want to rewrite all my DAL code again
I got it working.
For anyone who's trying to do this - specifically, trying to get sqlite-NET to work on WPF, not just SQLite, you need to:
download the pre-compiled windows binary of sqlite3.dll from http://www.sqlite.org/download.html
copy that dll file into your bin folder
go to project properties > build and change the CPU type to x86 (there's no precompiled x64 version at time of writing)
You need to download and install an appropriate System.Data.SQLite setup package from http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki.
This will install the required SQLIte assemblies into your GAC and the design-time components for Visual Studio.
For .NET 4.5.1 (VS 2013) the current link is http://system.data.sqlite.org/downloads/1.0.92.0/sqlite-netFx451-setup-bundle-x86-2013-1.0.92.0.exe
For .NET 4.5 (VS 2012) the current link is http://system.data.sqlite.org/downloads/1.0.92.0/sqlite-netFx45-setup-bundle-x86-2012-1.0.92.0.exe
For .NET 4 (VS 2010) the current link is http://system.data.sqlite.org/downloads/1.0.92.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.92.0.exe
Once you do that you will be able to add required SQLite assembly references in your project.
Here is a screenshot of SQLite assemblies in Add Reference dialog:
Related
I have a solution with two projects (C# and U-SQL) to run in the Azure Data Factory. I have referenced microsoft.analytics to use some analytics functions.
After the VS update to 15.9.14 on July 9, 2019 the c# project was not building giving the error that the assembly is missing but it was not missing. If I clicked to the error it go away and recognize the assembly. Then I try to build again and same error appears.
So I check the dll and the version was the same as before update but after I opened it with dotPeek I saw that the assembly target framework was changed to 4.7.2.
My project is on 4.5 because of the official azure data factory documentation says that we can run projects only up to framework 4.5 so I can't upgrade to 4.7 or above.
You can see the difference of those dll.
Assemblies location:
C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise\Common7\IDE\PublicAssemblies
So to resolve the problem I froze those dll and added as external references to my project in order to compile and build it and it worked.
If I want to create a new U-SQL project I can only pick 4.7.2.
My question is, how I can run U-SQL projects and analytics assemblies on an framework that is still not supported in the azure data lake?
If the Data Lake now supports 4.7.2 why there is no documentation for it or at least something to let us know?
Is this an VS minor update with a bug?
So after some Microsoft tickets they don't know how to respond to this. They said to try run some methods that are only present in the 4.7.2 framework in the data lake.
So I tried those methods and the jobs didn't run for obvious reasons.
Conclusion:
VS migrated the U-SQL projects to 4.7.2 but we can't run custom c# code for this target framework in the Azure.
Data Lake Analytics runs only 4.5 as said in documentation.
For now our project will remain 4.5.
I am new to windows app development. I want to use OxyPlot in UWAP C++/Xaml project. I am able to use it in C# based project but not in C++/Xaml project. First I tried to add it using Nuget package manager but it didn't install. Then I followed this (https://social.msdn.microsoft.com/Forums/en-US/8b77c775-21e0-4b43-b9f3-fb3777c43212/adding-libraries-and-use-them?forum=winappswithnativecode). In this Windows runtime component (with OxyPlot) is created in C# and used in C++ project. Here I am able to build the project but app crashes saying OxyPlot (added in C# project) not found.
Can someone please guide me. Regards
This may not 100% apply but it should. I was not trying to do this: "Use OxyPlot in Windows Universal app c++/xaml project". But I was tyring to use OxyPlot in a C++ .Net class so that it could do somethings fast, and eventually pass things back to a C# Class or WPF form. The idea I needed to know was could I create an OxyPlot.DataPoint array in C++ then put it into a C# Double array or an List in C# fast. And I can do that now fast! I hope this approach might help someone here doing this. I don't know how easy it is to use this technique to be able to use the opti chart in a C++ app or not. But if the GUI is done in C# this approach works.
I was getting the error: "You are trying to install this package into a project that targets 'native,Version=v0.0', but the package does not contain
any assembly references or content files that are compatible with that framework." when I tried to install OptiPlot.WPF or the NuGet.Commandline.
This may not be a complete solution for everyone's needs, but it worked for me. I found a "cheatin" way of getting OptiPlot.WPF into a sample C++.Net project. I had a C# main program project in my solution - I installed the package there:
Install-Package OxyPlot.Wpf -Version 2.0.0
Then I copied the packages.config file and the packages folder from there to my C++ .Net Class Library Project. Then I edited the packages.config file and took something out that didn't apply, and I probably took out a package in packages that wasn't needed. Then I added my references in the C++ .Net Class Library Project to packages/OxyPlot.Wpf.2.0.0 folder.
Now I could use the OxyPlot inside of C++! Cool!
I need to handle bitcoin in my unity project
I tried to install some nuget packages to support that
like this for example : https://github.com/blockchain/api-v1-client-csharp
but I always get this error
Could not install package 'BlockchainAPI 2.0.0'. You are trying to
install this package into a project that targets
'.NETFramework,Version=v4.0', but the package does not contain any
assembly references or content files that are compatible with that
framework. For more information, contact the package author.
unfortunately - no current unity3d plugins that support bitcoin yet
any suggestions , solutions ?
The plugin is using .NET version that is > Unity's supported .NET version.
The easiest solution I know about is to download the project directly from the link you posted.Delete any file that is NOT a C# file(.cs). Extract those folders with the remaining files and put them in your Unity project. Now look for errors. If you find any script with an error or script that uses C# 4 classes, modify it and fix the errors by hand.
This is easier than trying to implement your own bitcoin API from scratch.
NOTE: The only reason I recommend this method is because I looked inside the project and there were no DLL files inside it. So it is possible to port it if there is no DLL file in the API. Assuming there were DLL files compile with C# 4, then that would be a problem.
There's a beta edition of Unity that now supports a newer Mono version, which can let you compile .NET 4.5.2 (or older) projects.
I recommend you Nicolas Dorier's NBitcoin library for this then.
At the moment I'm trying to launch empty app with cross-platform solution in Xamarin Studio.
I've tried make app with empty library project and shared library, both has same errors. Now unresolved problems are:
1) Build error:
Error XA5207: Please install package: 'Android Support Library' available in SDK installer. Java library file classes.jar doesn't exist. (XA5207) (*projectName*)
Error XA5207: Please install package: 'Android Support Library' available in SDK installer. Java library file libs/internal_impl-21.0.3.jar doesn't exist. (XA5207) (*projectName*)
This question didn't help me.
2) Some links says it could be because of old Mono.Android.Support.v4 component. My component version is 21.0.3.0. After clicking for update it says:
You are trying to install this package into a project that targets 'MonoAndroid,Version=v4.0', but the package does not contain any assembly references or content files that are compatible with that framework.
My Mono.Android assembly version is 0.0.0.0 and I dodn't know how to update it.
I've tried PCL project with PCL 4.5 - profile7. New projects builds normal, but after first project clean it gives me error about not found classes.jar file like described above. Another new PCL project still builds fine.
UPDATE
Error in PCL project occures not after clean - it occures with included Xamarin.Forms NuGet to Android project.
UPDATE
After rising target framework of android project to v4.0.3 I successfuly updated Mono.Android.Support.v4 component, but it still show me error about Please install package.
UPDATE
I'm using Windows 7 OS, same problem with all users including new user. But on another computer with Windows 8 it works. It is not a solution for me, but it can somehow help someone.
i think your java JDK and JRE not install properly and your path not set in your environment variable you must add your jdk path in that and if you are make application using cross platform then also add path SDK in your computer environmental variable. using CMD throw creating project.
I've an app in c# and it's working perfect with Sqlite 1.0.84.0 but I should update it to 1.0.89.0.
I replace the dll and some functionalities are not working any more. Im pretty sure that is something related with SQLite.Interop.dll but I don't know how to solve it. Any idea?
Thank you in advanced for the anwer.
I suspect there is a mixup on which dll goes where and how it gets copied to the working directory.
Instead of adding references to SQLite manually, you should add it and update it using its nuget package. The package adds the proper SQLite.dll and Interop.dll files for the current SQLite version and bitness (x86 or x64) and ensures the proper Interop dlls are copied to the debug directory (x86 or x64).
SQLite is a native library so you need to have the proper version for the OS you are targetting. System.Data.SQLite is a library built on top of the native dll, which communicates whith it using the Interop dll.