Code Monkey home page Code Monkey logo

Comments (9)

bricelam avatar bricelam commented on August 23, 2024

This code is more appropriate if you have access to EnvDTE: https://github.com/aspnet/EntityFrameworkCore/blob/dev/src/EFCore.Tools/tools/EntityFrameworkCore.psm1#L757-L872

from efcorepowertools.

ErikEJ avatar ErikEJ commented on August 23, 2024

I do not, but thanks

from efcorepowertools.

ErikEJ avatar ErikEJ commented on August 23, 2024

@bricelam I actually do have access to EnvDTE, thanks for the hint!

from efcorepowertools.

ErikEJ avatar ErikEJ commented on August 23, 2024

@bricelam Does this mean I MUST intall EFCore.Design 2.2.4 in order to make this work? (It works if I do)

dotnet exec --depsfile "C:\Users\Erik\Downloads\ConsoleApp3\ConsoleApp3\bin\Debug\netcoreapp2.2\ConsoleApp3.deps.json" --additionalprobingpath "C:\Users\Erik\.nuget\packages" --additionalprobingpath "C:\Program Files\dotnet\sdk\NuGetFallbackFolder" --runtimeconfig "C:\Users\Erik\Downloads\ConsoleApp3\ConsoleApp3\bin\Debug\netcoreapp2.2\ConsoleApp3.runtimeconfig.json" "C:\Users\Erik\AppData\Local\Temp\efpt\efpt.dll"  "C:\Users\Erik\Downloads\ConsoleApp3\ConsoleApp3\bin\Debug\netcoreapp2.2\ConsoleApp3.dll"
Error:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.EntityFrameworkCore.Design, Version=2.2.4.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
File name: 'Microsoft.EntityFrameworkCore.Design, Version=2.2.4.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
   at ReverseEngineer20.EfCoreModelBuilder.BuildResult(String outputPath, Boolean generateDdl)
   at ReverseEngineer20.Program.Main(String[] args) in C:\Code\EFCorePowerTools\src\GUI\efpt\Program.cs:line 44

from efcorepowertools.

bricelam avatar bricelam commented on August 23, 2024

All dependencies of efpt.dll must be installed in the app. I think you can relax assembly version requirements by hooking AppDomain.CurrentDomain.AssemblyResolve:

AppDomain.CurrentDomain.AssemblyResolve += (sender, args) =>
{
    var fullName = new AssemblyName(args.Name);
    
    // Ignore Version, Culture, and PublicKeyToken
    return Assembly.Load(fullName.Name);
}

from efcorepowertools.

ErikEJ avatar ErikEJ commented on August 23, 2024

Thanks, just now I refer to version 2.1.0 and 2.2.0 of EfCore.Design, and it seems to work fine.

from efcorepowertools.

ErikEJ avatar ErikEJ commented on August 23, 2024

Does AppDomain exist in .NET Core??

from efcorepowertools.

bricelam avatar bricelam commented on August 23, 2024

Parts of it were added to 2.0. You can't create new ones though, so there is only ever one app domain per process.

from efcorepowertools.

bricelam avatar bricelam commented on August 23, 2024

As an alternative they've added custom load contexts and enabled unloading assemblies.

from efcorepowertools.

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.