System.Drawing namespace could not refer in windows phone 8.0 - windows-phone-8

How to Refer the system.Drawing namespace in windows phone8.0 application
some error occur
i need to call Bitmap class but its not work

I'm not sure there is either a System.Drawing namespace or Bitmap class in WP8. If you are looking for BitmapImage then it can be found in the System.Windows.Media.Imaging namespace.
Hope this helps.

Related

Houdini arm to x86 translation "Unsupported feature" error when using shared STL in Android NDK app

I created an Android Studio project from this sample NDK project provided by Google and changed a couple things so I could try to leverage Houdini arm to x86 translation:
In app/build.gradle I set abiFilters to armeabi-v7a.
In Application.mk I changed APP_ABI from all to armeabi-v7a so that x86 native libraries won't be created.
Also in Application.mk, I changed APP_STL from stlport_static to gnustl_shared.
You can see the modified code in this repo.
Then I ran the app in the BlueStacks emulator, which supports Houdini. I get the following error:
11-21 00:42:19.742 9947-9947/? D/houdini: [9947] Loading library(version: 4.0.8.45720 RELEASE)... successfully.
11-21 00:42:19.742 9947-9947/? D/houdini: [9947] Unsupported feature (ID:0x10600cae).
11-21 00:42:19.742 9947-9947/? D/houdini: [9947] Open Native Library /data/app-lib/com.sample.teapot-2/libTeapotNativeActivity.so failed.
...
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sample.teapot/com.sample.teapot.TeapotNativeActivity}: java.lang.IllegalArgumentException: Unable to load native library: /data/app-lib/com.sample.teapot-2/libTeapotNativeActivity.so
If I make APP_STL any of the supported values with shared I get this error, and with static it works fine. I'd like to get shared working, to solve this issue in React Native. Does shared STL not work with Houdini? Any workarounds?

'DbContextOptionsBuilder' does not contain a definition for 'UseSqlServer'

