如何添加“安装"?目标到 Xamarin.UWP .csproj 文件? [英] How do I add an "install" target to a Xamarin.UWP .csproj file?

查看:57
本文介绍了如何添加“安装"?目标到 Xamarin.UWP .csproj 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从命令行构建和启动 Xamarin.Forms UWP 应用程序.使用 Visual Studio 2019 的开发人员命令提示符运行以下命令:

I am trying to build and launch a Xamarin.Forms UWP application from the command line. Using the developer command prompt for Visual Studio 2019 I run the following command:

msbuild -t:build "project path\SimToools.UWP.csproj" && msbuild -t:install "project path\SimTools.UWP.csproj"

虽然一旦我运行这个命令,构建就成功完成了,然后我在命令提示符中遇到了这个错误,如下图所示:

Although once I run this command, the build is completed successfully, then I'm met with this error in the command prompt as shown in the image below:

如何在 MSBuild 的 SimTools.UWP.csproj 文件中添加安装目标?

How do I add an install target in the SimTools.UWP.csproj file for MSBuild?

推荐答案

如何将安装"目标添加到 Xamarin.UWP .csproj 文件?

How do I add an "install" target to a Xamarin.UWP .csproj file?

根据以上描述,您已成功构建应用程序.但是在安装应用程序时它会抛出错误.msbuild 不支持安装 UWP 应用.对于安装 UWP 应用程序,您可能需要使用 WinAppDeployCmd.exe 命令工具来实现.有关更多详细信息,请参阅 使用 WinAppDeployCmd.exe 工具安装应用程序 文档.

Derive from above description, you have build the app successfully. But it throw error when install the app. msbuild does not support install the UWP app. And for installing UWP app you may need use WinAppDeployCmd.exe command tool to approach. For more detail please refer Install apps with the WinAppDeployCmd.exe tool document.

这篇关于如何添加“安装"?目标到 Xamarin.UWP .csproj 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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