none
When create a new wp7 app use studio 2010, and open App.xaml, an error occurred. RRS feed

  • 问题

  • Error List:

    Error 1 System.ArgumentNullException was thrown on "C:\Users\Administrator\documents\visual studio 2010\Projects\WindowsPhoneApplication2\WindowsPhoneApplication2\App.xaml": Value cannot be null.
    Parameter name: parentContext C:\Users\Administrator\documents\visual studio 2010\Projects\WindowsPhoneApplication2\WindowsPhoneApplication2\App.xaml 1 1 WindowsPhoneApplication2

    Details:

    System.InvalidProgramException
    Common Language Runtime detected an invalid program.
       at System.ComponentModel.TypeConverterAttribute..ctor(Type type)
       at MS.Internal.Metadata.IntrinsicMetadata.AddTypeConverterAttributes()
       at MS.Internal.Metadata.IntrinsicMetadata.get_CustomAttributes()
       at Microsoft.Windows.Design.Platform.SilverlightMetadataContext..ctor()
       at Microsoft.Windows.Design.Platform.SilverlightMetadataContext..ctor(DesignerPlatform platformFactory, Platform blendPlatform)
       at MS.Internal.Platform.SilverlightPlatformImpl.get_MetadataContext()
       at MS.Internal.Platform.SlmPlatformImpl.get_MetadataContext()
       at MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.EnsurePlatformInitialized()
       at MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.EnsurePlatformInitialized()
       at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProvider(String originalIdentifier, Boolean isGlobal, String identity, FrameworkName frameworkName, AssemblyName appAssemblyName, IVsHierarchy hierarchy)
       at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProviderWorker(String identifier, IServiceProvider provider)
       at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProvider(String identifier, IServiceProvider provider)
       at MS.Internal.Providers.VSDesignerContext.CreateIsolationProvider(IServiceProvider provider, IVsHierarchy hierarchy)
       at MS.Internal.Providers.VSDesignerContext.<>c__DisplayClass1.<Initialize>b__0(IsolationProviderProxy i)
       at MS.Internal.Providers.IsolationProviderProxy.get_RealProvider()
       at MS.Internal.Providers.IsolationProviderProxy.add_UnhandledException(UnhandledExceptionEventHandler value)
       at MS.Internal.Designer.DesignerPane.LoadDesignerView()

    2012年4月14日 15:09

全部回复

  • HI,

    Could you try to restart you visual studio to see if it work,

    if it does not work, you could try the following work around


    https://connect.microsoft.com/VisualStudio/feedback/details/558197/creating-the-silverlight-business-application-visual-c-error-in-mainpage-xaml

    Thank you for reporting this. It is a known issue, and we still trying to track down why it is occurring. It appears as if somehow a version 3 System.dll from Silverlight got GAC'ed to the .Net Framework GAC on this machine. SL3 and SL4 share the same fusion version numbers - so a request for version 4 from the desktop looks like a request for version 3. Version 3 does not include ISupportInitialize, which is why the exception appears.

    To fix this, please open a VS 2010 command prompt and do
    gacutil /l | findstr 2.0.5.0

    If you see any results matching - that means a silverlight assembly has been added to the gac. 
    This would need to be removed using the full string you get out of gacutil representing the assembly name - e.g. the full assembly name including 
    gacutil /uf System, version 2.0.5.0, Culture=something, PublicKeyToken=asdklajsdlkajsd.
    More details on using gacutil: http://msdn.microsoft.com/en-us/library/ex0ss12c(VS.80).aspx

    Please correct me if my concept is wrong


    Chi


    2012年4月14日 17:25
    版主