在Visual Studio 2015中的一个iOS项目中,与Mac联网,我在构建时遇到此错误...
C:\ Program Files(x86)\ MSBuild \ Xamarin \ iOS \ Xamarin.iOS.Common.targets(411,3):错误:不支持给定路径的格式。
复制到Mac的相同解决方案在Visual Studio for Mac预览版中构建并运行正常。
Xamarin.iOS.Common.targets,在第411行第3位是:
<SmartCopy
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true'"
SourceFiles = "@(_BundleResourceWithOutputPath)"
DestinationFiles = "@(_BundleResourceWithOutputPath -> '%(OutputPath)')"
/>
问题:有没有办法知道这些令牌在构建时解决了什么?
注意:这是失败的构建输出......
. . .
1> Copying file from '/Users/user123483/Library/Caches/Xamarin/mtbs/builds/TrySpeechPlus/d33d40e519762246de1faff7c177fd44/obj/iPhoneSimulator/Debug/optimized/Images/whtball2.PNG' to '/Users/user123483/Library/Caches/Xamarin/mtbs/builds/TrySpeechPlus/d33d40e519762246de1faff7c177fd44/bin/iPhoneSimulator/Debug/TrySpeechPlus.app/Images/whtball2.PNG'
1> SmartCopy: 2017-02-11T10:05:56.0785600-05:00 - Deserializing outputs
1> SmartCopy: 2017-02-11T10:05:56.0805590-05:00 - Creating output items
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(411,3): error : The given path's format is not supported.
1> SmartCopy: 2017-02-11T10:05:56.1110734-05:00 - Finished
1>Done executing task "SmartCopy" -- FAILED.
1>Done building target "_CopyResourcesToBundle" in project "TrySpeechPlus.csproj" -- FAILED.
1>
1>Build FAILED.
任何人都可以提出问题所在吗?
答案 0 :(得分:-1)
错误是由文件名中的空格(Program Files(x86))引起的。
修复方法是用正确的转义字符串替换空格
替换(&#34;&#34;,&#34;%20&#34;)