Comments (9)
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.
-
MigrationContextFactory.cs
public class MigrationContextFactory : IDesignTimeDbContextFactory<SqlServerPersistenceProvider> { public SqlServerPersistenceProvider CreateDbContext(string[] args) { return new SqlServerPersistenceProvider(@"Server=.;Database=WorkflowCore;Trusted_Connection=True;", true, true); } }
-
SqlServerPersistenceProvider.cs
Change all the ForSqlServerToTable to ToTable example:
builder.ForSqlServerToTable ("Subscription", "wfc");
will bebuilder.ToTable("Subscription", "wfc");
from workflow-core.
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.
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.
ok, I will investigate this
from workflow-core.
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.
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.
@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.
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.
EF packages have been upgraded to EF Core 2.0
from workflow-core.
Related Issues (20)
- Parallel tasks run in sequence not parallel HOT 2
- What should I do if it is rejected to the specified node that has been executed
- Why can'not I use constructor function in workflow step function HOT 1
- Multiple processes are multi-threaded in parallel? HOT 1
- Can I use the library to implement a fallback mechanism?
- How to achieve a better process rollback workflow HOT 4
- How to achieve exponential backoff retry policy HOT 1
- Facing issue to use Mongo as persistance storage HOT 2
- On wpf application workflow doesn't run at first HOT 3
- How to rollback service Transaction
- host.Start()启动后的host对象和从容器获取的IWorkflowHost对象不一样
- How to register workflows on every node with Multi-node clusters?
- Clear terminated workflow instances
- 7k requests a minute to azure blob storage
- Memory leak
- [Question] Would it be advisable to structure our process using sub-workflows? HOT 3
- Deserialisation in the ToWorkflowInstance() duplicates List items due to not set ObjectCreationHandling = ObjectCreationHandling.Replace in the JsonSerializerSettings
- [Question] How to break foreach loop?
- Is there any sample to use it on .NET framework?
- [Question] What does the option UseMaxConcurrentWorkflows do?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from workflow-core.