Giter VIP home page Giter VIP logo

Comments (9)

germandb avatar germandb commented on July 18, 2024 2

Hi Daniel , I'm just update the code to .net Core 2.0 and only need to change the Workflow.Core.Persistence.SqlServer project.
After change the target framework and update the packages, only two files need changes.

  1. MigrationContextFactory.cs
    public class MigrationContextFactory : IDesignTimeDbContextFactory<SqlServerPersistenceProvider> { public SqlServerPersistenceProvider CreateDbContext(string[] args) { return new SqlServerPersistenceProvider(@"Server=.;Database=WorkflowCore;Trusted_Connection=True;", true, true); } }

  2. SqlServerPersistenceProvider.cs
    Change all the ForSqlServerToTable to ToTable example:
    builder.ForSqlServerToTable ("Subscription", "wfc"); will be builder.ToTable("Subscription", "wfc");

from workflow-core.

danielgerlag avatar danielgerlag commented on July 18, 2024 1

Currently it targets .NET Standard 1.3, which is compatible with .NET Core 2.0
We may move it onto .NET Standard 2.0 in the future, if we required the features.

from workflow-core.

citikiwi avatar citikiwi commented on July 18, 2024

Sorry, it's my fault. Yes, it's compatible with .Net Core 2.0. But the EntityFramework Provider is not compatible with EF Core 2.0. This is problem I meet.

from workflow-core.

danielgerlag avatar danielgerlag commented on July 18, 2024

ok, I will investigate this

from workflow-core.

danielgerlag avatar danielgerlag commented on July 18, 2024

Hi @citikiwi

I was able to create a .net core 2.0 project and host a workflow with Sql Server persistence, using the entity framework provider with out any problems.

What specific error are you seeing?

from workflow-core.

skaempfer avatar skaempfer commented on July 18, 2024

Hi Daniel, hi citikiwi,

I can confirm the issues with SQL Provider. Seems to be an issue with the EntityFrameworkCore packages the SQL provider dependends on. I created a example project to show you the issues: https://github.com/skaempfer/workflowcore.example. Resolving an instance of IWorkflowHost through the service collection leads to the following exception:

System.MissingMethodException occurred HResult=0x80131513 Message=Method not found: 'System.IServiceProvider Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)'. Source=<Cannot evaluate the exception source> StackTrace: at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<>c__DisplayClass4_1.<GetOrAdd>b__2(Int64 k) at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) at Microsoft.EntityFrameworkCore.DbContext..ctor(DbContextOptions options) at Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions.<>c__DisplayClass0_0.<UseSqlServer>b__0(IServiceProvider sp) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitTransient(TransientCallSite transientCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite singletonCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceProvider.<>c__DisplayClass22_0.<RealizeService>b__0(ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider) at ConsoleApp1.Program.Main(String[] args) in D:\Repos\WorkflowCore.Example\ConsoleApp1\Program.cs:line 15

Directly referencing newer versions of Microsoft.EntityFrameworkCore and Microsoft.EntityFrameworkCore .Relational leads to other exceptions.

Regards,
Sebastian

from workflow-core.

danielgerlag avatar danielgerlag commented on July 18, 2024

@skaempfer @citikiwi ok, I managed to reproduce this... it seems to be an incompatibility with the Microsoft.Extensions.DependencyInjection 2.0.0 package. I tested that you can downgrade that particular package to 1.1.1 and it still works on .net core 2,0
I will look into fixing this incompatibility, but in the meantime you could just downgrade that package.

from workflow-core.

skaempfer avatar skaempfer commented on July 18, 2024

I can confirm that this downgrade does the trick. I actually tried that, but unknowingly ran into a separate error which only seems to affect Win 7 hosts: https://github.com/dotnet/corefx/issues/18406. Additionally referencing System.Data.SqlClient directly was necessary on my Win 7 machine.

from workflow-core.

danielgerlag avatar danielgerlag commented on July 18, 2024

EF packages have been upgraded to EF Core 2.0

from workflow-core.

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.