locked
.NET for Metro style apps reference missing - VS11 express beta

    Question

  • Every now and again I lose the references to '.NET for Metro style apps' and the 'Windows.winmd' in my metro app. The first couple of times restarting VS11 beta (express by the way) sorted it. Now they are gone completely and I can not get them back.

    I have tried adding all the individual files in the .NET framework and the Windows file separately, however mscorlib refuses to reference saying that the build system already has a reference to it, so I am still unable to build. Even adding the Windows.winmd file back in as a reference still doesn't produce any usable Metro references (they still don't resolve).

    I have just tried to create a brand new project and copy all the files across from the old broken project. I left all the usual suspects out (the package manifest, the cert, the non-code folders, etc) but things are STILL broken. Now, I can create a new (grid application) project and it will build but once I copy all the code files across (I reiterate, no special files are copied, just the App.xaml) it no longer works.

    I have also tried a 'full' shutdown.

    I have no idea where to look for solutions to this, but clearly there is an issue, so I am hoping one of you MS engineers out there can at least point me in the direction of a fix/log/option for resolving this.

    Quick specs:

    • Samsung Series 7 slate
    • VS11 express beta
    • C# project

    Cheers in advance!

    edit: oh, and no, I can't re-add them as references using the framework section of the new references dialog and yes, I can use the object browser to browse, and can browser to everything; they certainly 'look' like they are referenced from that side of things.



    Saturday, May 19, 2012 10:03 PM

Answers

All replies

  • Hello Jono,

    As far as I know that after you create a metro style application successfully, the ".NET for Metro style apps" references will be added to the project automatically. And if you create a new metro style application, will you get that reference added?

    And please also offer me the detailed errors you got.

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Monday, May 21, 2012 8:42 AM
    Moderator
  • Yes, they do appear on new projects, and yes, they WERE in the original project.

    VS did crash at the time, so below are the two errors from the error log. There are no other related errors at all.

    Faulting application name: VSWinExpress.exe, version: 11.0.50214.1, time stamp: 0x4f3a2a00

    Faulting module name: KERNELBASE.dll, version: 6.2.8250.0, time stamp: 0x4f3f348a

    Exception code: 0xe0434352

    Fault offset: 0x000156c4

    Faulting process id: 0x28

    Faulting application start time: 0x01cd34cb232f60d2

    Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\VSWinExpress.exe

    Faulting module path: C:\WINDOWS\SYSTEM32\KERNELBASE.dll

    Report Id: 4f2fe173-a191-11e1-a110-88532e651151

    Faulting package full name:

    Faulting package-relative application ID:

    ---------------------------------------------------------------------------------------------------------------------------------------------------------

    Application: VSWinExpress.exe

    Framework Version: v4.0.30319

    Description: The process was terminated due to an unhandled exception.

    Exception Info: System.ArgumentNullException

    Stack:

       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__0(System.Object)

       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

       at System.Windows.Threading.DispatcherOperation.InvokeImpl()

       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)

       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

       at System.Windows.Threading.DispatcherOperation.Invoke()

       at System.Windows.Threading.Dispatcher.ProcessQueue()

       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

       at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)

       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

       at System.Windows.Threading.DispatcherOperation.InvokeImpl()

       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)

       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

       at System.Windows.Threading.DispatcherOperation.Invoke()

       at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherOperation, System.Threading.CancellationToken, System.TimeSpan)

       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)

       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)



    Monday, May 21, 2012 9:25 AM
  • Looks like it has happened again...

    No VS crash this time...

    Although now I am getting a whole mess of COM exceptions... My advice - if no one else is getting this, don't develop on a Samsung Series 7 slate!

    Wednesday, May 30, 2012 10:46 PM
  • I have managed to repro it:

    https://connect.microsoft.com/VisualStudio/feedback/details/746062/net-for-metro-apps-and-windows-winmd-references-missing#tabs

    The bug is logged under VS 2012RC, even though I haven't had a chance to repro it on that yet.

    Saturday, June 2, 2012 9:21 PM