“未正确加载MonoAndroidDesignerPackage” 15.5.0更新后 [英] "MonoAndroidDesignerPackage was not loaded correctly" after 15.5.0 update

查看:687
本文介绍了“未正确加载MonoAndroidDesignerPackage” 15.5.0更新后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好。
$


升级到版本 15.5.0 后,加载
时我总是收到以下错误 Visual Studio
$


"MonoAndroidDesignerPackage"软件包无法正确加载。

问题可能是由配置更改或安装其他扩展程序引起的。您可以通过检查文件获取更多信息(...) 



在StackOverflow上提供了一个提示后,我删除了
C:\ Users \Hmv \ AppData \Roaming\Microsoft \ VisualStudio \15.0_81fa0221 \ComponentModelCache 文件夹,稍后由Visual Studio重建,但错误仍然存​​在。$


ActivityLog.xml 最后的条目如下:



< entry>

  &NBSP; < record> 853< / record>

  &NBSP; < time> 2017/12/07 17:54:19.641< / time>

  &NBSP; < type>信息< / type>

  &NBSP; < source> VisualStudio< / source>

  &NBSP; < description>开始加载包[MonoAndroidDesignerPackage]< / description>

  &NBSP; < guid> {0BB03E4B-6213-49B5-8226-BAAD41092FEA}< / guid>

  < / entry>

  < entry>

  &NBSP; < record> 854< / record>

  &NBSP; < time> 2017/12/07 17:54:19.672< / time>

  &NBSP; < type>信息< / type>

  &NBSP; < source> VisualStudio< / source>

  &NBSP; < description>输入函数CVsPackageInfo :: HrInstantiatePackage< / description>

  &NBSP; < guid> {1CC14F5C-5102-50A4-8226-BEEF41092FEA}< / guid>

  < / entry>

  < entry>

  &NBSP; < record> 855< / record>

  &NBSP; < time> 2017/12/07 17:54:19.672< / time>

  &NBSP; < type>信息< / type>

  &NBSP; < source> VisualStudio< / source>

  &NBSP; < description>开始加载包[DesignerPackage]< / description>

  &NBSP; < guid> {1CC14F5C-5102-50A4-8226-BEEF41092FEA}< / guid>

  < / entry>

  < entry>

  &NBSP; < record> 856< / record>

  &NBSP; < time> 2017/12/07 17:54:19.672< / time>

  &NBSP; < type>信息< / type>

  &NBSP; < source> VisualStudio< / source>

  &NBSP; < description>结束包装[DesignerPackage]< / description>

  &NBSP; < guid> {1CC14F5C-5102-50A4-8226-BEEF41092FEA}< / guid>

  < / entry>

  < entry>

  &NBSP; < record> 857< / record>

  &NBSP; < time> 2017/12/07 17:54:19.865< / time>

  &NBSP; < type>错误< / type>

  &NBSP; < source> VisualStudio< / source>

  &NBSP; < description> LegacySitePackage for package [MonoAndroidDesignerPackage]来源:& Xamarin.AndroidDesigner&描述:& Xamarin.AndroidDesigner.AndroidDesignerService& Sons的类型初始化器。抛出
例外。&#x000D;& #x000A; System.TypeInitializationException:& Xamarin.AndroidDesigner.AndroidDesignerService& Sons的类型初始化器。抛出一个例外。 ---&安培; GT; System.TypeInitializationException:
& Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier&抛出一个例外。 ---&安培; GT; System.TypeInitializationException:& Xamarin.AndroidDesigner.Styles& Sons& Sons,Inc。的类型初始化器。抛出一个例外。 ---&安培; GT;
System.TypeInitializationException:& Xamarin.Designer.BaseStyles& Sons的类型初始值设定项。抛出一个例外。 ---&安培; GT; System.NullReferenceException:未将对象引用设置为对象的实例。&#x000D;&#x000A; 
 位于E:\ A\_work\10 \\\\Xamarin.Designer \ Xamarin.Designer \Styles.cs中的Xamarin.Designer.BaseStyles.LoadStyles():第295行& #x000D;&安培;#x000A;&NBSP;  位于E:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ;#x000D;&安培;#x000A;&NBSP;   ---内部异常堆栈跟踪结束---&#x000D;&#x000A;  &NBSP;在Xamarin.AndroidDesigner.Styles.LoadStyles()中E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\Styles.cs: line
