.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Namespace resolution issue when loading activities designed in VS2010 in rehosted WorkflowDesigner

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :Windows Application
Hi. I have activities that is made in VS2010, that are to be used in a rehosted WorkflowDesigner app. In the rehosted app I have a WorkflowDesigner, a toolbox with all the standard and my custom activities, and a property window. The problem occures when I load a composite activity that has reference to other custom activities (and that is drawn in the designer in VS2010). In the rehosted app the composite activity is shown almost as expected, except that all the referenced activities are shown in the designer as a red error message: "Activity could not be loaded because of errors in the XAML."  If I load the same activity in VS2010 it works.  If I remove the referenced activity in the rehosted app and adds it from the toolbox there, it works. If I draw the composite activity in the rehosted app from "the ground up", it works. If I compare the activity XAML that is saved in VS2010, and the activity XAML when opened, modified and saved in the rehosted app, I find differences in how namespaces are expressed: The Activity-XAML from VS2010 has namespace resolution at the top: xmlns:local="clr-namespace:WCFWorkflowPOC" The Activity-XAML from the rehosted app does not save namespace resolution at the top. If I add the activity in the rehosted app insted of in VS2010, it places namespace resolution

View Complete Post

More Related Resource Links

VS2010 Silverlight 4 - Getting "Object reference not set to an instance of an object" when loading a

In Visual Studio 2010 I'm trying to use the Blacklight Controls (http://blacklight.codeplex.com/releases/view/37652) in my own project (and actually included the Blacklight.Controls project in my solution so that I could debug what was going on) and... after making all the XAML changes needed to incorporate the Blacklight navigation menu with my stuff in the innermost grid... everything compiled ok when doing a Build.  When I run it there's a reference to a resource dictionary in the XAML that fails with the object reference error above.  The XAML is as follows:       <UserControl.Resources>       <controls:ResourceDictionaryManager x:Key="ResourceDictionaryManager">       <controls:ResourceDictionaryManager.ResourceDictionaries>       <controls:ResourceDictionaryCollection>       <controls:ResourceDictionary Path="/Blacklight.Showcase;component/ResourceDictionaries/DavesGlossyControls.xaml">       <controls:ResourceDictionary.ResourceKeys>       <controls:ResourceKeyCollection>       <controls:ResourceKey ResourceName="GlossyBlackScrollViewer" />       </controls:ResourceKeyCollection>     &

VS2010 XAML namespace intellisense not working

When I type in a namespace in XAML, I'm not getting any intellisense. For example: xmlns:local="" In VS2008 I would get a long intellisense list here. In VS2010 I get nothing. I have tried this on 2 different computers. What am I missing?

VS2010 Schema Compare Issue

I’m using VS2010 Schema Compare to compare two databases – let’s call them ‘DB1’ and ‘DB2’. I want DB1 to have its schema altered to match DB2. I select DB2 as the source and DB1 as the target, and compare. When I hit the Write Updates button, I am getting the following error: SQL01268: .Net SqlClient Data Provider: Msg 1834, Level 16, State 1, Line 1 The file ‘c:Program FilesMicrosoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\DB1.mdf’ cannot be overwritten. It is being used by database ‘DB1’. Why is Schema Compare trying to create a new DB? And, more to the point, why is it trying to create a DB named the same as the Source? Can anyone give me a workarround here? Thanks in advance.

Cannot create unknown type '{clr-namespace:Blog.LongRunningWorkflow.Example.Activities}WaitForReques

