portable-class-library

How to load portable .NET library within Iron Python script?

被刻印的时光 ゝ 提交于 2019-12-06 03:20:23
问题 I have serious troubles loading a portable .NET library (to be used in standard .NET and Silverlight environment) from a Python script. .NET DLL file version is 4.0.3.319.233 (System.Core.DLL), IronPython is 2.7.1, running in 32bit/x86 mode. Visual Studio 2010 with C# under .NET 4. Microsoft .NET update KB2468871 for Portable library usage is also installed (Version 2). If I try to load the library from the Python script: clr.AddReferenceToFileAndPath(UsedPath+"\\MyNamespace\

Visual Studio 2015 + Xamarin + Native Portable PCL + WCF

老子叫甜甜 提交于 2019-12-06 01:39:03
So our enterprise is going the Xamarin route using Visual Studio. Going through all the documentation online showed that it should be Trivial to create WCF proxy client out of a web service and place it in the PCL. After Struggling and trying to figure out why I couldn't compile the PCL using the SLSVcUtil.exe generated classes or why the "Add Service Reference" menu item was missing i gave up and downloaded the sample projects. Turns out what I was missing all along was the target profile for the PCL. With Visual Studio 2015 + Xamarin, the default profile was set to 111. Profile 111 as it

Xamarin Forms PCL - clean and easy way for a webrequest?

一个人想着一个人 提交于 2019-12-05 20:25:56
I am building an Android/iOS xamarin forms app with a portable class library. I am looking for the best way to do this example inside the PCL project: https://msdn.microsoft.com/en-us/library/456dfw4f(v=vs.110).aspx using System; using System.IO; using System.Net; using System.Text; namespace Examples.System.Net { public class WebRequestGetExample { public static void Main () { // Create a request for the URL. WebRequest request = WebRequest.Create ( "http://www.contoso.com/default.html"); // If required by the server, set the credentials. request.Credentials = CredentialCache

How to work with Portable Class Library and EF Code-first?

我只是一个虾纸丫 提交于 2019-12-05 20:25:50
问题 I'm doing an Windows Phone app where I have a WebApi running in Azure. I'm using the new "Portable Class Library" (http://msdn.microsoft.com/en-us/library/gg597391.aspx) for my "Models" project which is of cause shared between my WebApi project (this is a normale ASp.NET MVC 4 project) and my Windows Phone project. This works great and the model (POCO) classes are serialized and deserialized just as I want. Now I want to start storing some of my Models/POCO objects and would like to use EF

Secure WCF binding in a Portable class library with Xamarin

左心房为你撑大大i 提交于 2019-12-05 18:23:01
I have a WCF service that has a WSHttpBinding . Unfortunately in my PCL for some reason I cannot use WSHttpBinding . I can only use BasicHttpBinding . Is there a way that I can use a secure binding in a portable class library? I am using Xamarin. from Here I read about transport security: Transport Security When using transport security, the user credentials and claims are passed by using the transport layer. In other words, user credentials are transport-dependent, which allows fewer authentication options compared to message security. Each transport protocol (TCP, IPC, MSMQ, or HTTP) has its

Why can't I use await keyword in my Windows Phone 7.1 MvvmCross project while using the Microsoft.Bcl - cannot await 'System.Threading.Tasks.Task?

吃可爱长大的小学妹 提交于 2019-12-05 18:17:11
I am unable to use the await keyword in my MvvmCross Windows Phone 7.1 project while using the Microsoft.Bcl "Microsoft BCL Portability Pack". I have posted the code for the sample project that I describe below on GitHub and the await error occurs on this line . When I try to build the third "Core" Windows Portable Class Library (PCL) that contains the FirstViewModel, I get the errors of: Type System.Threading.Tasks.Task<string> not awaitable under VS red squiggles, and Cannot await 'System.Threading.Tasks.Task<string>' when building. There are four projects in the solution: A Windows Portable

SQLite net PCL - Simple select

孤街浪徒 提交于 2019-12-05 17:02:57
问题 I use SQLite from windows app and now I am developing in Xamarin a portable app so I am using the plugin sqlite net pcl and I am having great trouble to understand how it works. I have a table that is created by te following: public class Config { public string IP { get; set; } [SQLite.Net.Attributes.Default(true, "Client 2")] public string ID { get; set; } } and to create the table: db.CreateTable<Model.Config>(); Problem: Now I want to select the value in ID column and I do the following:

How does the C# compiler decide to emit retargetable assembly references?

被刻印的时光 ゝ 提交于 2019-12-05 14:32:04
问题 Retargetable assembly references have been introduced for the .NET Compact Framework and are now used to support Portable Class Libraries. Basically, the compiler emits the following MSIL: .assembly extern retargetable mscorlib { .publickeytoken = (7C EC 85 D7 BE A7 79 8E ) .ver 2:0:5:0 } How does the C# compiler understand it has to emit a retargetable reference, and how to force the C# compiler to emit such reference even outside of a portable class library? 回答1: For the assembly itself, it

Create a SQLite Database in Windows Phone 8.1 Class Library

喜夏-厌秋 提交于 2019-12-05 12:40:46
I have a Windows Phone 8.1 Class Library that I want to later add as a reference to a Windows Phone 8.1 App project. This ClassLibrary should be responsible for creating and managing its own database. I tried creating a new SQLiteConnection in my ClassLibrary, but it throws the following error: A first chance exception of type 'System.InvalidOperationException' occurred in SQLitePCL.DLL however, if I do the same in my MainApp everything works fine. So, is it possible to create a SQLite database in a ClassLibrary that's responsible for creating and managing it without any support from the

FSharp.Core for Windows Phone 7.1 and F# 3.0

試著忘記壹切 提交于 2019-12-05 11:04:08
问题 The F# 2.0 distribution had a version of FSharp.Core compiled for WindowsPhone 7.1/Silverlight 4, but F# 3.0 doesn't, and the portable version only supports Silverlight 5 or Windows Phone 8. Has anyone been able to compile a version of FSharp.Core for F# 3.0 targeting Silverlight 4 or Windows Phone 7.1 from source? What are the defines required? Edit: On the fsharp compiler github repo, there's a target named portable-net4+sl4+wp71+win8, but in reality that's portable class library Profile47,