184&#x000D;&#x000A;  &NBSP;在Xamarin.AndroidDesigner.Styles..cctor()中E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\Styles.cs :第175行&#x000D;&#x000A;    ---内部异常结束
堆栈跟踪---&#x000D;&#x000A;  &NBSP;在Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier..ctor()中E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources\\ \\ ScreenOrientationQualifier.cs:line
35&#x000D;&#x000A;  &NBSP;在Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier..cctor()中E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources\\ \\ ScreenOrientationQualifier.cs:第31行&#x000D;&#x000A; 
  ---内部异常堆栈跟踪结束---&#x000D;&#x000A;  &NBSP;在Xamarin.AndroidDesigner.AndroidDesignerService..cctor()中E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\AndroidDesignerService.cs :line
121&#x000D;&#x000A;    ---内部异常堆栈跟踪结束---&#x000D;&#x000A;  &NBSP;在Xamarin.AndroidDesigner.AndroidDesignerService..ctor()中E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\AndroidDesignerService.cs :line
41&#x000D;&#x000A;  &NBSP;在Xamarin.VisualStudio.Android.Designer.MonoAndroidDesignerService.Initialize(的IServiceProvider的ServiceProvider)在E:\A\_work\10\s\Xamarin.Designer.VisualStudio\src\VisualStudio.Android.Designer \ MonoAndroidDesignerService.cs:line
52&#x000D;&#x000A;  &NBSP;在Xamarin.VisualStudio.Android.Designer.MonoAndroidDesignerPackage.Initialize()中E:\A\_work\10\s\Xamarin.Designer.VisualStudio\src\VisualStudio.Android.Designer\ MonoAndroidDesignerPackage.cs:第52行&#x000D;&#x000A; 
&NBSP;在Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(的IServiceProvider SP)System.TypeInitializationException:为&安培的类型初始值;者; Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier&安培;者;
抛出异常。 ---&安培; GT; System.TypeInitializationException:& Xamarin.AndroidDesigner.Styles& Sons& Sons,Inc。的类型初始化器。抛出一个例外。 ---&安培; GT; System.TypeInitializationException:& Xamarin.Designer.BaseStyles& Sons的类型初始化器。
抛出异常。 ---&安培; GT; System.NullReferenceException:未将对象引用设置为对象的实例。&#x000D;&#x000A;   在E:\ A \\\_work \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ #x000D;&安培;#x000A;&NBSP;  位于E:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ &安培;#x000A;&NBSP;   ---内部异常堆栈跟踪结束---&#x000D;&#x000A; 
&NBSP;在Xamarin.AndroidDesigner.Styles.LoadStyles()中E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\ Styles.cs:第184行&#x000D;&#x000A;   在E:\ A\_work\10 \\\\Xamarin.Designer.Android \ Xamarin.AndroidDesigner \ Xamarin.AndroidDesigner \Styles.cs中的Xamarin.AndroidDesigner.Styles..cctor() :line
175&#x000D;&#x000A;    ---内部异常堆栈跟踪结束---&#x000D;&#x000A;  &NBSP;在Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier..ctor()中E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources\\ \\ ScreenOrientationQualifier.cs:line
35&#x000D;&#x000A;  &NBSP;在Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier..cctor()中E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources\\ \\ ScreenOrientationQualifier.cs:第31行&#x000D;&#x000A; 
  ---内部异常堆栈跟踪结束---&#x000D;&#x000A;  &NBSP;在Xamarin.AndroidDesigner.AndroidDesignerService..cctor()中E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\AndroidDesignerService.cs :line
