Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Compile it for Windows Store/Windows Phone. #12

Open
soeron opened this issue May 11, 2015 · 5 comments
Open

Unable to Compile it for Windows Store/Windows Phone. #12

soeron opened this issue May 11, 2015 · 5 comments

Comments

@soeron
Copy link

soeron commented May 11, 2015

Assets\Plugins\Vexe\Runtime\Library\Extensions\Flags.cs(387,19): error CS1061: 'System.Collections.Generic.List' does not contain a definition for 'ForEach' and no extension method 'ForEach' accepting a first argument of type 'System.Collections.Generic.List' could be found (are you missing a using directive or an assembly reference?)

Assets\Plugins\Vexe\Runtime\Library\Extensions\GenericEnumerableExtensions.cs(52,25): error CS1928: 'System.Type' does not contain a definition for 'IsAssignableFrom' and the best extension method overload 'Vexe.Runtime.Extensions.TypeExtensions.IsAssignableFrom(System.Type[], System.Type[])' has some invalid arguments

Assets\Plugins\Vexe\Runtime\Library\Extensions\TypeExtensions.cs(144,53): error CS1061: 'System.Type' does not contain a definition for 'GetInterfaces' and no extension method 'GetInterfaces' accepting a first argument of type 'System.Type' could be found (are you missing a using directive or an assembly reference?)

And another 130 errors. Not sure if the problem is with me. Tried the .NET 2.0 subset and the other profile but it is the same.

Build settings are: Windows Store Phone 8.1, and Universal 8.1

@vexe
Copy link
Owner

vexe commented May 11, 2015

This is going to take some time to address. Most if not all regular reflection stuff is not available in WP. I have to find every single reflection call made at runtime and make them operate on TypeInfo instead of Type and wrap the thing with conditionally compiled if statement.

@vexe
Copy link
Owner

vexe commented May 12, 2015

If you're familiar with reflection and would like to help fix the issue, we basically need to find all the calls causing the errors and replace them with the appropriate calls from fsPortableReflection.cs - We'd have to fix all the reflection extension methods files (TypeExtensions, PropertyInfoExtensions etc) - I'd be more useful if I had a WP to build and test. A sample replacement:

    public static bool IsStatic(this Type type)
    {
        return type.IsSealed && type.IsAbstract;
    }

would become:

    public static bool IsStatic(this Type type)
    {
        return type.Resolve().IsSealed && type.Resolve().IsAbstract;
    }

@soeron
Copy link
Author

soeron commented May 12, 2015

I can give it a try later this day maybe. I am just not sure if its worth it to be fixed since .NET Core is on the way and i guess a lot of things will be replaced in Unity soon. Will report as soon as I can.

@colms
Copy link
Contributor

colms commented May 14, 2015

I wouldn't hold my breath for .Net Core. Unity are notoriously slow for rolling out useful changes.

I could lend a hand if you have a project I could test on.

@ajboni
Copy link
Contributor

ajboni commented Aug 24, 2015

Hello, I happen to have a Windows Phone. Let me know how I can Help. I've tried to build a project to windows store (8.1) and get these errors, (mostly from FastReflection)

Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs(536,20): error CS0246: The type or namespace name 'ILGenerator' could not be found (are you missing a using directive or an assembly reference?)

(Filename: Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs Line: 536)

Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs(546,37): error CS0246: The type or namespace name 'Label' could not be found (are you missing a using directive or an assembly reference?)

(Filename: Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs Line: 546)

Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs(547,34): error CS0246: The type or namespace name 'Label' could not be found (are you missing a using directive or an assembly reference?)

(Filename: Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs Line: 547)

Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs(563,39): error CS0246: The type or namespace name 'LocalBuilder' could not be found (are you missing a using directive or an assembly reference?)

(Filename: Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs Line: 563)

Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs(565,38): error CS0246: The type or namespace name 'LocalBuilder' could not be found (are you missing a using directive or an assembly reference?)

(Filename: Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs Line: 565)

Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs(567,37): error CS0246: The type or namespace name 'LocalBuilder' could not be found (are you missing a using directive or an assembly reference?)

(Filename: Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs Line: 567)

Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs(569,36): error CS0246: The type or namespace name 'LocalBuilder' could not be found (are you missing a using directive or an assembly reference?)

(Filename: Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs Line: 569)

Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs(579,36): error CS0246: The type or namespace name 'LocalBuilder' could not be found (are you missing a using directive or an assembly reference?)

(Filename: Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs Line: 579)

Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs(580,38): error CS0246: The type or namespace name 'LocalBuilder' could not be found (are you missing a using directive or an assembly reference?)

(Filename: Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs Line: 580)

Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs(583,35): error CS0246: The type or namespace name 'Label' could not be found (are you missing a using directive or an assembly reference?)

(Filename: Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs Line: 583)

Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs(595,20): error CS0246: The type or namespace name 'LocalBuilder' could not be found (are you missing a using directive or an assembly reference?)

(Filename: Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs Line: 595)

Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs(596,20): error CS0246: The type or namespace name 'Label' could not be found (are you missing a using directive or an assembly reference?)

(Filename: Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs Line: 596)

Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs(600,56): error CS0246: The type or namespace name 'LocalBuilder' could not be found (are you missing a using directive or an assembly reference?)

(Filename: Assets\Plugins\Vexe\Runtime\Library\Extensions\FastReflection.cs Line: 600)

Assets\Plugins\Vexe\Runtime\Library\Helpers\ReflectionHelper.cs(55,30): error CS0104: 'Tuple' is an ambiguous reference between 'System.Tuple<System.Type,string>' and 'Vexe.Runtime.Types.Tuple<System.Type,string>'

(Filename: Assets\Plugins\Vexe\Runtime\Library\Helpers\ReflectionHelper.cs Line: 55)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants