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

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

问题描述

我正在尝试将我的示例 CefSharp WinForms 项目作为 clickonceinstall 应用程序运行.

在创建过程中一切正常,但是当我尝试安装程序时(程序当然可以正常运行并且没有问题),没有任何反应!我用许多不同的配置(发布、调试 ecc)和平台(x86、x64)尝试了这个操作,但它总是相同的问题.

我能做什么?

我在 Windows 10 64 位上使用 Visual Studio 15.

解决方案

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

我在用户@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 without issue), nothing happens! I tried this operation with many different configurations (releases, debug ecc ) and platform (x86, x64), but it's always the same issue.

What can I do?

I'm using Visual Studio 15 on Windows 10 64 bit.

解决方案

I also ran into this issue recently 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 managed .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)packagescef.redist.x86.3.2526.1362CEF***" Exclude="$(SolutionDir)packagescef.redist.x86.3.2526.1362CEFx86***;$(SolutionDir)packagescef.redist.x86.3.2526.1362CEFlocales***.pak">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<Visible>false</Visible>
</Content>
</ItemGroup>

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

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

<ItemGroup>
<Content Include="$(SolutionDir)packagesCefSharp.Common.47.0.4CefSharpx86**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天全站免登陆