121System.TypeInitializationException:& Xamarin.AndroidDesigner.Styles& Sons的类型初始化器。抛出一个例外。 ---&安培; GT; System.TypeInitializationException:& Xamarin.Designer.BaseStyles& Sons的类型初始化器。
抛出异常。 ---&安培; GT; System.NullReferenceException:未将对象引用设置为对象的实例。&#x000D;&#x000A;   在E:\ A \\\_work \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ #x000D;&安培;#x000A;&NBSP;  位于E:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ &安培;#x000A;&NBSP;   ---内部异常堆栈跟踪结束---&#x000D;&#x000A; 
&NBSP;在Xamarin.AndroidDesigner.Styles.LoadStyles()中E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\ Styles.cs:第184行&#x000D;&#x000A;  &NBSP;在Xamarin.AndroidDesigner.Styles..cctor()中E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\Styles.cs :line
175&#x000D;&#x000A;    ---内部异常堆栈跟踪结束---&#x000D;&#x000A;  &NBSP;在Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier..ctor()中E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources\\ \\ ScreenOrientationQualifier.cs:line
35&#x000D;&#x000A;  &NBSP;在Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier..cctor()中E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources\\ \\ ScreenOrientationQualifier.cs:line 31System.TypeInitializationException:
& Xamarin.Designer.BaseStyles& Sons的类型初始值设定项。抛出一个例外。 ---&安培; GT; System.NullReferenceException:未将对象引用设置为对象的实例。&#x000D;&#x000A;   在Xamarin.Designer.BaseStyles.LoadStyles()中的
:E:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ #x000D;&安培;#x000A;&NBSP;  位于E:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ &安培;#x000A;&NBSP;   ---
内部异常堆栈跟踪结束---&#x000D;&#x000A;  &NBSP;在Xamarin.AndroidDesigner.Styles.LoadStyles()中E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\Styles.cs:第184行&#x000D;&#x000A; 
 位于E:\ A\_work\10\\\\ Xamarin.Designer.Android \ Xamarin.AndroidDesigner \ Xamarin.AndroidDesigner \\Styles.cs:line 175System.NullReferenceException:对象引用未设置为对象的实例。&#x000D;&#x000A; 
 位于E:\ A\_work\10 \\\\Xamarin.Designer \ Xamarin.Designer \Styles.cs中的Xamarin.Designer.BaseStyles.LoadStyles():第295行& #x000D;&安培;#x000A;&NBSP;  在E:\ A\_work\10 \\\\Xamarin.Designer \ Xamarin.Designer \Styles.cs中的Xamarin.Designer.BaseStyles..cctor():行
208< ; / description>

  &NBSP; < guid> {0BB03E4B-6213-49B5-8226-BAAD41092FEA}< / guid>

  &NBSP; < hr> 80131534< / hr>

  &NBSP; < errorinfo>< / errorinfo>

  < / entry>

  < entry>

  &NBSP; < record> 858< / record>

  &NBSP; < time> 2017/12/07 17:54:19.865< / time>

  &NBSP; < type>错误< / type>

  &NBSP; < source> VisualStudio< / source>

  &NBSP; < description>包[MonoAndroidDesignerPackage]的SetSite失败(null)< / description>

  &NBSP; < guid> {0BB03E4B-6213-49B5-8226-BAAD41092FEA}< / guid>

  &NBSP; < hr> 80131534< / hr>

  &NBSP; < errorinfo>< / errorinfo>

  < / entry>

  < entry>

  &NBSP; < record> 859< / record>

  &NBSP; < time> 2017/12/07 17:54:19.881< / time>

  &NBSP; < type>错误< / type>

  &NBSP; < source> VisualStudio< / source>

  &NBSP; < description>结束包装[MonoAndroidDesignerPackage]< / description>

  &NBSP; < guid> {0BB03E4B-6213-49B5-8226-BAAD41092FEA}< / guid>

  &NBSP; < hr> 80131534< / hr>

  &NBSP; < errorinfo>< / errorinfo>

  < / entry>

解决方案

< span style ="font-family:'Calibri',sans-serif; font-size:11pt"> Hi Helder M. Vieira,


欢迎来到MSDN论坛。


请参阅错误消息,请尝试以下操作来解决此问题:


  1. 清理所有文件夹和文件在文件夹下:%LocalAppData%\ Microsoft /\\VisualStudio \15.0_xxx \然后重新启动VS 2017以再次检查它。
  2. 打开CMD并导航到VS 2017安装文件夹,如C:\Program Files(x86)\ Microsoft Visual Studio \ 2017 \ xxxx \Common7 \IDE并运行命令:devenv / safemode将其作为安全模式运行,
    然后检查已安装的扩展是否导致此问题。如果VS 2017工作正常,请尝试逐个删除已安装的扩展程序以找到它。



同时,我发现
15.5.1 已发布,请以管理员身份重新运行VS 2017安装程序,点击"更新"进行升级,然后检查此问题是否仍然存在。



< p style ="margin-bottom:12pt"> 祝你好运,


Sara


Hello.

After upgrading to version 15.5.0, I always get the following error when I load Visual Studio:

The 'MonoAndroidDesignerPackage' package did not load correctly.
The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file (...) 

Following a tip available on StackOverflow I removed the contents of the C:\Users\Hmv\AppData\Roaming\Microsoft\VisualStudio\15.0_81fa0221\ComponentModelCache folder, which was later rebuilt by Visual Studio, but the error persists.

