locked
VS 2012 xaml editor crashes with argumentNullException - just after Win8 Update.

    Question

  • Yesterday, the world was still in order. Today my win8 was updated. 

    It's impossible to load a store app into the xaml-designer. It's impossible to make a new form. the error is:

    <quote>System.ArgumentNullException Value cannot be null. Parametername: key at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Microsoft.Expression.DesignModel.Metadata.PlatformMetadataBase.NewReplacedExternalType(PlatformMetadataBase platformMetadata, IPlatformTypes sourcePlatformTypes, IAssembly assembly, Type keyType, Type replaceType, ITypeId baseType, ITypeId neutralType, IXmlNamespace xmlNamespace, String clrNamespace, AttributeCollection attributes, ProxyPropertyDescription[] properties) at Microsoft.Expression.DesignModel.Metadata.PlatformMetadataBase.NewReplacedExternalType(PlatformMetadataBase platformMetadata, IPlatformTypes sourcePlatformTypes, IAssembly assembly, Type keyType, Type replaceType, ITypeId baseType, ITypeId neutralType, IXmlNamespace xmlNamespace, String clrNamespace, ProxyPropertyDescription[] properties) at Microsoft.Expression.WindowsXamlPlatform.WindowsUIXamlPlatformMetadata.OnInitialize() at Microsoft.Expression.WindowsXamlPlatform.WindowsUIXamlPlatform.Initialize() at Microsoft.Expression.Platform.PlatformCreatorBase.CreatePlatform(IPlatformReferenceAssemblyResolver referenceAssemblyResolver) at Microsoft.Expression.DesignSurface.Project.ProjectContextBase.Initialize() at Microsoft.Expression.DesignSurface.Project.XamlProjectContext.Initialize() at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetProjectContext(IHostProject project, IPlatform platform, Boolean create) at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetSourceItemContext(IHostSourceItem sourceItem) at Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<>c__DisplayClass12.<microsoft.expression.designhost.isolation.remoting.iremotedesignerservice.createdesigner>b__f(CancellationToken cancelToken) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.CallWithCancellation[TResult](IRemoteCancellationToken remoteToken, Func`2 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<microsoft.expression.designhost.isolation.remoting.iremotedesignerservice.createdesigner>b__e() at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<marshalin>b__15() at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker() System.ArgumentNullException Value cannot be null. Parameter name: key Server stack trace: at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal) at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken remoteToken) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg) Exception rethrown at [0]: bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) bei Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken cancelToken) bei Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass8.<createdesignerimpl>b__6(IRemoteDesignerService d) bei Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass4`2.<marshalout>b__3() bei Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker() System.ArgumentNullException Value cannot be null. Parameter name: key bei Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal) bei Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action, Int32 targetApartmentId, WaitHandle aborted, WaitHandle timeoutSignal) bei Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CallSynchronizationMode syncMode, WaitHandle timeoutSignal) bei Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action action, CallSynchronizationMode syncMode) bei Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`2 func, CallSynchronizationMode syncMode) bei Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IHostSourceItem item, IHostTextEditor editor, RemoteCancellationToken remoteCancelToken) bei Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass12.<microsoft.expression.designhost.idesignerservice.createdesigner>b__11(RemoteCancellationToken remoteToken) bei Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CallWithCancellation[TResult](CancellationToken cancelToken, Func`2 func) bei Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken) bei Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken) </microsoft.expression.designhost.idesignerservice.createdesigner></marshalout></createdesignerimpl></marshalin></microsoft.expression.designhost.isolation.remoting.iremotedesignerservice.createdesigner></microsoft.expression.designhost.isolation.remoting.iremotedesignerservice.createdesigner></quote>

    O.F.

    Update: I de-installed VisualStudio and installed it again. the error persists. If I open the xaml with blend - the same error occurs. 
    Wednesday, July 17, 2013 2:39 PM

