Workflow project not compiling after upgrade

Member since: 2007

Updated Commerce from 8.2.1.326 to 8.7.1.466 (and CMS 7.15 to 7.19.2)

After that my custom workflow project did not compile in VS2013. My workflows are deriving from Mediachase.Commerce.Workflow.Activities.CalculateTaxActivity (one example)

Error in VS2013: "Compilation failed. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."

I’ve noticed that the dll “Mediachase.Commerce.Workflow.Activities.dll” is moved in to “Mediachase.Commerce.Workflow.dll” (not mentioned in release notes – why Episerver? ).

Therefor I changed the assembly namespace in myworkflow.xoml  

xmlns:ns0="clr-namespace:Mediachase.Commerce.Workflow.Activities;Assembly=Mediachase.Commerce.Workflow, Version=8.7.1.466, Culture=neutral, PublicKeyToken=null"

In VS I also get the following when I try to open the workflow designer:

“The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: MyValidateLineItemsActivity. The base class MyValidateLineItemsActivity could not be loaded. Ensure the assembly has been referenced and that all projects have been built.”

The MyValidateLineItemsActivity assembly is in the project.

The Mediachase DLLs are referenced to the latest version.

What am I missing out? Thanks for any help.

#116858 Feb 06, 2015 11:21
  • Member since: 2011

    Hi,

    When you use namespace within an assembly, you don't have to specify the Assembly part, so you just want to remove that part. Your xoml should be 

    xmlns:ns0="clr-namespace:Mediachase.Commerce.Workflow.Activities"

    But I'm quite sure we noticed about the merge. In the release notes here http://world.episerver.com/releases/episerver---update-51/ we pointed to

    http://world.episerver.com/download/Items/EPiServer-Commerce/episerver-commerce-8-tools-and-code-samples/

    "This code package includes the source code for the default workflows in EPiServer Commerce, combining both workflows and activities into one package. The workflows can be customized to suite specific implementation needs."

    :)  But that might be a little mild.

    Regards,

    /Q

    #116868 Feb 06, 2015 13:24
  • Member since: 2007

    Thanks but changing namespace did not change anything. Looked at the example and i didn´t see any that clarify my problem.

    #116900 Feb 06, 2015 15:32
  • Member since: 2011

    And did you remove the reference to Mediachase.Commerce.Workflow.Activities.dll and Mediachase.Commerce.Workflow.dll itself? The steps were to install EpiServer.Commerce.Core to the source code project but old references must be removed.

    /Q

    #116904 Feb 06, 2015 15:44
  • Member since: 2007

    Yes, its all gone and changed. Still i believe it is a reference issue as the message tells me.

    #116905 Feb 06, 2015 15:57
  • Member since: 2014

    I also tried to update last night and am in the situation receiving the same error with my custom workflows project. I look forward to more information or a solution to this. Thanks.

    #116946 Feb 07, 2015 17:44
  • Member since: 2011

    Would you mind to send us your custom project? We will try to make things right. My mail is quma [at] episerver.com

    Thanks.

    /Q

    #116947 Feb 08, 2015 3:24
  • Member since: 2011

    I wrote a blogspot which might help future visitors: http://world.episerver.com/blogs/Quan-Mai/Dates/2015/2/building-your-customer-commerce-workflow-project/

    Regards,

    /Q

    #116954 Edited, Feb 09, 2015 6:03
  • Member since: 2005

    Have you tried to clean you solution, hit the refresh button to refresh your workflow project, and rebuild the solution?

    #117021 Feb 10, 2015 9:17
  • Member since: 2007

    I finaly got my workflow-project working in CMS 7.19.2. What i did was to download 7.19.1 separatly, and referenced my workflow project to these DLLs. Anyhow this is not desirable approach. I wonder what will happen on next update.

    #117344 Feb 18, 2015 12:57
  • Member since: 2007

    Oh, i didn't try it enough. Now i get this error on "OrderGroupWorkflowManager.RunWorkflow(cart, OrderGroupWorkflowManager.CartPrepareWorkflowName);"

     System.MissingMethodException: Constructor on type 'Holmen.Commerce.CustomProviders.ShippingUps.AdaptorGateway' not found.
       at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
       at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
       at System.Activator.CreateInstance(Type type, Object[] args)
       at Mediachase.Commerce.Workflow.Activities.ProcessShipmentsActivity.ProcessShipments()
       at Mediachase.Commerce.Workflow.Activities.ProcessShipmentsActivity.Execute(ActivityExecutionContext executionContext)
       at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)
       at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
       at System.Workflow.Runtime.Scheduler.Run()
       --- End of inner exception stack trace ---
       at Mediachase.Commerce.Orders.Managers.OrderGroupWorkflowManager.RunWorkflow(OrderGroup orderGroup, String name, Boolean async, Boolean throwException, Dictionary`2 param)
       at Mediachase.Commerce.Orders.Managers.OrderGroupWorkflowManager.RunWorkflow(OrderGroup orderGroup, String name)
       at Holmen.Externweb.Web.Templates.Public.Pages.Commerce.Checkout.CheckoutPaymentOptions.onEnter() in c:\workspace\Holmen\Holmen.Externweb.Web\Templates\Public\Pages\Commerce\Checkout\CheckoutPaymentOptions.aspx.cs:line 60
       at Holmen.Externweb.Web.Templates.Public.Pages.Commerce.Checkout.CheckoutStepBase`1.InitGeneral() in c:\workspace\Holmen\Holmen.Externweb.Web\Templates\Public\Pages\Commerce\Checkout\CheckoutStepBase.cs:line 39
       at Holmen.Externweb.Web.Templates.Public.Pages.Commerce.Checkout.CheckoutPaymentOptions.Page_Load(Object sender, EventArgs e) in c:\workspace\Holmen\Holmen.Externweb.Web\Templates\Public\Pages\Commerce\Checkout\CheckoutPaymentOptions.aspx.cs:line 36
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.HandleError(Exception e)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest()
       at System.Web.UI.Page.ProcessRequest(HttpContext context)
       at ASP.templates_public_pages_commerce_checkout_checkoutpaymentoptions_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\21f9142c\f8f72cc1\App_Web_checkoutpaymentoptions.aspx.c1d148f9.twvxtly2.0.cs:line 0
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    

    What does it meen? please help.

    Holmen.Commerce.CustomProviders.dll is in the bin-folder

    #119673 Edited, Apr 01, 2015 13:47
First   1 2   Last