Giter Site home page Giter Site logo

Comments (17)

7sharp9 avatar 7sharp9 commented on May 25, 2024

So the plugin is a nuget and its dependencies are not being downloaded?

from myriad.

TheAngryByrd avatar TheAngryByrd commented on May 25, 2024

Yeah it's a nuget dependency but my guess is where Myriad is being run, it can't find Newtonsoft.Json. I think this is the same problem F# Analyzers have.

My particular case is I'm running the generator in my test project and just referencing my plugin after build, which doesn't copy all the dependencies.

from myriad.

7sharp9 avatar 7sharp9 commented on May 25, 2024

The location of the dll is specified in the .props file:

 <MyriadSdkGenerator Include="$(MSBuildThisFileDirectory)/../lib/netstandard2.1/Myriad.Plugins.dll" />

I wonder if we can do something here...?

from myriad.

TheAngryByrd avatar TheAngryByrd commented on May 25, 2024

Yeah so if I do a publish of my plugin and reference that directory with MyriadSdkGenerator it works. Now I'm just wondering how to make this smooth for my testing project.

from myriad.

TheAngryByrd avatar TheAngryByrd commented on May 25, 2024

Circling back, doing the recommendation about packaging in F# analyzers works and following the guidlines in the README about testing plugins works smoothly.

from myriad.

7sharp9 avatar 7sharp9 commented on May 25, 2024

Ive not read it yet, @Krzysztof-Cieslak Anything you would do different now?

from myriad.

TheAngryByrd avatar TheAngryByrd commented on May 25, 2024

Slight correction about making testing work.

I had to add:

    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

to my fsproj. This ensures the build folder contains all the 3rd party dependencies, then loading the plugin via the InTest.props file works.

from myriad.

Krzysztof-Cieslak avatar Krzysztof-Cieslak commented on May 25, 2024

In Analyzers.SDK we also use McMaster.NETCore.Plugins instead of directly loading stuff with Assembly.Load - as far as I remember this was done to allow a different version of dependencies between plugins and host. Part of the problem in the case of Analyzers.SDK was that we need to stay on netcoreapp2.0.

I think in context of Myriad one thing to explore would be AssemblyDependencyResolver API added in .Net Core 3.1 - https://docs.microsoft.com/en-us/dotnet/api/system.runtime.loader.assemblydependencyresolver?view=netcore-3.1

from myriad.

7sharp9 avatar 7sharp9 commented on May 25, 2024

@TheAngryByrd Was this what you meant? ^

from myriad.

TheAngryByrd avatar TheAngryByrd commented on May 25, 2024

I did not know that but it's still useful information

from myriad.

7sharp9 avatar 7sharp9 commented on May 25, 2024

Did anyone progress this further for a solution as Im hitting something where a version of FCS needs to be loaded and is not found due to a transient ref?

from myriad.

TheAngryByrd avatar TheAngryByrd commented on May 25, 2024

I remember doing https://github.com/BinaryDefense/JsonWrapper/blob/master/build.fsx#L565-L620 as a way to put all the dependencies into the nuget package.

from myriad.

7sharp9 avatar 7sharp9 commented on May 25, 2024

@TheAngryByrd What if your not doing a pack?

from myriad.

7sharp9 avatar 7sharp9 commented on May 25, 2024

Done

from myriad.

7sharp9 avatar 7sharp9 commented on May 25, 2024

Maybe we need AssemblyDependencyResolver as things seem to have gone awry with dotnet 6.0. Are you having any issues with your plugins, I forget if you're still maintaining them
/cc @TheAngryByrd @baronfel

from myriad.

TheAngryByrd avatar TheAngryByrd commented on May 25, 2024

Sorry, I haven't really touched any of my plugins in years at this point.

from myriad.

7sharp9 avatar 7sharp9 commented on May 25, 2024

Stale Bread

from myriad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.