Hi, I am facing problem in loading XAML at runtime. Below is the code please help me. public void ProcessRequest(Request request) { // Get the workflow instance id to use Guid instanceId = this.requestToInstanceMapping[request.Id];         // Setup the arguments that are passed to the workflow          IDictionary<string, object> input = new Dictionary<string, object>();              input.Add("Request", request);            using (FileStream fs = new FileStream(@"ProcessRequest.xaml", FileMode.Open))          {             // Load the ProcessRequest workflow           Activity wf = ActivityXamlServices.Load(fs) as Activity;                            // Create the workflow instance specifying the arguments and instance id                      WorkflowApplication wapp = new WorkflowApplication(wf, input);          string persistenceConnectionString = "Data Source=Dev1;Initial Catalog=InstanceStore;User id=sa;password=xxxxxxx;Asynchronous Processing=True";          &nbs

Bug With Namespace in xaml that points to assembly with Workflows/Activities?

Hey All, Kind of an oddly worded question, but I'll try my best.   I have a xaml file with a namespace using at the top like this: xmlns:vm="clr-namespace:My.Namespace" This namespace is within an assembly that contains some Windows Workflow 4 designers and activities. [Designer(typeof(DeploymentDelegateDesigner))] public class ExecutionDelegate : NativeActivity { [DefaultValue(typeof(BuildDeployment))] public Activity Body { get; set; } /// <summary> /// /// </summary> /// <param name="context"></param> protected override void Execute(NativeActivityContext context) { context.ScheduleActivity(Body); } } In the above snippet, BuildDeployment is an activity.   If I build this project, an error occurs on the property attribute (DefaultValueAttribute) which states: "Error 43 The type or namespace name 'BuildDeployment' could not be found (are you missing a using directive or an assembly reference?) C:\dev\PathToProject\Activities\ExecutionDelegate.cs 13 30 My.Namespace" I've masked the error to hide some proprietary information.   This ONLY occurs when I have a custom namespace at the top of one of my xaml files. I've tried cleaning/rebuilding the solution, and restarting Visual Studio 2010. I'm at a loss on this one and it is a show stopper. &nbs

How do I generate service reference activities in my rehosted designer

My desginer is used to create lots of xamlx workflows.  These are hosted in app fabric. From Visual Studio I can add a service reference that points to my workflows, and it generates activities in my toolbar that I can use to call my service from another workflow. I'd like to do the same thing from my rehosted designer.  I figured it would be something like calling svcutil.exe, but couldn't find any information on this. Does anybody know how to create xaml activities by pointing at a service for a workflow designer rehost?   CheersJason Bolstad

Screen resolution issue in MOSS 2007



I have designed the SharePoint landing page with screen resolution of 1024x768. The layout is desined with 3 column. The header images are designed for fixed size for the above resolution only.
It looks good for the users having 1024x768 screen resol. But for few users who have bigger resolution like 1280x720 & wider screens, the header images still shows the same size and thus the body (three column layout) expanded. As a result there is an empty space in the right side of the header.

Is there anyway to get the screen to resize automaticlly for all the users?  


Rehosted Designer does not display custom Activities with custom ActivityDesigner


In a custom Rehosted Designer, when attempt to load a custom activity that has the Designer Attribute, referecing a custom ActivityDesigner, the rehosted designer display only the message "Could not generate view for MyCustomActivity" with red backtext.

When the mouse pointer is passed over the text, the following message is displayed:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation, --> System.Exception: The component 'Procwork.Software.Mersey.CORE.Common.ProcessManager.Designers.BusinessSourceActivityDesigner' does not have a resource identified by the URI '/Procwork.Software.Mersey.CORE.Common.ProcessManager;component/designers/businesssourceactivitydesigner.xaml'.
       at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at Procwork.Software.Mersey.CORE.Common.ProcessManager.Designers.BusinessSourceActivityDesigner.InitializeComponent() in c:\Procwork\PW.Mersey\Modules\CORE\Common\ProcessManager\Designers\BusinessSourceActivityDesigner.xaml:line 1
       at Procwork.Software.Mersey.CORE.Common.ProcessManager.Designers.BusinessSourceActivityDesigner..ctor() in C:\Procwork\PW

Opening vs2008 solution file in vs2010 - Framework targeting issue


Hey guys,

I am opening a vs2008 .sln file inside vs2010 - the conversion wizard shows up, and it goes through with no errors other than a pop up warning me that this solution needs .Net Framework 3.5 and that it is "not installed on this machine" - I chose to target it to .Net Framework 4.0 and to try to switch it later as an option.

I then bring up Properties - >Application -> Target Framework and in the dropdown, .Net Framework 3.5 is not listed - which is strange since in "Add or Remove Programs" I can see .Net Framework 3.5 is installed on my machine.

How can I get Framework 3.5 to show up in the dropdown so I can target this project to that framework?

Can't say I've ever done this, so I'm pretty sure I'm doing something wrong.


Update: I tried Method #1 here (http://blogs.msdn.com/b/robvi/archive/2004/02/17/75272.aspx) and I cannot see v3.5 - so where did it go? I'm confused why it is not in my registry but shows up in "Add or Remove Programs" list...


multi targeting in VS2010: .NET 4 vs 2/3.5 serialization issue


in our team, we develop a  client/server application where the data (custom poco classes) get serialized and compressed and sent via WCF between server and client.
The data objects are always put in our custom IList<T> before beeing serialized (BinaryFormatter). Tthus, the list itself is going to be serialized/deserialized.
We have actually 2 implementations of IList<T>:
a)'PocoList<T>' which implements IListSource and IList<T>. The serialization is done in this class.
b)'PocoBindingList<T>' which implements IBindingList, IList and IList<T>. The main idea is to bind this list with the controls in the client.
So all pocos and these lists are implemented in a 'common' project shared by both solutions.