Answers

  • I believe this is a known issue. Please check if your if your program files folder (Program Files -> Properties -> Security Tab) has these permissions set for "ALL APPLICATION PACKAGES" >> Read, Read & Execute , List Folder contents. We have seen that these permissions get removed sometimes on users computers. If not please add these to the folder and your problem should be solved. You can use the below command to do the same

    icacls "C:\Program Files (86)" *S-1-15-2-1:(CI)(F)


    Dev@Mic

    • Marked as answer by otto.fischer Saturday, July 20, 2013 8:47 AM
    Friday, July 19, 2013 4:58 PM

All replies

  • Hi otto.fischer,

    Do you mean after you installed some VS updates then the VS2012 crashes? Or you update your win8 to win8.1? 

    Try to remove the updates you installed, and delete the project obj/bin folder to rebuild the project to see if the problem still exist.

    Good luck,


    James He
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, July 18, 2013 7:57 AM
    Moderator
  • Hello James,

    the "update" was the automatic update of windows 8. I do not know how to "undo" that. maybe that was just a coincidence.

    Blend-Version: 5.0.40218.0

    the info from VS:

    Microsoft Visual Studio Professional 2012
    Version 11.0.60610.01 Update 3
    Microsoft .NET Framework
    Version 4.5.50743

    Installed Version: Professional

    LightSwitch for Visual Studio 2012   04938-004-0033001-02884
    Microsoft LightSwitch for Visual Studio 2012

    Office Developer Tools   04938-004-0033001-02884
    Microsoft Office Developer Tools

    Team Explorer for Visual Studio 2012   04938-004-0033001-02884
    Microsoft Team Explorer for Visual Studio 2012

    Visual Basic 2012   04938-004-0033001-02884
    Microsoft Visual Basic 2012

    Visual C# 2012   04938-004-0033001-02884
    Microsoft Visual C# 2012

    Visual C++ 2012   04938-004-0033001-02884
    Microsoft Visual C++ 2012

    Visual F# 2012   04938-004-0033001-02884
    Microsoft Visual F# 2012

    Visual Studio 2012 Code Analysis Spell Checker   04938-004-0033001-02884
    Microsoft® Visual Studio® 2012 Code Analysis Spell Checker

    Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

    The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

    Visual Studio 2012 SharePoint Developer Tools   04938-004-0033001-02884
    Microsoft Visual Studio 2012 SharePoint Developer Tools

    Windows Phone SDK 8.0 - DEU   04938-004-0033001-02884
    Windows Phone SDK 8.0 - DEU

    AlignAssignments   1.0
    Command for aligning assignments.

    All-In-One Code Framework Sample Browser   1.0
    Sample Browser Visual Studio Extension allows developers to search and download 3500+ code samples from within Visual Studio 2012 and Visual Studio 2010. It is provided by Microsoft All-In-One Code Framework in partnership with Visual Studio Team and MSDN Samples Gallery. The Sample Browser targets to put the power of thousands of code samples at developers' fingertips.

    AutoBraceComplete   1.0
    auto brace complete

    CustomDocWell   1.0
    Provides configurable behavior for the document well in Visual Studio 2012.

    Devart Template Editor   1.0.7.0
    Editor for T4 and Devart template files with syntax coloring and IntelliSense.

    Entity Framework Power Tools   1.0
    Adds useful design-time DbContext features to the Visual Studio Solution Explorer context menu. 

    When right-clicking on a file containing a derived DbContext class, the following context menu functions are supported:

    1) View Entity Data Model - Displays the underlying Code First model in the Entity Framework designer.
    2) View Entity Data Model XML - Displays the EDMX XML representing the underlying Code First model.
    3) Generate Views - Generates pre-compiled views used by the EF runtime to improve start-up performance. Adds the generated views file to the containing project.

    GhostDoc   4.5.13017.0
    GhostDoc automatically generates XML documentation comments.

    Microsoft Advertising SDK for Windows Phone   6.2.923.0
    Microsoft Advertising SDK for Windows Phone
    Build 6.2.923.0

    Microsoft Python Tools for Visual Studio   2.0.10620.00
    Python Tools for Visual Studio provides intellisense, project support, project and item templates, as well as a REPL window for Python development.

    Microsoft Python Tools for Visual Studio - Django Integration   2.0.10620.00
    Provides templates and integration for the Django web framework.

    Microsoft Python Tools for Visual Studio - Profiling Support   2.0.10620.00
    Profiling support for Python projects.

    Microsoft XNA Game Studio   4.0
    Microsoft XNA Game Studio 4.0
    Build 4.0.40906.0

    Multilingual App Toolkit   2.0.1000.0
    Multilingual App Toolkit helps you localize your Windows Store app by providing file management, pseudo and machine translation, translation editor, and build integration. http://go.microsoft.com/fwlink?linkid=245767

    NuGet Package Manager   2.6.40627.9000
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

    OneCodeQuickLaunchPackage   1.0
    Information about my package

    OptionsPageImpl   1.0
    Information about my package

    PowerCommands for Visual Studio 2010   1.0
    A set of power commands for Visual Studio 2010

    PreEmptive Analytics Visualizer   1.0
    Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

    Quick Launch Tasks   1.0
    Microsoft Quick LaunchTasks package adds accessibility and settings tasks to the Quick Launch tool.

    SQL Server Data Tools   11.1.20905.0
    Microsoft SQL Server Data Tools

    T4 Toolbox   11.0.0.0
    Extends code generation capabilities of Text Templates.

    Visual Studio 11 Editor Extension   1.0
    Information about my package

    VisualSVN   3.5.0
    Integration with Subversion version control. For more information about VisualSVN, see the VisualSVN website at http://www.visualsvn.com
    Copyright © 2005-2013 VisualSVN Ltd. All rights reserved.

    Web Developer Tools   1.3.40412.0
    Microsoft Web Developer Tools contains the following components:
    Page Inspector: Tool that offers an efficient way to decompose Web Applications and diagnose front-end issues.
    Web Publishing: Extensions required for Web Publishing for both hosted servers as well as on premises.
    Web Form Templates: Includes the default templates for Web Form Applications.
    Editor Extensions: Includes HTML, CSS, and JS editor extensions that greatly enhance the development experience.

    Windows Azure Tools   2.0
    Windows Azure Tools for Microsoft Visual Studio 2012 - v2.0.60409.1601

    XamlHelpmeet   1.0
    Derivative version of XAML Power Toys by Karl Shifflett originally designed and compiled for VS 2008 and 2010. This version has been rewritten in C# and is designed for installation in VS 2012.

    XamlStylerVSPackage   1.0
    Xaml Styler.

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

    Operating System:

    WIndows 8 Enterprise Evaluation

    Version 6.2.9200 Build 9200

    _-------------------------------------

    Regards & thanks for the good wishes -:)) 

    Otto


    O.F.


    • Edited by otto.fischer Thursday, July 18, 2013 8:11 AM added: Blend-Version
    Thursday, July 18, 2013 8:09 AM
  • Hi otto,

    To view your system updates, you can press Win+i to open the "control panel", then "Uninstall a program", then "View installed updates", try to uninstall your last update to see if the VS works. 

    But I do not think this will be the solution, Or can you tell me how many VS updates you installed?


    James He
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, July 18, 2013 8:58 AM
    Moderator
  • Hi James,

    immediately before the first crash I have not installed any updates for VS. In the weeks before I installed the updates 1,2 and 3.
    Now I have uninstalled VS and after that I VS installed directly with Update 3.

    Deleting the bin Folder has no effect.

    Even when I add a new store-app in blend (or visual Studio) I get the error.


    O.F.

    Thursday, July 18, 2013 9:10 AM
  • Hi otto, 

    After you install the update 3, did you restart your machine? 

    Try to install this update to see if works or not  http://support.microsoft.com/kb/2781514/en-us



    James He
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, July 18, 2013 9:22 AM
    Moderator
  • Hi James,

    yes, I restarted the machine.

    and no: the patch did not work for me. the Installation was smooth - I did a reboot - and the Problem persists. I think Expression Blend causes the error.


    O.F.

    Thursday, July 18, 2013 9:43 AM
  • I want to chime in as well since I am having the same exact issue. My VS2012 XAML Designer and Blend Designer is broken with the same error message.

    • I've tried Repairing my Visual Studio 2012 installation.
    • I've tried messing with the Security/Permissions of the Local/AppData/Packages folder by adding "ALL APPLICATION PACKAGES" (didn't work and then I removed it...didn't feel comfortable with this one).
    • I've tried running "sfc /scannow" and also "chkdsk".
    • I have all the latest updates for Windows 8 (not 8.1) and Visual Studio (update 3).

    I hope this can be resolved soon.

    Thanks.

    Thursday, July 18, 2013 12:09 PM
  • Hi All,

    As far as I know, some more developers also meet such issue.

    And I will report this issue to Microsoft to see if we can have some solutions, so please be patient. 

    Thank you for supporting Windows Store App forum.


    James He
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, July 19, 2013 2:56 AM
    Moderator
  • Hi All,

    I just opend a bug-Report in Connect.

    https://connect.microsoft.com/VisualStudio/feedback/details/794455/vs-2012-xaml-editor-crashes-with-argumentnullexception-just-for-store-apps

    feel free to vote for it -:))

    Regards, Otto


    O.F.

    Friday, July 19, 2013 5:03 AM
  • Hi Otto,

    After this error, does Intellisense and Outlining stop working within XAML files?

    Friday, July 19, 2013 12:01 PM
  • Hi Chris,

    you are right; IntelliSense and Outlining stoped working. (in Store-App XAML-files),


    O.F.

    Friday, July 19, 2013 12:50 PM
  • I believe this is a known issue. Please check if your if your program files folder (Program Files -> Properties -> Security Tab) has these permissions set for "ALL APPLICATION PACKAGES" >> Read, Read & Execute , List Folder contents. We have seen that these permissions get removed sometimes on users computers. If not please add these to the folder and your problem should be solved. You can use the below command to do the same

    icacls "C:\Program Files (86)" *S-1-15-2-1:(CI)(F)


    Dev@Mic

    • Marked as answer by otto.fischer Saturday, July 20, 2013 8:47 AM
    Friday, July 19, 2013 4:58 PM
  • Hi Harikrishna,

    This solution seems a little fishy to me. Am I just being paranoid? Is it a good idea to give ALL_APPLICATION_PACKAGES the requested permissions?

    I tried this and it did work. But I want to make sure I'm not exposing my PC to any unnecessary risks by making your proposed change.

    Thanks.

    Friday, July 19, 2013 5:47 PM
  • Worked.

    I'm happy.

    Thanks.


    O.F.

    Saturday, July 20, 2013 8:51 AM
  • If you look at a fresh install on Windows 8, you will see that the folder will have the permissions I have mentioned above.

    Dev@Mic

    Saturday, July 20, 2013 8:02 PM
  • Ok. Sounds good then. Thanks for helping us out.
    Monday, July 22, 2013 1:54 PM
  • Hi Harikrishna

    I had problems attempting your fix. Below is a copy from my cmd.exe shell session. I attempted to fix the first error by adding a "/grant" option, however no files were processed. I am not sure what I am missing . 

    thanks

    C:\>icacls "C:\Program Files (86)" *S-1-15-2-1:(CI)(F)
    Invalid parameter "*S-1-15-2-1:(CI)(F)"
    
    C:\>icacls "C:\Program Files (86)" /grant *S-1-15-2-1:(CI)(F)
    C:\Program Files (86): The system cannot find the file specified.
    Successfully processed 0 files; Failed processing 1 files
    
    C:\>


    Edit: I fixed the problem. The file path is missing an "x" and should be "C:\Program Files (x86)".

    • Edited by j scharf Tuesday, September 03, 2013 8:59 AM Solved my own issue.
    Monday, September 02, 2013 9:26 PM