有一件奇怪的事情,当我使用 Create App Packages 向导在 IDE 中构建应用程序包时,多语言是正确的。
但是,如果我在命令行中使用 msbuild.exe 构建它,例如:
msbuild.exe my.sln /t:rebuild /p:Configuration=Release;Platform=x86;Outdir=myoutput /flp:LogFile=my.log
结果应用程序包错误。它没有多语言资源,只有默认的英语。
IDE 向导和 msbuild.exe 有什么不同?我的命令行错了吗?
日志是:
Target "AfterBuild" in project "myproject.csproj" (target "Build" depends on it):
Using "MultilingualBuild" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\Multilingual App Toolkit\v1.0\Microsoft.Multilingual.Build.dll".
Task "MultilingualBuild"
Multilingual App Toolkit build started.
Update build config xml started.
Preprocessing XLIFF file: 'MultilingualResources\Chinese (Simplified).xlf'
Preprocessing XLIFF file: 'MultilingualResources\Chinese (Traditional).xlf'
Preprocessing XLIFF file: 'MultilingualResources\Italian (Italy).xlf'
Preprocessing XLIFF file: 'MultilingualResources\Japanese (Japan).xlf'
Preprocessing XLIFF file: 'MultilingualResources\Russian (Russia).xlf'
Update build config xml completed.
Generate latest XLIFF build task started.
A translation unit with null or empty content was detected and ignored while generating the XLIFF file.
A translation unit with null or empty content was detected and ignored while generating the XLIFF file.
A translation unit with null or empty content was detected and ignored while generating the XLIFF file.
A translation unit with null or empty content was detected and ignored while generating the XLIFF file.
Latest XLIFF file generated: 'obj\x86\Release\MultilingualAppToolkitLatest.xlf'
Generate latest XLIFF build task completed.
Update XLIFF build started.
TargetLang ID: zh-Hans
TargetLang XLiff: MultilingualResources\Chinese (Simplified).xlf
XLIFF file updated: 'MultilingualResources\Chinese (Simplified).xlf'
TargetLang ID: zh-Hant
TargetLang XLiff: MultilingualResources\Chinese (Traditional).xlf
XLIFF file updated: 'MultilingualResources\Chinese (Traditional).xlf'
TargetLang ID: it-IT
TargetLang XLiff: MultilingualResources\Italian (Italy).xlf
XLIFF file updated: 'MultilingualResources\Italian (Italy).xlf'
TargetLang ID: ja-JP
TargetLang XLiff: MultilingualResources\Japanese (Japan).xlf
XLIFF file updated: 'MultilingualResources\Japanese (Japan).xlf'
TargetLang ID: ru-RU
TargetLang XLiff: MultilingualResources\Russian (Russia).xlf
XLIFF file updated: 'MultilingualResources\Russian (Russia).xlf'
Update XLIFF build completed.
Generate priInfo build started.
Adding language 'zh-Hans' from 'MultilingualResources\Chinese (Simplified).xlf'
Adding language 'zh-Hant' from 'MultilingualResources\Chinese (Traditional).xlf'
Adding language 'it-IT' from 'MultilingualResources\Italian (Italy).xlf'
Adding language 'ja-JP' from 'MultilingualResources\Japanese (Japan).xlf'
Adding language 'ru-RU' from 'MultilingualResources\Russian (Russia).xlf'
Generate priInfo build completed.
Merge of Loc PRI file started.
Copy App PRI file started.
Copy App PRI file completed.
C:\Program Files (x86)\Windows Kits\8.0\bin\x86\Makepri.exe resourcepack /o /pr "C:\hudsonprojects\myproject\sourcecode\myproject\myproject" /cf "obj\x86\Release\MultilingualAppToolkit.cfg.xml" /if "obj\x86\Release\MultilingualAppToolkit.pri" /of "../../../output/myproject/resources.pri"
Update Manifest File Started.
Update Manifest File added language id: 'zh-Hans'
Update Manifest File added language id: 'zh-Hant'
Update Manifest File added language id: 'it-IT'
Update Manifest File added language id: 'ja-JP'
Update Manifest File added language id: 'ru-RU'
Update Manifest File is saving the manifest changes.
Update Manifest File Completed.
Merge of Loc PRI file completed.
Multilingual App Toolkit build completed successfully.
Done executing task "MultilingualBuild".
Done building target "AfterBuild" in project "myproject.csproj".