As long as we were using .NET 3.5 in server and 2.0 in client, it went fine.
Yesterday, we upgraded the Server projects from .NET 3.5 to .NET 4. The client solution is still targeted to .NET 2.0. We are working in VS2010 in both solutions.

Now I get in client the following exception which occurs in the Deserialize method of the BinaryFormatter:
 var serializer = new BinaryFormatter();
 object deserializedObject = serializer.Deserialize(dataStream);

Exception has been thrown by the target of an invocation.


ReadOnly Property of a Custom NativeActivity in Rehosted WorkflowDesigner


Dear All,

In Property Panel of a rehosted designer, I want a property (InArgument) of a custom NativeActivity to be read-only. Is it possible to do that? I have tried to use ReadOnlyAttribute, but the property become vanished.

Any help will be appreciated.

Issue with People Search Box - Search Options Toggle teaser not loading correctly



I am experiencing an issue with the People Search Box Web Part.

When I click search options on the "People Search" web part that I have added to my Staff Portal front page it doesn't seem to render correctly. The toggle teaser tries to expand out the options but I can see the content that exists below it.

After this clicking on one of the list web parts I have and selecting the next page pf the list causes the page to fully re-render and I can see the "Search option" toggle teaser properly.

I'm wondering if this is behaviour that anyone else has seen when configuring their People Search?

I know I can turn the Search options off but this seems like a bit of a cheat and I'd rather have the functionality working properly - especially if this is a symptom of something more radically incorrect with how I have configured my front page.

Thanks in Advance


menuitem blend to vs2010 issue


hi all,

i using blend 4 to customize the default template for menuitem that i want to use for my application.
Now, i complete this task: i choose to edit the current menuitem template in blend, this generate the relative xaml code and i save, i load the ui in VS2010 designer the menuitems as been all expanded. I do not touch width property. Why? This is trouble a lot...


Roberto Pallucchini
*** Please mark as Answer, if this reply helps you***
*** Per favore Suggerisci come risposta, se la risposta ti è stata di aiuto***

menuitem blend to vs2010 issue


hi all,

i using blend 4 to customize the default template for menuitem that i want to use for my application.
Now, i complete this task: i choose to edit the current menuitem template in blend, this generate the relative xaml code and i save, i load the ui in VS2010 designer the menuitems as been all expanded. I do not touch width property. Why? This is trouble a lot...


Roberto Pallucchini
*** Please mark as Answer, if this reply helps you***
*** Per favore Suggerisci come risposta, se la risposta ti è stata di aiuto***

Issue with dynamic usercontrol loading when using ParseControl() method in VS2008


In the process of migrating an old VS2003 web app to VS2008, I'm running into this issue and haven't been able to find a resolution. 

Sample code:

"Default.aspx" has a PlaceHolder(ToolHeader).  In the Page_Load(), we dynamically load a user control passing in the virtual path to a helper method [public Control ParseUserControl(string virtualPath)].  This reads the content from the physical path, returns a Control from ParseControl() method. 

 I immediately get the following error when I open the default.aspx page in browser.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'DynamicUC.UcControl'.

Source Error:

 Line 1:  <%@ Control AutoEventWireup="true" CodeBehind="UcControl.ascx.cs" Inherits="DynamicUC.UcControl"  %>

Can't figure out why it can't load the type.  Namespaces are looking right.   I try removing the Inherits="DynamicUC.UcControl" attribut

Rehosted Designer: Using custom activities from dll


I adding to activities toolbar my custom activity, made in rehosted designer and compiled via msbuild.exe . Then I dragging it from toolbar to my workflow view. But when I try to compile or just run activity , which is using activity from the dll, there is the error. It cannot find type of needed activity in dll. Dll is in designer's executable folder.

=Sorry for my english

WCF Ria Services data loading issue


 Hi, here is my problem: I need to load some set of data. I wrote following code(I use Linq2Sql as ORM):


var query = from sensors in Context.GetWCM_SensorsQuery() where sensors.DeviceID == 1 select sensors;
            Context.Load(query, OnMeasLoaded, null);

  private void OnMeasLoaded(LoadOperation<WCM_Sensor> obj)
            var tmpStore = new List<WCM_Sensor>(obj.Entities);


After this code execution i see situation below:

I found the reason of incorrect queries execution. I have services endpoints dclaration in web.config file. There looks like this:


      <service name="StreamEase.Web.Services.AuthenticationService"
        <endpoint address="" binding="wsHttpBinding"
        contract="StreamEase.Web.Services.AuthenticationService" />
        <endpoint address="/soap"
        contract="StreamEase.Web.Services.AuthenticationService" />
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend