this is my first post. I get this error
The processor architecture of the project being built "Any CPU" is not
supported by the referenced SDK "SQLite.WP80, Version=3.8.10.2".
Please consider changing the targeted processor architecture of your
project (in Visual Studio this can be done through the Configuration
Manager) to one of the architectures supported by the SDK: "x86, ARM".
while working in windows phone app and using SQLite. If I set the architecture to ARM then it will disappear but I got another error of missing "community" from namespace in SQLite.cs file. Any one can help me out? Thanks in advance.
follow this:
Install Extension "SQLite for Windows Phone" from Tools -> Extension and Updates Menu. check screenshot 1
Then Install NuGet Pacakge sqlite-net-wp8 from NuGet Package manager. check screenshot 2
then add Conditional Compilation symbol USE_WP8_NATIVE_SQLITE in Project properties -> Build settings. check screenshot 3
Then Try to ReBuild the solutions and the errors will be gone..!
(I assumed that you've already copied those two files SQLite.cs and SQLiteAsync.cs)
Reference Links:
http://social.technet.microsoft.com/wiki/contents/articles/18204.how-to-use-sqlite-with-a-windows-phone-8-application.aspx
Type or namespace 'Sqlite' could not be found in SQLite.cs
Related
I am developing a UWP. I am using the sqlite-net-pcl library. After upgrading my Application from RC to RTM , I got a runtime error - sqlite3.dll could not be found - if it runs on a Mobile emulator or a device. It worked prefectly after I added a reference to C++ 2013 Runtime Package and I ran it in Local Machine.
Exception Message:
Message "The type initializer for 'SQLitePCL.raw' threw an
exception." string
The innerexception message:
{"Unable to load DLL 'sqlite3': The specified module could not be
found. (Exception from HRESULT: 0x8007007E)"} System.Exception
{System.DllNotFoundException}
Of course I could not add a referece to 'Sqlite for Universal App Platform' because I am geting the following error
Severity Code Description Project File Line Error Payload contains
two or more files with the same destination path 'sqlite3.dll'. Source
files: C:\Program Files (x86)\Microsoft
SDKs\UAP\v0.8.0.0\ExtensionSDKs\SQLite.UAP.2015\3.8.11.1\Redist\Debug\ARM\sqlite3.dll
C:\Users\sMavrikis.nuget\packages\SQLitePCL.raw_basic\0.7.1\build\native\sqlite3_dynamic\winrt81\arm\sqlite3.dll TestApp1
Add a reference to 'SQLite for Universal App Platform'
This will trigger the error:
Payload contains two or more files with the same destination path 'sqlite3.dll'.
This error occurs because of different version of sqlite3.dll in both the locations marked by the error.
Resolve this error by simply copying
C:\Program Files (x86)\Microsoft SDKs\UAP\v0.8.0.0\ExtensionSDKs\SQLite.UAP.2015\3.8.11.1\Redist\Debug\ARM\sqlite3.dll
to
C:\Users\%USERNAME%\.nuget\packages\SQLitePCL.raw_basic\0.7.1\build\native\sqlite3_dynamic\winrt81\arm\sqlite3.dll
overwriting existing file.
Rebuild your project. It should compile now.
If you look at the two conflicting locations, one seems to be coming from a more official Microsoft extension for UWP, while the second is coming from a nuGet package.
When I encountered this error, I needed the functionality of the nuGet package, so I decided to keep it and drop the other reference. I right clicked on the project in the solution explorer and went to Add->Reference and then unchecked the reference to SQLite. Seemed less error prone than copying the file from one location to the other to me.
I was getting the same error messages. I had started by using SQLite-PCL which also required SQLite for Universal App Platform as a reference. Later I switched to SQLite.Net-PCL. That is when I got those errors. In researching a solution I found this page. It worked for a bit. Eventually I removed the Reference to SQLite for Universal App Platform and the errors went away.
late reply, but had the issue now; What fix it for me was to do Nuget Package update on all the project in the solution as one of the packages was still using the old reference and was pulling through to the Running project referencing the other project that was out of date.
I fixed a similar issue by selecting x64 or arm in the compiler configuration.
Error Payload contains two or more files with the same destination path 'e_sqlite3.dll'. Source files:
C:\Users\xleon.nuget\packages\SQLitePCLRaw.lib.e_sqlite3.v140\1.1.0\runtimes\win10-arm\native\e_sqlite3.dll
C:\Users\xleon.nuget\packages\sqlitepclraw.lib.e_sqlite3.v140\1.1.0\runtimes\win10-x86\native\e_sqlite3.dll
but this, of course, won´t allow you to run the emulator
Right-Click on the UWP Project and choose Properties.
And make sure the Solution Platform target matches the Project Platform target.
If they are different you will get the build error about copying files to the same destination with the same name (but different target platforms).
I managed to solve the disparity by putting a conditional in the UWP .csproj for including the SQLite dll
<SDKReference Include="SQLite.UWP.2015, Version=3.19.3" Condition="'$(Configuration)'=='Debug'">
<Name>SQLite for Universal Windows Platform</Name>
</SDKReference>
I needed to run with the UWP version for debugging, else my XAMl designer would blow up with "Can't find SQLite.dll..."
I created a windows universal app (windows 8.1 and windows phone 8.1 winrt) working with SQLite 3.8.7.4.
But with SQLite, nothing works ! (The type or namespace name 'SQLite' could not be found)
YES I have included SQLite in my references :
YES I tried to clean my project and to build it again,
But I have no result. Does anyone have any idea?
I tried to update SQLite to 3.8.7.4 version on an existing app and it works, so, i continue to search why.
P.S : I'm using .NET 4.5
I found the difference between my 2 projects :
In my existing app, there are 2 files : SQlite.cs and SQLiteAsync.cs
But these files are not created on the 2nd project, that's why i can't find SQlite reference on my class.
These files are included by installing "sqlite-net" package from nugget.
In universal app if you add this 2 files : SQlite.cs and SQLiteAsync.cs in the "Shared project" then you will automatically get the reference of SQlite libraries in both project..
Refer the following link and follow the steps mention it'll help you
http://www.codeproject.com/Articles/826602/Using-SQLite-as-local-database-with-Universal-Apps
SQlite.cs and
SQLiteAsync.cs.
These two files are also missing from my project and when I try to install SQLite-net visual studio give me error that it is already installed. I spend a lot of time on finding why it is not adding these files to my project. If you are also suffering from same problem just uninstall it then reinstall it will start working.
:)
I'm trying to create a Multi-device hybrid app that uses Typescript, WinJS, and a persistent local database. I've got it working to the point of rendering WinJS controls.
However, when I attempt to add WebSQL functionality according to the instructions for adding a Cordova plugin (go to config.xml file--> under plugins tab, check WebSQL Polyfill), it will no longer compile.
The compiler error is C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(1886,5): error MSB3774: Could not find SDK "SQLite.WinRT, Version=3.8.2". [C:\Users\Lee\Documents\JSApps\TurnstileTS\TurnstileTS\bld\Debug\platforms\windows8\CordovaApp.jsproj]
I have all the latest versions of the SQLite binaries (both Win8 and Win8.1). I realize that the plugin seems to depend on v3.8.2, so I tried to add the NuGet package using the command line:
install-package SQLitePCL -Version 3.8.2
This installed successfully, but the next set of messages was:
Unable to find a reference to the extension SDK SQLite for Windows Runtime.
Verify that the reference to the extension SDK SQLite for Windows Runtime has already been removed.
Uninstalling 'SQLitePCL 3.8.2.0'.
Successfully uninstalled 'SQLitePCL 3.8.2.0'.
Install failed. Rolling back...
This is driving me crazy. I'm normally a C# person, so I realize this might be something simple... but I can't even add a reference to a dll like some other stackoverflow suggestions state. When I right-click on the project and try to "Add Reference..." I get the error message:
Missing value for TargetPlatformWinMDLocation property.
...then nothing.
Any ideas?
[edit] I have Win8, Win8.1, WP8, WP8.1 version of SQLite 3.8.6 installed. I just tried building a Windows Phone version of the app and it works! However, Windows 8 won't build. I set it to x86 instead of AnyCPU and it doesn't change anything.
There's a very simple fix to this. For Windows 8, you need to have the VSIX packages for SQLite already installed. Please, note which version number you have installed! As of 10/26/14, I have 3.8.7 installed.
From your solution's folder in explorer, navigate to:
{solution folder}\JavaScript\{project name}\bld\Debug\platforms\windows8
Edit the project's jsproj file in a text editor and scroll down until you see the entries for SQLite.
<ItemGroup>
<SDKReference Include="SQLite.WinRT, Version=3.8.7" />
</ItemGroup>
Change the version number in your file to the actual version on your computer. The project will build with the WebSQL plugin enabled and will actually work. (I verified the database file created in local storage.)
NOTE - You must already have enabled the WebSQL plugin in the config.xml menu.
I've downloaded a website and in VS express open it through file => open website. When I press F5 to debug I get build errors:
The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft'
I guess I'm missing a reference but how come it works on the server? References for these projects can be found in the bin directory right?
Under website => start options => build I've set the following: "Build web site" and target framework ".net framework 4" this is the same as the server.
I guess it's looking for a dll that contains Microsoft.aspNet which probably is in totallyUnrelatedName.dll in the folder scratchYourHeadAndLookSomeMore
Could someone help me out and give me a clue as to why Microsoft.aspNet would be missing from my computer?
I'm tempted to quit this job since all projects are web projects without any documentation that won't run locally but do need major changes. Client has no problem to implement changes on the live site but I do.
Go to Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution.
Click on the Online Tab.
Search for Microsoft ASP.NET Identity Framework.
Install this package.
Rebuild Solution.
I guess I'm missing a reference but how come it works on the server? References for these projects can be found in the bin directory right?
Not if the used libraries are installed on the server. You might want to install them on your workstation too, or add the proper references (for example via NuGet) and do a bin-deploy.
On how to find out which libraries you're missing: find class names, not namespace names.
I had this error message too so I reinstalled all of my nuget packages again via the package manager console. Unfortunately this did not sort my issue and after loading up a completely separate project within a different solution to the one in which I was experencing: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' error, I noticed that it was occurring there too. This meant that there was an issue with my Visual Studio rather than a problem with individual packages or projects.
It turns out that my MEF Component Cache was corrupted - to fix this I deleted my Visual Studio's component model cache folder which can be found here:
%LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
Mads Kristensen has created a Clear MEF Component Cache Visual Studio extention which you may find useful:
Clear MEF Component Cache
i have the same issue, on mac vs 2019,
reinstall all Associated nuget of the error you get,
you caמ find them on simpale search on google "nuget + " for example "nuget AddNewtonsoftJson",
then go to "project > manage nuget packages" ...
I try all above solution but It did not resolve my issue.
If still you cannot resolve this following solution might help you
https://www.nuget.org/packages/DotNetOpenAuth.AspNet/
NuGet Installation:
Go to Tools -> NuGet Package Manager -> Package Manager Console
PM> Install-Package DotNetOpenAuth.AspNet
I have a Windows Phone 8 app that utilizes SQLite. The app has many database functions, and includes a sqlite database file which, upon running the app, is copied to the local folder and accessed. All of this worked with no problem until I first switched to release build, upon which it did not work.
I "fixed" this by deleting all NuGet references and .dll references and started over following the steps here:A Workaround to Use SQLite in a Windows Phone 8 Application
I am having a frustrating problem where, after switching from debug to release build, or vice versa, 'Sqlite' is once again no longer recognized.
I get the following errors:
The type or namespace name 'Sqlite' could not be found (are you missing a using directive or an assembly reference?)
These errors are coming from SQLite.cs, specifically these lines:
using Sqlite3 = Sqlite.Sqlite3;
using Sqlite3DatabaseHandle = Sqlite.Database;
using Sqlite3Statement = Sqlite.Statement;
How is this possible? I saw some similar questions on here, but all of them simply said to delete and re-add the references and the problem inexplicably goes away. This is not working for me.
Follow this article to configure your project. Also explained here
Second you will need to go to the GITHUB website and download the
code for SQLite-net-wp8. This is a c++ project you will need to
access a sqlite database.
Make you sure you set Conditional compilation symbols: USE_WP8_NATIVE_SQLITE and release is x86 or ARM.
Tested on VS Profesional 2013, Release build (x86, ARM)
Go thorough bellow link
Windows Phone 7 Native Database Programming via Sqlite Client for Windows Phone
Hope it will help you