speckleworks / SpeckleCore

Check a brand new Speckle at: https://github.com/specklesystems
https://speckle.systems
MIT License
39 stars 17 forks source link

Specklecore dotnetstandard build unable to use reflection in a dotnetcore application #136

Closed pathespe closed 4 years ago

pathespe commented 4 years ago

Expected Behaviour

lieber specklers,

admittedly this isn't in master yet so fair enough it doesnt work, but.... i'd like to use the dotnetstandard build of SpeckleCore from within a .NET core application in order to run speckle in a linux env

Actual Behaviour

im getting the following exception when using speckle core in another .net core 2 application System.PlatformNotSupportedException exception when calling Assembly.ReflectionOnlyLoadFrom

Reproduction Steps & System Config (win, osx, web, etc.)

i sucessfully merged master into https://github.com/speckleworks/SpeckleCore/tree/dotnetstandard locally built it then referenced the project in another

windows .NET core 2.1 console application

using System;
using SpeckleCore; 

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            SpeckleCore.SpeckleInitializer.Initialize();
            Console.WriteLine("Hello World!");
        }
    }
}

Proposed Solution (if any)

apparently this is to do with the kit initalisation parts, it needs to be changed to not use reflection only load

didimitrie commented 4 years ago

for the sake of reference, https://www.nuget.org/packages/SpeckleCore/1.7.0-wip should be .net standard 2.0.

I've also started scaffolding some basic tests in this branch, i might continue on those a wee bit.