我使用Visual Studio 2015年后发布,当我点击.application
文件发布一个WPF应用程序,它抛出这个错误:的ClickOnce需要System.Windows.Interactivity版本4.5.0.0
Unable to install or run the application. The application requires that assembly System.Windows.Interactivity Version 4.5.0.0 be installed in the global assembly cache (GAC) first.
的我应用中的System.Windows.Interactivity
版本是4.0.0.0。那么为什么会要求4.5.0.0?我甚至无法在网络上找到该版本。
基于this question,我更新了我的app.config
有这个,但没有成功:
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Windows.Interactivity" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.5.0.0" />
</dependentAssembly>
</assemblyBinding>
在Visual Studio中的错误列表选项卡,它具有以下警告:
Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
什么我做错了吗?谢谢。
找到解决方案:在Nuget包管理器的Extensions下有一个4.5版本的DLL。首先删除4.0版本,然后添加4.5版本。再次发布,并且安装时没有问题。 – Alex