locked
User Control error in Designer, not in Runtime

    Question

  • Hello

    I'm working on a C++ Windows 8 app. I am not able to use the Visual Studio 2012 Designer anymore as it has big problems with user controls: It cannot instantiate them, although there is no problem during runtime  (the controls have default constructors).

    Here is the actual error message, including the strack trace (remark: I translated some exception messages by myself as I use a German VS):

    "Exception: An instance of "MyUserControl" cannot be created.

    StackTrace

       at Microsoft.Expression.Platform.InstanceBuilders.InstanceBuilderOperations.InstantiateType(Type type, Boolean supportInternal)
       at Microsoft.Expression.Platform.InstanceBuilders.ClrObjectInstanceBuilder.InstantiateTargetType(IInstanceBuilderContext context, ViewNode viewNode)
       at Microsoft.Expression.Platform.InstanceBuilders.ClrObjectInstanceBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
       at Microsoft.Expression.WindowsXamlPlatform.InstanceBuilders.FrameworkElementInstanceBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
       at Microsoft.Expression.WindowsXamlPlatform.InstanceBuilders.UserControlInstanceBuilder.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
       at Microsoft.Expression.Platform.InstanceBuilders.ViewNodeManager.CreateInstance(IInstanceBuilder builder, ViewNode viewNode)

    InnerException: Exception has been thrown by the target of an invocation.

        TargetInvocationException: Exception has been thrown by the target of an invocation.

        StackTrace

           at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
           at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
           at Microsoft.Expression.Platform.InstanceBuilders.InstanceBuilderOperations.InstantiateType(Type type, Boolean supportInternal)

        InnerException: The text for this error code cannot be found.

            StackTrace

              at MyProject.MyUserControl..ctor()

            InnerException: None"

    What to do with that?

    Friday, January 25, 2013 9:34 AM

Answers

  • I believe this might be a known issue that we have already resolved for the next update to VS 2012. However, the only way to be sure is to take a look at the repro - could you please send it to me offline at unnir at Microsoft dot com, and I can investigate?

    Thanks,
    Unni


    Unni Ravindranathan, Program Manager, Visual Studio and Blend This posting is provided "AS IS" with no warranties, and confers no rights.

    Sunday, January 27, 2013 7:25 AM

All replies

  • Framework 4.5 is released please check it

    Thank you

    • Proposed as answer by Imranimmu Saturday, January 26, 2013 4:42 PM
    • Unproposed as answer by Imranimmu Saturday, January 26, 2013 4:42 PM
    Saturday, January 26, 2013 4:42 PM
  • I believe this might be a known issue that we have already resolved for the next update to VS 2012. However, the only way to be sure is to take a look at the repro - could you please send it to me offline at unnir at Microsoft dot com, and I can investigate?

    Thanks,
    Unni


    Unni Ravindranathan, Program Manager, Visual Studio and Blend This posting is provided "AS IS" with no warranties, and confers no rights.

    Sunday, January 27, 2013 7:25 AM
  • @Imranimmu: What exactly do you mean? .NET 4.5 has already been released with Windows 8. I can't see any recent update

    @Unni Ravindranathan: I have sent you an e-mail.

    Monday, February 4, 2013 8:04 AM