简体   繁体   English

无法为商店UWP创建发布应用程序包

[英]can't create release app package for store UWP

I am creating an application with Ionic / Cordova that must work on Windows 10. The application works well when I build it from Visual Studio in "debug" and "x64" configuration. 我正在使用Ionic / Cordova创建一个必须在Windows 10上运行的应用程序。当我从Visual Studio以“调试”和“ x64”配置构建它时,该应用程序运行良好。 But when I want to create an app package from "Project" > "Store" > "Create App Package", it fails with error : 但是,当我想从“项目”>“商店”>“创建应用程序包”创建应用程序包时,它失败并显示错误:

Error MSB6006 "ilc.exe" exited with code 1200

Digging deeper, I can find in the output tab the error : 深入研究,我可以在输出选项卡中找到错误:

System.InvalidOperationException: Le nom de propriété "MSBuildToolsPath" est réservé

It's in French, I can't get the equivalent in English, it seems to mean "Property name MSBuildToolsPath is reserved" 它是法语的,我无法用英语找到等效的名称,这似乎意味着“保留了MSBuildToolsPath属性名称”

Complete error message : 完整的错误消息:

Task "LoggerBasedExecTask"
1>    Task Parameter:Application=C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\ilc.exe
1>    Task Parameter:Parameters=@"build\windows\bld\ilc.CordovaApp.Windows10.rsp"
1>    Task Parameter:MessageLog=C:\QUALIOS\Sources\QualiosMobile_LW\Qualios\platforms\windows\build\windows\bld\ilc\ilclog.csv
1>    Task Parameter:UseCommandProcessor=False
1>    C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\x86\ilc\ilc.exe @"build\windows\bld\ilc.CordovaApp.Windows10.rsp" "/logger:CsvLogger;3472;3460"
1>    System.InvalidOperationException: Le nom de propriété "MSBuildToolsPath" est réservé.
1>       à Microsoft.Build.Shared.ErrorUtilities.ThrowInvalidOperation(String resourceName, Object[] args)
1>       à Microsoft.Build.Shared.ErrorUtilities.VerifyThrowInvalidOperation(Boolean condition, String resourceName, Object arg0)
1>       à Microsoft.Build.Construction.ProjectPropertyElement.CreateDisconnected(String name, ProjectRootElement containingProject)
1>       à Microsoft.Build.Construction.ProjectPropertyGroupElement.AddProperty(String name, String unevaluatedValue)
1>       à Microsoft.Build.Construction.ProjectRootElement.AddProperty(String name, String value)
1>       à ilc.Program.AddPropertiesToBlockEnvironmentVariables(ProjectRootElement rootElement)
1>       à ilc.Program.PrepareAndRunMsbuildTargets(Package package, String intermediatesFolderName, Boolean isAppX)
1>       à ilc.Program.RunIlc(String intermediatesFolderName)
1>       à ilc.Program.InnerMain(String[] args)
1>       à ilc.Program.Main(String[] args)
1>    ILC.exe has experienced an unexpected error. Please visit http://go.microsoft.com/fwlink/?LinkID=613098 for a list of known issues.
1>
1>    C:\Program Files (x86)\MSBuild\15.0\.Net\.NetNative\15.0.24211\Microsoft.NetNative.targets(640,5): error MSB6006: "ilc.exe" exited with code 1200.
1>    Output Property: _IlcExitCode=1200
1>  Done executing task "LoggerBasedExecTask" -- FAILED

Most of the time those errors are fixed by updating to the latest .NET Native (Microsoft.NETCore.UniversalWindowsPlatform) package. 大多数情况下,这些错误是通过更新到最新的.NET Native (Microsoft.NETCore.UniversalWindowsPlatform)包来修复的。

Can you try to update to the latest version (6.2.8)? 您可以尝试更新到最新版本(6.2.8)吗? https://github.com/Microsoft/dotnet/blob/master/releases/UWP/net-native2.2/README.md https://github.com/Microsoft/dotnet/blob/master/releases/UWP/net-native2.2/README.md

Finally found solution ! 终于找到解决办法!

I just had to install globally windows-build-tools to get it work. 我只需要全局安装Windows-build-tools即可工作。 Cordova apparently needs it 科尔多瓦显然需要它

npm install -g windows-build-tools

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM