locked
VS2013 Update4 - “WinRT information: Class not registered”

    Question

  • I'm trying to use winrt component(c#) with my c++ game for windows/windowsphone. I have one class and everything was fine, but after adding another class to my winrt component, I'm getting exception:

    First-chance exception at 0x74D02F71 in App1.exe: Microsoft C++ exception: Platform::ClassNotRegisteredException ^ at memory location 0x0260EA78. HRESULT:0x80040154 Class not registered

    WinRT information: Class not registered

    Also I've discovered, that on another pc with VS2013 without Update4 everything works fine. I have found, that VS marks as ActivatableClass only one class in generated AppxManifest.xml. If I add manually other classes - all works fine. But it not sounds as solution.

    Is there any solution to generate proper AppxManifest.xml?

    Friday, November 21, 2014 4:09 PM

Answers

  • Hi ,

    Thanks for reporting the issue.

    I just find a workaround for the "Class not registered" in other thread. Could you please have a look at it and see if you are running into same problem.

    If it doesn't work for you, could you please summary your problem again and provide a repro project with detailed steps for further investigation. Thanks for your cooperation!


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    Alan Yao
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, December 03, 2014 1:53 AM
  • Hmm, today I tried to create sample for you, and I have discovered, that everything works fine.. For Universal and non-universal projects, I don't know what was the problem. 
    Wednesday, December 10, 2014 6:38 PM

All replies

  • Hi sadworf,

    Thanks for your feedback, I will consult our seniors to see is there any possible solutions. I saw a similar post on the forum days ago and as you told manually add the class works fine. but I don't think this could a solution either.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, November 24, 2014 2:52 AM
    Moderator
  • Hi James,

    Do you have any news on my issue?

    Tuesday, November 25, 2014 10:12 AM
  • Could you also provide a minimum reproducible demo with me, so that we can use it for help troubleshoot the issue. The current state is we are still seeking. This may take few days and please be patient.

    If you could, please continue work with VS2013.3 for this moment.

    Thanks for your understanding.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, November 25, 2014 10:21 AM
    Moderator
  • Today I've returned to work with my winrt component and discovered, that problem appears only when class was added 'as link'. If I create winrt component with classes in project folder - everything works fine.

    For example, create one file with classes:

    namespace WindowsRuntimeComponent1
    {
        public sealed class Class1
        {
            public static void test() { }
        }
    
        public sealed class Class2
        {
            public static void test() { }
        }
    }
    

    and add another cs file as link

    namespace WindowsRuntimeComponent1
    {
        public sealed class Class3
        {
            public static void test() { }
        }
    }
    

    Then call methods from native app, like this. And you will get exception.

    WindowsRuntimeComponent1::Class1::test();
    WindowsRuntimeComponent1::Class2::test();
    WindowsRuntimeComponent1::Class3::test();

    • Edited by sadworf Friday, November 28, 2014 4:23 PM
    Friday, November 28, 2014 4:18 PM
  • Hi ,

    Thanks for reporting the issue.

    I just find a workaround for the "Class not registered" in other thread. Could you please have a look at it and see if you are running into same problem.

    If it doesn't work for you, could you please summary your problem again and provide a repro project with detailed steps for further investigation. Thanks for your cooperation!


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    Alan Yao
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, December 03, 2014 1:53 AM
  • Hmm, today I tried to create sample for you, and I have discovered, that everything works fine.. For Universal and non-universal projects, I don't know what was the problem. 
    Wednesday, December 10, 2014 6:38 PM
  • Hi sadworf,

    I think we can temporary close this question, your problem looks wired, and if you still have further questions while using Visual Studio Update 4, please feel free to post on the forum.

    We are warmly to help you solve the problem.

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, December 15, 2014 9:02 AM
    Moderator