且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Visual Studio 2017建筑&部署问题 - Xamarin Android项目

更新时间:2023-02-27 11:37:34

Hi KeeganG,

Hi KeeganG,

欢迎来到MSDN fourm。

Welcome to MSDN fourm.

由于本论坛将讨论MSBuild(主题包括:MSBuild的使用,构建自定义和MSBuild通过任务,记录器和托管的可扩展性,我们很难确定它是否与VS,项目本身
或其他相关,我没有直接的解决方案,但是我想提供一些麻烦:

Since this forum is to discuss the MSBuild(Topics including: usage of MSBuild, build customization, and MSBuild extensibility via tasks, loggers and hosting), it is hard for us to make sure that whether it is related to the VS, the project itself or others, I have no direct solution for this issue, but I would like provide your some troublestootings:

1。检查您的项目以查看是否有任何损坏的引用。 (标有黄色三角形)删除所有损坏的参考文献。重新编译。对我们来说,错误是VS使用这种误导性错误"ResolveLibraryProjectImports"不正确地报告了破坏的引用。
任务意外失败'。

1. Check your projects to see if there are any broken references. (marked with yellow triangle) Delete all broken references. Recompile. For us, the bug is that VS improperly reports broken refs with this misleading error '"ResolveLibraryProjectImports" task failed unexpectedly'.

2。请打开管理CMD窗口并导航到C:\Program Files(x86)\ Microsoft Visual Studio\2017 \ Enterprise.com \Common7 \IDE并运行以下命令:

                 devenv / safemode

它可以防止Visual Studio启动时加载所有第三方VSPackage,从而确保稳定执行。如果有效,则此问题应由扩展程序引起,您需要删除工具扩展程序和更新下的已安装扩展程序。

2. Please open an administrative CMD window and navigate to C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE and run these commands:
                devenv /safemode
It prevents all third-party VSPackages from loading when Visual Studio starts, thus ensuring stable execution. if it works, this issue should be caused by the extensions and you need to remove the installed extensions under Tools—Extensions and Updates.

3 。如果它无法在安全模式下运行,请尝试删除或重命名以下文件夹:

C:\ Users \<您的用户名称> \ AppData \本地\\ \\ Microsoft /\\ VisualStudio \ 15.0
$
C:\ Users \<您的用户名称> \ AppData \Roaming\Microsoft \ VisisStudio \15.0
¥b $ b同时,以管理员身份运行visual studio,禁用计算机上的任何Anti-Virus或Anti-Spyware软件并清除%temp%文件夹。

3. If it doesn’t work in safe mode, please have a try with delete or rename the following folders:
C:\Users\<your users name>\AppData\Local\Microsoft\VisualStudio\15.0
C:\Users\<your users name>\AppData\Roaming\Microsoft\VisualStudio\15.0
Meanwhile, run visual studio as administrator, disable any Anti-Virus or Anti-Spyware software on your computer and clean %temp% folder.

4。重新安装Xamarin.Forms。

4. Reinstall Xamarin.Forms.

5。从磁盘C中创建一个新的空白项目,例如  D.将脚本复制到新项目,然后构建它,检查它是否有效。

5. Create a new blank project out of disk C, for example, D. Copy scripts to the new project, then build it, check if it works.

此外,由于您正在开发Xamarin.Android项目,我建议您可以在$上打开一个新线程b $ b Xamarin 论坛。

Besides, since you are developing the Xamarin.Android project, I suggest that you can open a new thread on Xamarin forum.

希望这会有所帮助。