index > Windows Workflow Foundation > Deployment problem with - cannot compile a markup file which does...

Deployment problem with - cannot compile a markup file which does...

Hi,

I am working with Xoml(With code separation) files. Code is written seperately in another project and adding the above as Base class for Xoml file, then removing x:Class from Xoml file. When building the project I am getting the error like cannot compile a markup file which does not contain declaration of the new workflow type. If I keep x:class attribute then I am getting WorkflowValidationFailedException at runtime.

This build error is creating the problem at the time of deployment. So, anybody please help me in solving this problem. Currently I am working with Workflow Beta 2.2 version.

Thank you

Satya




satya vani
Satya vani

You should probably upgrade to a more recent build, like RC5, because it will probably be the build that is released. That being said, are you calling CreateWorkflow using one of the Type parameter overloads or XmlReader? If you are going to compile a code seperated workflow into a type you need the x:Class attribute. If you are passing an XmlReader to CreateWorkflow you can not include the attribute. Using the xml reader is called XAML Activation. For more information on that take a look at the blog posts here. If you are using one of the Type parameter overloads and getting the WorkflowValidationFailedException you should catch the exception and check the Errors property like the following:

Tom Lake

Hi Tom,

I am using the XAML Activation like the following. So I have to remove the x:Class attribute.

instance = workflowRuntime.CreateWorkflow(objxomlReader, objruleReader, objIDMServiceParameters)

instance.Start()

Can you please tell me the way how to upgrade to recent build. I don't have any Idea on buid & deployment.

If u give me the suggession I will forward that to my B&D Team.

Thank You,

Satya




satya vani
Satya vani

You also need to change the properties on the XOML file in your project so that VS does not try to compile it. Set it to NONE and then decide if you want to copy the file the output directory or not.

If you don't do this, VS will still try to compile it, but fail because you do not have the x:class attribute in the file (which is what you want for XAML activation).

Matt




See What You Can Learn -- http://www.pluralsight.com/courses/IntroducingWF.aspx
Matt Milner - Pluralsight

Hi Matt,

Thank you for your valuable solution. I have changed the Xoml file's BuildAction property to None from Content. Now I am not getting the above error while building.

Thank you

Satya




satya vani
Satya vani
reply 5

You can use google to search for other answers

 

More Articles

• How to generate parameters in Custom Designer of workflow
• Authoring Workflows at runtime
• Xaml-only StateMachineworkflows and customization
• ASP.NET and WF viable?
• rule hierarchies
• What to download to get WWF running?
• BizTalk Sever 2006
• Cannot access a disposed object.Object name: 'WorkflowRuntime'. -...
• Why this exception been thrown?
• Where is the WWF download needed for WSS 2007?
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Persistence service
• VS Designer log location
• Custom DeSerialization Problem: Magic nu
• Trying to derive a custom activity from
• How can i add downloaded activities to t
• State Machine Dependency Properties
• Way to get property from an persisted wo
• Workflow with Visual Studio Express
• dependency injection in activities
• navigate page/forms?
• Dynamic workflow and workflow instance.
• Invoked event handler is not called in p
• Derived from HandleExternalEvent / Filte
• Custom Activities at runtime-debugging
• WorkflowXSDGenerator Issues?

Hot Articles

• Workflow Instances persisted by differen
• How do I implement a custom activity lik
• Workflow Serialization
• LCS related query
• Webservices Driven State Machine Workflo
• Load WorkflowInstance from Persistence D
• TransactionService sample problem
• ASP.NET workflow sample and SqlTrackingS
• Using RuleConditions on Designer Hosted
• Sharepoint Designer error using workflow
• subclass handle external event activity
• Workflow collaboration
• WWF Designer Hosting
• If/Else - Code Condition using an Activi
• Rant

Recommend Articles

• WorkflowCompiler locking output file
• WorkflowChanges in July CTP
• Heavy action and thread blocking
• ASP.NET WF events, threading, persistence
• Property Designer works wrong.
• "bindingRedirect" does not wor
• Both Client and Server Hosted Workflows
• Generic Workflow Host
• Copy List Item activity in SharePoint de
• WWF server and client
• Debuggin Designer classes
• Todo List
• Executing SequenceActivity's without a w
• Custom Activity Causes Workflow Validati
• Paralell Hosting