I am trying to create a Web API in VS 2015 Pro (Update 3) using C# and targeting .NET Core.
I am following this tutorial.
However, I am connecting to a MySQL database instead of an SQL Server database - not sure how much difference that makes...
Anyway, in the tutorial, I have to "Register my context with dependency injection" - so I have to add the following line to the ConfigureServices section of the Startup.cs file:
var connection = Configuration.GetConnectionString("DefaultConnection");
services.AddDbContext< Models.PropWorxContext > (options => options.UseSqlServer(connection));;
However, VS gives me the following error:
Error CS1061 'DbContextOptionsBuilder' does not contain a definition for 'UseSqlServer' and no extension method 'UseSqlServer' accepting a first argument of type 'DbContextOptionsBuilder' could be found (are you missing a using directive or an assembly reference?)
Any ideas why?
This is what the whole Startup.cs file looks like:
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace PropWorxAPI
{
public class Startup
{
public Startup(IHostingEnvironment env)
{
var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
.AddEnvironmentVariables();
Configuration = builder.Build();
}
public IConfigurationRoot Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddMvc();
var connection = Configuration.GetConnectionString("DefaultConnection");
services.AddDbContext< Models.PropWorxContext > (options => options.UseSqlServer(connection));
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
app.UseMvc();
}
}
}
I have also added the MySQL package using the Package Manager, so that my project.json file contains this entry:
*"MySql.Data.EntityFrameworkCore": "7.0.6-IR31"*
Any hints as to where I've gone wrong would be greatly appreciated, as I've spent all day trying to figure it out :( Thank you...
SqlServer is Microsoft Sql Server not MySql, to use SqlServer you would need the package "Microsoft.EntityFrameworkCore.SqlServer": "1.0.*".
If using MySql there is options.UseMySql
see this tutorial for more
I got this error as well whilst setting up a project using Sql Server for a database. In my case I had to add a using statement manually -
"using Microsoft.EntityFrameworkCore;" . It sounds a bit obvious but it threw me as Visual Studio wasn't adding the using statement via Quick Actions.
If you have already installed the "Microsoft.EntityFrameworkCore.SqlServer" package and using Ctrl + Space cannot give you any option, adding the "using Microsoft.EntityFrameworkCore" manually solved my issue.
missing package.This worked for me.
tools-NUget package-package manager-copy paste following install:
Install-Package Microsoft.EntityFrameworkCore.SqlServer -Version 3.1.1
While in your project folder type this into your command line:
dotnet add package Pomelo.EntityFrameworkCore.MySql -v 2.1.2
Install Sqllite/Sqlserver compact toolbox then create database if not created then change connectionstring in appsettings.json

Add date picker for WP8 in Cordova

I'm trying to call the native WP8 datepicker in a Cordova project.
Do I need a plugin for that?
The plugin should be only for WP8, for IOS and Android I want to use the native input.
I tried this one 'https://github.com/hypermurea/phonegap-wp8-datepicker-plugin' but it fails on compilation with the following error:
(Plugins\com.hypermurea.phonegap.wp8-datetimepicker-plugin\DateTimePickerTask.cs(83,17): error CS0246: The type or namespace name 'NavigationInTransition' could not be found (are you missing a using directive or an assembly reference?) [C:\Projectos\VS\NoesisWrapper\NoesisWrapper\bld\Debug\platforms\wp8\NoesisWrapper.csproj]
1>Plugins\com.hypermurea.phonegap.wp8-datetimepicker-plugin\DateTimePickerTask.cs(84,17): error CS0246: The type or namespace name 'NavigationOutTransition' could not be found (are you missing a using directive or an assembly reference?) [C:\Projectos\VS\NoesisWrapper\NoesisWrapper\bld\Debug\platforms\wp8\NoesisWrapper.csproj]
1>Plugins\com.hypermurea.phonegap.wp8-datetimepicker-plugin\DateTimePickerTask.cs(85,17): error CS0246: The type or namespace name 'IDateTimePickerPage' could not be found (are you missing a using directive or an assembly reference?) [C:\Projectos\VS\NoesisWrapper\NoesisWrapper\bld\Debug\platforms\wp8\NoesisWrapper.csproj])
I'm using VS2015 v14.0.22609.0, and added the WPToolkit to the project via NuGet.
You need to install windows phone toolkit. Please install it as mentioned in below link:
https://www.nuget.org/packages/WPtoolkit

Flash Develop invalid namespace with AIR 14.0

I'm using Flash Develop 4.6.2.5, and I cannot compile my app with AIR versions above 3.9.
I've tried with 4.0, 13.0 and 14.0
Packaging: dist\app.apk
project\application.xml: error 102:
Invalid namespace http://ns.adobe.com/air/application/14.0 APK setup creation
FAILED.
Here is all the procedures I've already did:
After some struggle here is the solution:
Switch the order of the PATH at SetupSDK.bat (line ~35):
Original:
:succeed
set PATH=%PATH%;%FLEX_SDK%\bin
Modified:
:succeed
set PATH=%FLEX_SDK%\bin;%PATH%
The problem should be related with something that I've installed in my system %PATH% which is having conflicts with something from %FLEX_SDK%, by switching the order you are forcing the packager to give preference to Flex SDK.

stage.mouseLock on AIR - Error #1056

I'm having a problem setting the stage.mouseLock property on AIR (3.2-3.4)
Compiling the following class in a FlashPlayer (11.2-11.4) Project works fine:
package
{
import flash.display.Sprite;
import flash.display.StageDisplayState;
import flash.events.KeyboardEvent;
public class Main extends Sprite
{
public function Main()
{
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
}
private function onKeyDown(event:KeyboardEvent):void
{
stage.displayState = StageDisplayState.FULL_SCREEN;
stage.mouseLock = true;
}
}
}
But when I try to compile the same class targeting AIR instead of FlashPlayer, the following error occurs:
Error #1056: Cannot create property mouseLock on flash.display.Stage.
I'm using AIR SDK Version: 3.4.0.2710 and FlashDevelop 4.1.0 as my IDE.
EDIT:
Even after a clean install of FlashDevelop, downloading Flex SDK, AIR SDK, FlashPlayerDebugger from scratch, the problem persists.
EDIT 2:
Thank you, TheDarkIn1978.
After adding the -swf-version=17 AND editing the application.xml to use the correct version (3.4) manually, it worked...
I'll try to find out if it is a bug in the latest FlashDevelop or AIR SDK (probably is in the FD)...
Your code is correct so i think you need to check to see if FlashDevelop is indeed targeting at least AIR SDK 3.2.
First, comment out the offending code and trace the runtime version in your constructor:
trace("AIR SDK Version: ", NativeApplication.nativeApplication.runtimeVersion);
This should output at least:
AIR SDK Version: 3.2.x.xxxx
If not, you should check which Flex SDK (with AIR) FlashDevelop is targeting:
Tools > Program Settings > AS3Context > Language > Installed Flex SDKs
If you're unsure which version you have or you are targeting a version earlier than AIR SDK 3.2, you can download the latest AIR SDK (pre-merged with Flex SDK) from Adobe's Gaming site (Download the Adobe® AIR® SDK), save it to disk and link its location to FlashDevelop.
[EDIT]
One last thing I forgot to mention: Make sure your project platform target is set to at least AIR 3.2 and that your project AIR SDK target settings aren't overriding your global AIR SDK target settings.
Project > Properties
[EDIT 2]
Try manually overriding the target swf version and assign it to version 17.
Project > Properties > Compiler Options > Advanced > Additional Compiler Options
Add the following to the compiler options array:
-swf-version=17