The ActivityLog.xml last entries are as follows:

<entry>
    <record>853</record>
    <time>2017/12/07 17:54:19.641</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [MonoAndroidDesignerPackage]</description>
    <guid>{0BB03E4B-6213-49B5-8226-BAAD41092FEA}</guid>
  </entry>
  <entry>
    <record>854</record>
    <time>2017/12/07 17:54:19.672</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
    <guid>{1CC14F5C-5102-50A4-8226-BEEF41092FEA}</guid>
  </entry>
  <entry>
    <record>855</record>
    <time>2017/12/07 17:54:19.672</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [DesignerPackage]</description>
    <guid>{1CC14F5C-5102-50A4-8226-BEEF41092FEA}</guid>
  </entry>
  <entry>
    <record>856</record>
    <time>2017/12/07 17:54:19.672</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>End package load [DesignerPackage]</description>
    <guid>{1CC14F5C-5102-50A4-8226-BEEF41092FEA}</guid>
  </entry>
  <entry>
    <record>857</record>
    <time>2017/12/07 17:54:19.865</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>LegacySitePackage failed for package [MonoAndroidDesignerPackage]Source: &apos;Xamarin.AndroidDesigner&apos; Description: The type initializer for &apos;Xamarin.AndroidDesigner.AndroidDesignerService&apos; threw an exception.&#x000D;&#x000A;System.TypeInitializationException: The type initializer for &apos;Xamarin.AndroidDesigner.AndroidDesignerService&apos; threw an exception. ---&gt; System.TypeInitializationException: The type initializer for &apos;Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier&apos; threw an exception. ---&gt; System.TypeInitializationException: The type initializer for &apos;Xamarin.AndroidDesigner.Styles&apos; threw an exception. ---&gt; System.TypeInitializationException: The type initializer for &apos;Xamarin.Designer.BaseStyles&apos; threw an exception. ---&gt; System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at Xamarin.Designer.BaseStyles.LoadStyles() in E:\A\_work\10\s\Xamarin.Designer\Xamarin.Designer\Styles.cs:line 295&#x000D;&#x000A;   at Xamarin.Designer.BaseStyles..cctor() in E:\A\_work\10\s\Xamarin.Designer\Xamarin.Designer\Styles.cs:line 208&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at Xamarin.AndroidDesigner.Styles.LoadStyles() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\Styles.cs:line 184&#x000D;&#x000A;   at Xamarin.AndroidDesigner.Styles..cctor() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\Styles.cs:line 175&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier..ctor() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources\ScreenOrientationQualifier.cs:line 35&#x000D;&#x000A;   at Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier..cctor() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources\ScreenOrientationQualifier.cs:line 31&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at Xamarin.AndroidDesigner.AndroidDesignerService..cctor() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\AndroidDesignerService.cs:line 121&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at Xamarin.AndroidDesigner.AndroidDesignerService..ctor() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\AndroidDesignerService.cs:line 41&#x000D;&#x000A;   at Xamarin.VisualStudio.Android.Designer.MonoAndroidDesignerService.Initialize(IServiceProvider serviceProvider) in E:\A\_work\10\s\Xamarin.Designer.VisualStudio\src\VisualStudio.Android.Designer\MonoAndroidDesignerService.cs:line 52&#x000D;&#x000A;   at Xamarin.VisualStudio.Android.Designer.MonoAndroidDesignerPackage.Initialize() in E:\A\_work\10\s\Xamarin.Designer.VisualStudio\src\VisualStudio.Android.Designer\MonoAndroidDesignerPackage.cs:line 52&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)System.TypeInitializationException: The type initializer for &apos;Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier&apos; threw an exception. ---&gt; System.TypeInitializationException: The type initializer for &apos;Xamarin.AndroidDesigner.Styles&apos; threw an exception. ---&gt; System.TypeInitializationException: The type initializer for &apos;Xamarin.Designer.BaseStyles&apos; threw an exception. ---&gt; System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at Xamarin.Designer.BaseStyles.LoadStyles() in E:\A\_work\10\s\Xamarin.Designer\Xamarin.Designer\Styles.cs:line 295&#x000D;&#x000A;   at Xamarin.Designer.BaseStyles..cctor() in E:\A\_work\10\s\Xamarin.Designer\Xamarin.Designer\Styles.cs:line 208&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at Xamarin.AndroidDesigner.Styles.LoadStyles() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\Styles.cs:line 184&#x000D;&#x000A;   at Xamarin.AndroidDesigner.Styles..cctor() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\Styles.cs:line 175&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier..ctor() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources\ScreenOrientationQualifier.cs:line 35&#x000D;&#x000A;   at Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier..cctor() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources\ScreenOrientationQualifier.cs:line 31&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at Xamarin.AndroidDesigner.AndroidDesignerService..cctor() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\AndroidDesignerService.cs:line 121System.TypeInitializationException: The type initializer for &apos;Xamarin.AndroidDesigner.Styles&apos; threw an exception. ---&gt; System.TypeInitializationException: The type initializer for &apos;Xamarin.Designer.BaseStyles&apos; threw an exception. ---&gt; System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at Xamarin.Designer.BaseStyles.LoadStyles() in E:\A\_work\10\s\Xamarin.Designer\Xamarin.Designer\Styles.cs:line 295&#x000D;&#x000A;   at Xamarin.Designer.BaseStyles..cctor() in E:\A\_work\10\s\Xamarin.Designer\Xamarin.Designer\Styles.cs:line 208&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at Xamarin.AndroidDesigner.Styles.LoadStyles() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\Styles.cs:line 184&#x000D;&#x000A;   at Xamarin.AndroidDesigner.Styles..cctor() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\Styles.cs:line 175&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier..ctor() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources\ScreenOrientationQualifier.cs:line 35&#x000D;&#x000A;   at Xamarin.AndroidDesigner.Resources.ScreenOrientationQualifier..cctor() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources\ScreenOrientationQualifier.cs:line 31System.TypeInitializationException: The type initializer for &apos;Xamarin.Designer.BaseStyles&apos; threw an exception. ---&gt; System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at Xamarin.Designer.BaseStyles.LoadStyles() in E:\A\_work\10\s\Xamarin.Designer\Xamarin.Designer\Styles.cs:line 295&#x000D;&#x000A;   at Xamarin.Designer.BaseStyles..cctor() in E:\A\_work\10\s\Xamarin.Designer\Xamarin.Designer\Styles.cs:line 208&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at Xamarin.AndroidDesigner.Styles.LoadStyles() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\Styles.cs:line 184&#x000D;&#x000A;   at Xamarin.AndroidDesigner.Styles..cctor() in E:\A\_work\10\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\Styles.cs:line 175System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at Xamarin.Designer.BaseStyles.LoadStyles() in E:\A\_work\10\s\Xamarin.Designer\Xamarin.Designer\Styles.cs:line 295&#x000D;&#x000A;   at Xamarin.Designer.BaseStyles..cctor() in E:\A\_work\10\s\Xamarin.Designer\Xamarin.Designer\Styles.cs:line 208</description>
    <guid>{0BB03E4B-6213-49B5-8226-BAAD41092FEA}</guid>
    <hr>80131534</hr>
    <errorinfo></errorinfo>
  </entry>
  <entry>
    <record>858</record>
    <time>2017/12/07 17:54:19.865</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [MonoAndroidDesignerPackage](null)</description>
    <guid>{0BB03E4B-6213-49B5-8226-BAAD41092FEA}</guid>
    <hr>80131534</hr>
    <errorinfo></errorinfo>
  </entry>
  <entry>
    <record>859</record>
    <time>2017/12/07 17:54:19.881</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [MonoAndroidDesignerPackage]</description>
    <guid>{0BB03E4B-6213-49B5-8226-BAAD41092FEA}</guid>
    <hr>80131534</hr>
    <errorinfo></errorinfo>
  </entry>

解决方案

Hi Helder M. Vieira,

Welcome to the MSDN forum.

Refer to the error message, please have a try the following to troubleshoot this issue:

  1. Clean up all folders and files under the folder: %LocalAppData%\Microsoft\VisualStudio\15.0_xxx\ and restart the VS 2017 to check it again.
  2. Open CMD and navigate to the VS 2017 installation folder like C:\Program Files (x86)\Microsoft Visual Studio\2017\xxx\Common7\IDE and run the command: devenv /safemode to run it as safe mode, then check if the installed extensions caused this issue. If VS 2017 works fine, please try to remove the installed extensions one by one to find it.

Meanwhile, I found the 15.5.1 is released and please re-run the VS 2017 installer as administrator, click ‘Update’ to upgrade it, then check if this issue persists or not.

Best regards,

Sara


这篇关于“未正确加载MonoAndroidDesignerPackage” 15.5.0更新后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