locked
URGENT - Cannot create unknown type '{http://schemas.microsoft.com/winfx/2006/xaml/presentation}PointCollection' RRS feed

  • Question

  • Hi,

    My situation is that I have an ASP.Net 3.5 application which is calling a .net 4.0 web service which then internally utilises WF 4.0. This generally runs fine on my development machine but every now and then I get the error below.
    The bigger issue is that I have now deployed this onto my boss's laptop and am getting the error all of the time. This is a major as he is looking to demo this in a few days.
    We also have a rehosted designer which seems to work perfectly fine on both machines.

    I have previously had this problem in my VS2010 development environment (http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/ce4cb7ef-8e8d-4773-8b20-56f1c209d6f5) but resolved this by adding in missing references. However I have checked the references and this doesn't appear to be the cause.

    Any help would be greatly appreciated.

    Error message:

    Inner exception message: Cannot create unknown type '{http://schemas.microsoft.com/winfx/2006/xaml/presentation}PointCollection'.

     

    MyCompany.BusinessException: Error starting FormFlow ---> System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Cannot create unknown type '{http://schemas.microsoft.com/winfx/2006/xaml/presentation}PointCollection'. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:

    System.Xaml.XamlObjectWriterException: Cannot create unknown type '{http://schemas.microsoft.com/winfx/2006/xaml/presentation}PointCollection'.

       at System.Xaml.XamlObjectWriter.WriteStartObject(XamlType xamlType)

       at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)

       at System.Xaml.XamlServices.Load(XamlReader xamlReader)

       at System.Activities.XamlIntegration.ActivityXamlServices.Load(XmlReader xmlReader)

       at System.Activities.XamlIntegration.ActivityXamlServices.Load(Stream stream)

       at MyCompany.Workflow.FormFlow.Service.FormFlowService..ctor() in C:\Regeneration\POC\2010\Workflow\MyCompany.Workflow.FormFlow\Service\FormFlowService.cs:line 39

       at MyCompany.Workflow.Wcf.WcfWorkflowServiceProvider.get_FormFlowService() in C:\Regeneration\POC\2010\Workflow\MyCompany.Workflow.Wcf\WcfWorkflowServiceProvider.cs:line 27

       at MyCompany.Workflow.Wcf.Fo...).

    Cheers

    Matt

    • Edited by MatthewVB Sunday, September 5, 2010 2:55 AM Removed company name
    Tuesday, February 2, 2010 8:29 PM

Answers

  • Ok - so I think I have fixed the problem.
    The issue was that while I had a reference in the project to PresentationCore because there wasn't actually any code that called into that assembly when the compiler generated the dll it removed that reference. So what I did was add code to call a class in PresentationCore therefore the compiler included the reference. So far it seems to be working fine.

    Can someone from Microsoft confirm that this PointCollection issue is being looked into and won't be a problem in the RTM?

    Cheers

    Matt
    Tuesday, February 2, 2010 9:11 PM

All replies

  • Ok - so I think I have fixed the problem.
    The issue was that while I had a reference in the project to PresentationCore because there wasn't actually any code that called into that assembly when the compiler generated the dll it removed that reference. So what I did was add code to call a class in PresentationCore therefore the compiler included the reference. So far it seems to be working fine.

    Can someone from Microsoft confirm that this PointCollection issue is being looked into and won't be a problem in the RTM?

    Cheers

    Matt
    Tuesday, February 2, 2010 9:11 PM
  • Hi Matt,
    If I remember right your issue occurred during Beta2, is it fixed in the Release Candidate?
    Tim
    Tuesday, March 9, 2010 12:06 AM
  • Tim,

    I can confirm that this is still an issue in the Release Candidate. It still seems to fall over quite often with this error.

    Do you have any ideas around what might be causing this or anything I can do to stop this from happening?

    Cheers

    Matt
    Monday, March 15, 2010 3:12 AM
  • Thanks for the workaround for this problem.

    I'm having the same issue in the release candidate.

     

    Ronald

    Wednesday, April 7, 2010 8:41 PM
  • As far as I know this issue still hasn't been fixed. Either way we would love to have fuller repro information for this issue.
    Tim

    Update: note that there is some further discussion of the issue here:
    http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/329bf6a7-0fe9-443d-a58a-71bea250cf13

    Friday, April 9, 2010 8:27 PM
  • The problem can be avoided by removing the view state information from the Workflow Xaml Definition and by excluding the SAP / SAP2010 libraries from the AppDomain when instancing the Workflow, since they are not needed at runtime for the execution: https://andreioros.com/blog/failed-to-create-pointcollection-exception-windows-workflow-foundation/
    Tuesday, March 6, 2018 4:49 PM