我在尝试使用 Microsoft Band SDK 部署应用时遇到以下错误。构建配置是 RELEASE,目标输出是 ARM。如果使用DEBUG配置,它可以工作。
Error : DEP6810 : MdilXapCompile.exe failed with error code 2001.
我检查了 MDILXapCompileLog,以下是编译失败的地方:
CrossGen failed
Error processing assembly [projectpath]...\obj\ARM\Release\MSIL\Microsoft.Band.dll
Raw error code: 2148733978
注意:这种情况的额外奇怪之处在于,如果我只打包应用程序而不进行部署,我可以将其侧面加载到设备上,并且它会按预期工作。
以下是 csproj 部分 - 调试/ARM:
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
发布/ARM
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
我看到的唯一区别是调试符号,Microsoft.Band.dll 可能没有公共(public)符号吗? Visual Studio 不应该创建它们吗?
最佳答案
我注意到,即使更新到较新的 SDK 后,该解决方案仍然具有旧的 Band SDK - Preview 软件包。我手动删除了所有 nuget 项目,强制刷新包,项目现在已成功部署。
步骤如下:
- 关闭 Visual Studio
- 导航至您的解决方案/包/
- 删除除packages.config之外的所有内容
- 在 Visual Studio 中重新打开解决方案
- 右键单击解决方案并选择“管理 Nuget 包”
- 点击对话框窗口顶部显示的“恢复”按钮
重建解决方案并且它应该正确部署
关于windows-phone-8.1 - Microsoft Band SDK 部署错误 : To ARM in Release: Raw error code: 2148733978,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29753085/