locked
compatibility between VS 2012 RC and VS 2012 metro style apps projects

    Question

  • I was developing a metro style app with Windows 8 RP and VS 2012 RC but when I brought my app to Windows 8 Enterprise RTM and VS 2012 it gave me too many errors like these:

    Error 3 The type 'common:LayoutAwarePage' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.

    Error 3 error C2035: a non-virtual destructor with 'public' accessibility is not allowed for this type

    Error 55 error C4585: A WinRT 'public ref class' must either be sealed or derive from an existing unsealed class

    Error 58 error C2919: Operators cannot be used on the published surface of a WinRT type

    Error 79 error C3766:  must provide an implementation for the interface method 'void Windows::UI::Xaml::Data::INotifyPropertyChanged::PropertyChanged::remove

    .

    .

    .

    and many many others that I have no ideas about them

    the bad thing is errors do not clear the main issue so I started to comment my code to find main source lines of the errors I kept it on until nearly all of my code became comment but the main part of the errors did not disappear. I'm completely confused.

    I expect my app build as well as what was in VS 2012 RC

    even samples that I have download them and was working in VS 2012 RC compiles with errors

    is there any resources that can help me update my app?

    Sunday, September 30, 2012 5:32 PM

Answers

  • Error 3 error C2035: a non-virtual destructor with 'public' accessibility is not allowed for this type

    Define non-virtual destructor with public acces are not available in Windows 8 RTM. Destructors are now restricted to only the following combinations of accessibility and virtual:

        • public and virtual (allowed on sealed or unsealed types)
        • protected private and non-virtual (only allowed on unsealed types)
        • private and non-virtual (allowed only on sealed types)

    Error 55 error C4585: A WinRT 'public ref class' must either be sealed or derive from an existing unsealed class

    The compiler now enforces that all unsealed public ref classes have a base class which is also unsealed.  The only classes which do not have this restriction are base classes published in the Windows Runtime.  Therefore, any unsealed public ref class must eventually have a Windows Runtime base class in its inheritance hierarchy.

    Please see the following documents and try to resolve other errors .
    Migrating your Release Preview app to Windows 8



    Sunday, September 30, 2012 6:20 PM

All replies

  • Error 3 error C2035: a non-virtual destructor with 'public' accessibility is not allowed for this type

    Define non-virtual destructor with public acces are not available in Windows 8 RTM. Destructors are now restricted to only the following combinations of accessibility and virtual:

        • public and virtual (allowed on sealed or unsealed types)
        • protected private and non-virtual (only allowed on unsealed types)
        • private and non-virtual (allowed only on sealed types)

    Error 55 error C4585: A WinRT 'public ref class' must either be sealed or derive from an existing unsealed class

    The compiler now enforces that all unsealed public ref classes have a base class which is also unsealed.  The only classes which do not have this restriction are base classes published in the Windows Runtime.  Therefore, any unsealed public ref class must eventually have a Windows Runtime base class in its inheritance hierarchy.

    Please see the following documents and try to resolve other errors .
    Migrating your Release Preview app to Windows 8



    Sunday, September 30, 2012 6:20 PM
  • Thanks
    Sunday, September 30, 2012 6:29 PM