portable-class-library

Portable Class Library not supporting many VB methods

帅比萌擦擦* 提交于 2019-12-11 06:51:40
问题 I'm taking a VB.Net DLL and turning it into a Portable Class Library. Once I got all of the classes moved into the new project for the PCL, Visual Studio started throwing errors for a lot of common VB syntax that I thought would still work just fine. Some examples: LCase InStr Left Mid On Error GoTo 0 Err Is it possible there is just some option or include I need to have to get these to work? 回答1: When using portable to target the down-level platforms (.NET 4.0, Silverlight, Windows Phone,

Connecting MVVMCross Portable connect to WCF DataService. Is it possible?

ぃ、小莉子 提交于 2019-12-11 06:38:19
问题 I need your advice people. I am writing an engineering work project in VS2012 about used car dealership. I have a SQL Database, WCF DataService, WPF application (which is connected succesfuly to WCF) and wanted to create Mobile version for it too. I chose MVVMCross Portable to create Mono For Android and WP7 app with one core. And I have problems here with connecting to my WCF DataService from mobile portable core like: Unable to add a service reference to the specified OData feed because WCF

Xamarin forms: Custom Fonts in UWP and Windows 8.1

假装没事ソ 提交于 2019-12-11 06:08:20
问题 I am developing an app in which I am using a font.otf file. My app will run on android, ios, windows 10 and windows 8.1. I need to create styles for my labels to set font family. For android and ios I referenced this link I tried in xaml page like this- <Label.FontFamily> <OnPlatform x:TypeArguments="x:String"> <OnPlatform.iOS></OnPlatform.iOS> <OnPlatform.Android>Lobster-Regular.ttf#Lobster-Regular</OnPlatform.Android> <OnPlatform.WinPhone></OnPlatform.WinPhone> </OnPlatform> </Label

PCL HttpWebRequest User-Agent on WPF

感情迁移 提交于 2019-12-11 05:53:04
问题 I'm using a PCL on a project of mine that does alot of WebRequests. I have to set a UserAgent or my API won't accept the call. This is fine in Windows Phone 8 and Windows 8 because the HttpWebRequest has a Headers property so you can just do: var request = (HttpWebRequest)WebRequest.Create(cUrlLogin); request.Headers[HttpRequestHeader.UserAgent] = cUserAgent; request.Headers[HttpRequestHeader.Referer] = cUrlHalo; But in Windows Forms and WPF, I need to use the method to set it, before I just

'System.ComponentModel.INotifyPropertyChanging' in two places with MVVMLight Portable libraries

百般思念 提交于 2019-12-11 04:07:42
问题 I get this fun error when I try adding a local database to my Windows Phone 8 project. The type 'System.ComponentModel.INotifyPropertyChanging' exists in both 'e:\users\keenan\Documents\Visual Studio 2012\Projects\MAL.WindowsPhone\packages\Portable.MvvmLightLibs.4.1.27.1\lib\wp8\GalaSoft.MvvmLight.dll' and 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhone\v8.0\System.dll' Why is System.ComponentModel.INotifyPropertyChanging in the WP8 libraries of the MVVM Portable

xamarin securestring equivalent in PCL

不打扰是莪最后的温柔 提交于 2019-12-11 03:18:00
问题 SecureString is not friendly with PCL.I Know this problem can be worked around using dependency injection But I don't want to do that instead I would like to use something in PCL that would be equivalent to SecureString. But so far I am not able to find any other class or framework. 回答1: System.Security.* is mostly not present in any Portable Class Library profile. You might be able to find this in some of the higher versions of .NET Standard, which provide a much bigger subset of .NET. You

Reference Azure Mobile .NET Server SDK NUGET in PCL so I can have models in PCL

别等时光非礼了梦想. 提交于 2019-12-11 01:06:35
问题 I am trying to create a mobile app for windows and andriod that utilizes azure mobile app service (Azure Mobile Apps NOT Mobile services). I would like to have my models in a PCL and use them in all of my projects. However, the azure service expects the models to inherit from EntityData, which is found in the Microsoft.Azure.Mobile.Server.Entity package. When I try to install that package on the PCL project I get the following error: Error Could not install package 'Microsoft.Azure.Mobile

Add a reference to a class library which target .NET standard 2.0 to a Xamarin PCL which targets .NET Standard 4.5

时光怂恿深爱的人放手 提交于 2019-12-11 01:03:45
问题 I am building a Xamarin application and I have my shared code in a PCL which targets the .NET 4.5 framework. I also have a library, which basically implements the service access layer of my Xamarin application in another library, which targets .NET standard 2.0. The problem is that when I try to reference the latter, Visual Studio gives me the following error: Project [Service access library] targets '.NETStandard,Version=v2.0'. It cannot be referenced by a project that targets '.NETPortable

MvvmLight in Portable Class Library - How to do Unit Testing

守給你的承諾、 提交于 2019-12-11 00:44:35
问题 I'm working on the windows store application and I met one big problem. I described my solution architecture some time ago in this question. I added MvvmLight to my portable class library containing the presentation logic and afterwards I tried to write unit tests to one of my ViewModel inherited from ViewModelBase (from MvvmLight). Problem is, that portable class library has referenced MvvmLight package of another version like in the classical UnitTest .NET 4.5 class library and that means I

Store PKCS#12 Container (pfx) with Bouncycastle

假装没事ソ 提交于 2019-12-11 00:21:56
问题 I am struggling with the creation of a pfx file with Xamarin and BouncyCastle. I have the following settings/ specification .NET: PCL .Net Framework 4.5.1 Xamarin: 4.5.0.476 BouncyCastle: BouncyCastle-Signed 1.7.0.1 (NuGet Package) I want to generate a Self-Signed Certificate for my mobile client to autheniticate itself against my server. The creation works pretty well using BouncyCastle. My problem is, when I want to store the certificate with its private key as a PKCS#12 (pfx) container and