portable-class-library

Assembly.GetExecutingAssembly doesn't exist in PCL

扶醉桌前 提交于 2019-12-01 15:05:36
I set up a PCL in VB, VS2012 and set it for Profile 78 (WinRT, WinPhone8, .NET 4.5). I don't have GetExecutingAssembly available on Assembly . According to this , it should be available to PCLs. The only method available is Assembly.Load() . Does anyone what I should do with this? E.g. is this true, is my environment screwed up, is there another way to access GetExecutingAssembly other than Imports System.Reflection ? Any other ideas? In general, you should use something like typeof(MyType).GetTypeInfo().Assembly instead of Assembly.GetExecutingAssembly() . GetExecutingAssembly has to

Assembly.GetExecutingAssembly doesn't exist in PCL

▼魔方 西西 提交于 2019-12-01 14:41:05
问题 I set up a PCL in VB, VS2012 and set it for Profile 78 (WinRT, WinPhone8, .NET 4.5). I don't have GetExecutingAssembly available on Assembly . According to this, it should be available to PCLs. The only method available is Assembly.Load() . Does anyone what I should do with this? E.g. is this true, is my environment screwed up, is there another way to access GetExecutingAssembly other than Imports System.Reflection ? Any other ideas? 回答1: In general, you should use something like typeof

Is there a way to easily parse file paths in portable class libraries?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 14:09:03
问题 I'm needing to parse a path into parts from within a portable class library and get things like the filename, extension, just directory name, etc. All of these methods are fairly easy to access from within System.IO.Path, however, this doesn't seem to exist within portable class libraries. Is there an open source replacement for this or some other API that would give me the same functionality? 回答1: You may be able to use or adapt the code for System.IO.Path from Mono: https://github.com/mono

swig in c# - HandleRef could not be found in portable class library

不问归期 提交于 2019-12-01 12:02:53
I'm tring to wrap my c++ code to c# with using Swig. If the output destination of C# files is class library , there is no error and succesfully build. However I want to support both windows phone 8.1 and windows 8.1 because of this reason I'm using portable class library rather than normal class library. In this situation I'm getting error that says; The type or namespace name 'HandleRef' does not exist in the namespace 'System.Runtime.InteropServices' (are you missing an assembly reference?) I really don't know what I am missing. What is the solution of this problem? My guess windows phone 8

swig in c# - HandleRef could not be found in portable class library

时光毁灭记忆、已成空白 提交于 2019-12-01 11:56:51
问题 I'm tring to wrap my c++ code to c# with using Swig. If the output destination of C# files is class library , there is no error and succesfully build. However I want to support both windows phone 8.1 and windows 8.1 because of this reason I'm using portable class library rather than normal class library. In this situation I'm getting error that says; The type or namespace name 'HandleRef' does not exist in the namespace 'System.Runtime.InteropServices' (are you missing an assembly reference?)

Prevent system FontSize change from affecting the size in the Xamarin Application

吃可爱长大的小学妹 提交于 2019-12-01 08:44:58
So I noticed that an App I made will look messed up if the Font size in the users phone is changed to above medium, I googled a bit found many unanswered or answered but not to the point of the same question. I want to be able to do that in the PCL class if possible , if not possible then the most interesting platform for me is android so a fix specific for android would do. Here is a sample of my Xaml code so you can get a reference: <Label Text="STORE" FontSize="23" HeightRequest="40" WidthRequest="212" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"></Label> So to be clear

Missing targeting pack for “.NETFramework,Version=v4.0,Profile=Profile47”

本小妞迷上赌 提交于 2019-12-01 06:44:06
I've been having some problems when trying to compile the portable version of FSharp.Core from the f# source code . To help with this, I created some project files to be able to open it inside Visual Studio instead of having to use the following command: msbuild fsharp-library-build.proj /p:TargetFramework=portable-net4+sl4+wp71+win8 When I open FSharp.Core.Portable.sln from here , I get this very weird error: There is no such targeting pack for VS2012, it's supposed to come out of the box . I had this issue recently. It turned out that I was importing the wrong targets file at the bottom of

How to use MEF in Portable class library?

好久不见. 提交于 2019-12-01 05:45:25
问题 I have portable class library targeted to .NET 4.5 and Windows Store App. According to MSDN this setting should offer MEF but it does not. Namespace System.ComponentModel.Composition is not available (I even tried System.Composition but no luck). It is also not possible to use Microsoft.Composition NuGet package which works with Windows Store App. The error when installing NuGet version is: 'Microsoft.Composition 1.0.15' already installed. Could not install package 'Microsoft.Composition 1.0

Could not install package MvvmCross.PortableSupport 3.2.1 at Visual Studio 2013 for PCL Profile 158

丶灬走出姿态 提交于 2019-12-01 05:11:28
I have the following setup and still couldn't add mvmcross libraries to my project: VS2013 Update 3 Nuget Package Manager 2.8.50313.46 PCL Profile 158 (I also tried other like 78, etc) Install log is below: Attempting to resolve dependency 'MvvmCross.HotTuna.StarterPack (≥ 3.2.1)'. Attempting to resolve dependency 'MvvmCross.HotTuna.MvvmCrossLibraries (≥ 3.2.1)'. Attempting to resolve dependency 'MvvmCross.HotTuna.CrossCore (≥ 3.2.1)'. Attempting to resolve dependency 'MvvmCross.PortableSupport (≥ 3.2.1)'. Installing 'MvvmCross.PortableSupport 3.2.1'. Successfully installed 'MvvmCross

Missing targeting pack for “.NETFramework,Version=v4.0,Profile=Profile47”

强颜欢笑 提交于 2019-12-01 04:58:27
问题 I've been having some problems when trying to compile the portable version of FSharp.Core from the f# source code. To help with this, I created some project files to be able to open it inside Visual Studio instead of having to use the following command: msbuild fsharp-library-build.proj /p:TargetFramework=portable-net4+sl4+wp71+win8 When I open FSharp.Core.Portable.sln from here, I get this very weird error: There is no such targeting pack for VS2012, it's supposed to come out of the box. 回答1