ClickOnceInstall CefSharp Winforms问题 [英] ClickOnceInstall CefSharp Winforms Problems

查看:134
本文介绍了ClickOnceInstall CefSharp Winforms问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将我的示例Cefsharp winforms项目作为clickonceinstall应用程序运行。
创建过程中一切正常,但是当我尝试安装该程序时(该程序正常运行,没有任何问题),什么都没发生!
我尝试使用许多不同的配置(发行版,debug ecc)和平台(x86,x64)进行此操作,但始终是同一问题。
我该怎么办?



无论如何,我在Windows 10 64位系统上使用Visual Studio 15。
如果您需要一些代码,请告诉我



预先感谢

解决方案

我最近在部署ClickOnce应用程序时也遇到了这个问题。



我在CefSharp问题页面1314上找到了解决该问题的方法@CRoemheld



您将看到将与应用程序一起部署的必需CEFSharp依赖项。




I'm trying to run my sample Cefsharp winforms project as a clickonceinstall application. Everything is ok in the process of the creation, but when I try to install the program (the program is working of course and withouth issue) nothing happens! I tried this operation with many different configurations (releases, debug ecc ) and platform (x86, x64) but is always the same issue. What can I do?

Anyway I'm using Visual Studio 15 on Windows 10 64 bit. If you need some code, let me know

Thanks in advance

解决方案

I also recently ran into this issue while deploying a ClickOnce application.

I found the solution for this problem on the CefSharp Issues page 1314 by the user @CRoemheld at this link here.

As noted elsewhere, ClickOnce will only bundle up manged .DLL's as part of its deployment process.

But we also need to include the native CEF DLL's as part of our app.

It doesn't look like there is an easy way to do this through the Visual Studio UI (I tried) but you can do it easily by manually modifying the .csproj file to include the following.

Open up your .csproj file and append the following snippet before the final </Project> identifier.

<ItemGroup>
<Content
Include="$(SolutionDir)packages\cef.redist.x86.3.2526.1362\CEF\**\*" Exclude="$(SolutionDir)packages\cef.redist.x86.3.2526.1362\CEF\x86\**\*;$(SolutionDir)packages\cef.redist.x86.3.2526.1362\CEF\locales\**\*.pak">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<Visible>false</Visible>
</Content>
</ItemGroup>

<ItemGroup>
<Content Include="$(SolutionDir)packages\cef.redist.x86.3.2526.1362\CEF\**\en-GB.*;$(SolutionDir)packages\cef.redist.x86.3.2526.1362\CEF\**\en-US.*">
  <Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
  <Visible>false</Visible>
</Content>
</ItemGroup>

<ItemGroup>
<Content Include="$(SolutionDir)packages\cef.redist.x86.3.2526.1362\CEF\x86\**\*">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<Visible>false</Visible>
</Content>
</ItemGroup>

<ItemGroup>
<Content Include="$(SolutionDir)packages\CefSharp.Common.47.0.4\CefSharp\x86\**\CefSharp.BrowserSubprocess.*">
  <Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
  <Visible>false</Visible>
</Content>
</ItemGroup>'

Once you do this, within visual studio, on the publish tab, when you click the "Application Files" button

You will see the required CEFSharp dependencies that will be deployed with the app.

这篇关于ClickOnceInstall CefSharp Winforms问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