如何重新连接已撤消连接的VS / Xamarin项目?

时间:2014-03-28 23:04:42

标签: visual-studio-2013 xamarin.android xamarin visual-studio-extensions

我已经在Visual Studio中试验/检查了Xamarin的最后几次发呆。

昨天,我打开了Android SDK Manager,看到有四个(我认为是)需要更新的软件包。但是,尝试这样做失败了,说“文件夹无法移动。在Windows上,这通常意味着android sdk manager ... ")。

然后我关闭并重新启动了VS2013 / Xamarin。后续尝试打开SDK管理器只会导致错误消息("由于意外异常,命令未成功执行。请检查输出窗口以获取更多信息")。以下是"更多细节":

System.ComponentModel.Win32Exception(0x80004005):系统找不到指定的文件    在System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)    在System.Diagnostics.Process.Start()    在Mono.VisualStudio.Extension.ProcessWrapper.RunWithOutput(String executable,Int32 waitTime,String workingDir,IVsOutputWindowPane outputPane,String [] arguments)    在Mono.Android.VisualStudio.MonoAndroidSdk.StartAndroidSdkManager()    在Mono.Android.VisualStudio.Commands.StartSdkManager.Execute(IMenuCommand命令)    在Mono.VisualStudio.Extension.Commands.VsCommandExtensionAdapter。<> c__DisplayClass5.b__3()    在Mono.VisualStudio.Extension.TracingExtensions.ShieldUI(ITracer tracer,Action action,String format,String [] args)

现在(即使在重新启动Windows之后)我甚至无法打开项目,因为我认为,这是因为侧面升级的中断状态。这些是我看到的:

enter image description here

enter image description here

enter image description here

还有这些错误的消息:

不支持的 此版本的Visual Studio无法打开以下项目。可能未安装项目类型或此版本的Visual Studio可能不支持它们。 有关启用这些项目类型或以其他方式迁移资产的详细信息,请参阅"迁移报告"单击确定后显示。       - PlatypusMobile.Android," C:\ Users \ clay \ documents \ visual studio 2013 \ Projects \ PlatypusMobile \ PlatypusMobile.Android.csproj "

需要进行非功能性更改 Visual Studio将自动对以下项目进行非功能性更改,以使它们能够在Visual Studio 2013,Visual Studio 2012和Visual Studio 2010 SP1中打开。项目行为不会受到影响。       - PlatypusMobile," C:\ Users \ clay \ documents \ visual studio 2013 \ Projects \ PlatypusMobile \ PlatypusMobile.sln"

另外,其中一个错误的消息说要查看:

C:\users\clay\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml

以下是最有趣的部分:

<?xml version="1.0" encoding="utf-16"?>
<?xml-stylesheet type="text/xsl" href="ActivityLog.xsl"?>
<activity>
  <entry>
    <record>1</record>
    <time>2014/03/28 15:03:09.061</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Microsoft Visual Studio 2013 version: 12.0.30110.0</description>
  </entry>
  <entry>
    <record>2</record>
    <time>2014/03/28 15:03:09.061</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Running in User Groups: Administrators Users</description>
  </entry>
  <entry>
    <record>3</record>
    <time>2014/03/28 15:03:09.061</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Available Drive Space: C:\ drive has 820592128000 bytes</description>
  </entry>
. . .
  <entry>
    <record>924</record>
    <time>2014/03/28 15:03:55.266</time>
    <type>Error</type>
    <source>Extension Manager</source>
    <description>Extension will not be loaded because an extension with the same ID &apos;Microsoft.Windows.DevelopmentKit.Desktop&apos; is already loaded at C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.0\DESKTOP SDK\...</description>
    <path>C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.1\DESKTOP SDK\</path>
  </entry>
  . . .
  <entry>
    <record>1001</record>
    <time>2014/03/28 15:04:42.000</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [MonoAndroidPackage]</description>
    <guid>{296E6A4E-2BD5-44B7-A96D-8EE3D9CDA2F6}</guid>
  </entry>
  <entry>
    <record>1011</record>
    <time>2014/03/28 15:09:31.962</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [MonoAndroidPackage]</description>
    <guid>{296E6A4E-2BD5-44B7-A96D-8EE3D9CDA2F6}</guid>
    <hr>80131509</hr>
    <errorinfo>This property is not valid when the SDK is not installed</errorinfo>
  </entry>
  <entry>
    <record>1012</record>
    <time>2014/03/28 15:09:31.963</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [MonoAndroidPackage]</description>
    <guid>{296E6A4E-2BD5-44B7-A96D-8EE3D9CDA2F6}</guid>
    <hr>80131509</hr>
    <errorinfo>This property is not valid when the SDK is not installed</errorinfo>
  </entry>
  <entry>
    <record>1014</record>
    <time>2014/03/28 15:17:40.128</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [MonoAndroidPackage]</description>
    <guid>{296E6A4E-2BD5-44B7-A96D-8EE3D9CDA2F6}</guid>
  </entry>
  <entry>
    <record>1015</record>
    <time>2014/03/28 15:17:42.660</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [MonoAndroidPackage]</description>
    <guid>{296E6A4E-2BD5-44B7-A96D-8EE3D9CDA2F6}</guid>
    <hr>80131500</hr>
    <errorinfo>There is already a logger with the name 'Xamarin.Android'</errorinfo>
  </entry>
  <entry>
    <record>1016</record>
    <time>2014/03/28 15:17:42.660</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [MonoAndroidPackage]</description>
    <guid>{296E6A4E-2BD5-44B7-A96D-8EE3D9CDA2F6}</guid>
    <hr>80131500</hr>
    <errorinfo>There is already a logger with the name 'Xamarin.Android'</errorinfo>
  </entry>
</activity>

如何重新组合破碎的碎片并让项目再次打开,以便我可以重试升级Android SDK包?可以将Humpty-Dumpty重新组合在一起吗?

注意:与此同时,我在Android Studio中启动并运行了第一个应用程序。

2 个答案:

答案 0 :(得分:1)

尝试从Xamarin Studio升级Android SDK包怎么样? 你可以去工具 - &gt;打开Android SDK Manager ...

答案 1 :(得分:1)

对我来说,VS restart解决了iOS和Android项目的不兼容问题