diff --git a/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.csproj b/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.csproj index 1437867..1346f56 100644 --- a/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.csproj +++ b/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.csproj @@ -1,7 +1,7 @@  - - - + + + Debug @@ -11,11 +11,12 @@ Properties CefSharp.MinimalExample.OffScreen CefSharp.MinimalExample.OffScreen - v4.0 + v4.5.2 512 - Client + + ..\ - a8da3232 + fb321253 true @@ -25,6 +26,7 @@ x64 prompt MinimumRecommendedRules.ruleset + false bin\x64\Release\ @@ -34,6 +36,7 @@ x64 prompt MinimumRecommendedRules.ruleset + false true @@ -43,6 +46,7 @@ x86 prompt MinimumRecommendedRules.ruleset + false bin\x86\Release\ @@ -52,6 +56,10 @@ x86 prompt MinimumRecommendedRules.ruleset + false + + + app.manifest @@ -79,10 +87,12 @@ + - - - + + + + \ No newline at end of file diff --git a/CefSharp.MinimalExample.OffScreen/Program.cs b/CefSharp.MinimalExample.OffScreen/Program.cs index 75b0c7d..d8db1bd 100644 --- a/CefSharp.MinimalExample.OffScreen/Program.cs +++ b/CefSharp.MinimalExample.OffScreen/Program.cs @@ -7,6 +7,7 @@ using System.Diagnostics; using System.IO; using System.Threading; using CefSharp.OffScreen; +using System.Threading.Tasks; namespace CefSharp.MinimalExample.OffScreen { @@ -23,11 +24,17 @@ namespace CefSharp.MinimalExample.OffScreen Console.WriteLine(); var settings = new CefSettings(); - // Disable GPU in WPF and Offscreen examples until #1634 has been resolved - settings.CefCommandLineArgs.Add("disable-gpu", "1"); + + var osVersion = Environment.OSVersion; + //Disable GPU for Windows 7 + if (osVersion.Version.Major == 6 && osVersion.Version.Minor == 1) + { + // Disable GPU in WPF and Offscreen examples until #1634 has been resolved + settings.CefCommandLineArgs.Add("disable-gpu", "1"); + } //Perform dependency check to make sure all relevant resources are in our output directory. - Cef.Initialize(settings, shutdownOnProcessExit: true, performDependencyCheck: true); + Cef.Initialize(settings, shutdownOnProcessExit: false, performDependencyCheck: true); // Create the offscreen Chromium browser. browser = new ChromiumWebBrowser(testUrl); @@ -84,7 +91,7 @@ namespace CefSharp.MinimalExample.OffScreen Process.Start(screenshotPath); Console.WriteLine("Image viewer launched. Press any key to exit."); - }); + }, TaskScheduler.Default); }); } } diff --git a/CefSharp.MinimalExample.OffScreen/app.config b/CefSharp.MinimalExample.OffScreen/app.config index 2f7cce7..de82893 100644 --- a/CefSharp.MinimalExample.OffScreen/app.config +++ b/CefSharp.MinimalExample.OffScreen/app.config @@ -1,3 +1,3 @@ - + diff --git a/CefSharp.MinimalExample.OffScreen/app.manifest b/CefSharp.MinimalExample.OffScreen/app.manifest new file mode 100644 index 0000000..d2b4891 --- /dev/null +++ b/CefSharp.MinimalExample.OffScreen/app.manifest @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CefSharp.MinimalExample.OffScreen/packages.config b/CefSharp.MinimalExample.OffScreen/packages.config index 2aa813b..da7eedc 100644 --- a/CefSharp.MinimalExample.OffScreen/packages.config +++ b/CefSharp.MinimalExample.OffScreen/packages.config @@ -1,7 +1,7 @@  - - - - + + + + \ No newline at end of file diff --git a/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj b/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj index b0b1407..6a1ce02 100644 --- a/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj +++ b/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj @@ -1,7 +1,7 @@  - - - + + + Debug AnyCPU @@ -12,7 +12,7 @@ Properties CefSharp.MinimalExample.WinForms CefSharp.MinimalExample.WinForms - v4.0 + v4.5.2 512 @@ -21,28 +21,33 @@ 3.5 - Client + + ..\ - 0e5fadcc + 3edcbc46 x64 bin\x64\Debug\ + false x64 bin\x64\Release\ + false true bin\x86\Debug\ x86 MinimumRecommendedRules.ruleset + false bin\x86\Release\ x86 MinimumRecommendedRules.ruleset + false @@ -98,7 +103,8 @@ - - - + + + + \ No newline at end of file diff --git a/CefSharp.MinimalExample.WinForms/Program.cs b/CefSharp.MinimalExample.WinForms/Program.cs index 3a182c7..c9eea82 100644 --- a/CefSharp.MinimalExample.WinForms/Program.cs +++ b/CefSharp.MinimalExample.WinForms/Program.cs @@ -13,7 +13,7 @@ namespace CefSharp.MinimalExample.WinForms public static void Main() { //Perform dependency check to make sure all relevant resources are in our output directory. - Cef.Initialize(new CefSettings(), shutdownOnProcessExit:true, performDependencyCheck:true); + Cef.Initialize(new CefSettings(), shutdownOnProcessExit:false, performDependencyCheck:true); var browser = new BrowserForm(); Application.Run(browser); diff --git a/CefSharp.MinimalExample.WinForms/app.config b/CefSharp.MinimalExample.WinForms/app.config index 2f7cce7..de82893 100644 --- a/CefSharp.MinimalExample.WinForms/app.config +++ b/CefSharp.MinimalExample.WinForms/app.config @@ -1,3 +1,3 @@ - + diff --git a/CefSharp.MinimalExample.WinForms/packages.config b/CefSharp.MinimalExample.WinForms/packages.config index 98a6b82..02e50cc 100644 --- a/CefSharp.MinimalExample.WinForms/packages.config +++ b/CefSharp.MinimalExample.WinForms/packages.config @@ -1,7 +1,7 @@  - - - - + + + + \ No newline at end of file diff --git a/CefSharp.MinimalExample.Wpf/App.config b/CefSharp.MinimalExample.Wpf/App.config index e95ce98..5de900d 100644 --- a/CefSharp.MinimalExample.Wpf/App.config +++ b/CefSharp.MinimalExample.Wpf/App.config @@ -1,6 +1,6 @@ - + diff --git a/CefSharp.MinimalExample.Wpf/App.xaml.cs b/CefSharp.MinimalExample.Wpf/App.xaml.cs index 6836df0..34a6bf7 100644 --- a/CefSharp.MinimalExample.Wpf/App.xaml.cs +++ b/CefSharp.MinimalExample.Wpf/App.xaml.cs @@ -1,4 +1,5 @@ -using System.Windows; +using System; +using System.Windows; namespace CefSharp.MinimalExample.Wpf { @@ -9,10 +10,16 @@ namespace CefSharp.MinimalExample.Wpf //Perform dependency check to make sure all relevant resources are in our output directory. var settings = new CefSettings(); settings.EnableInternalPdfViewerOffScreen(); - // Disable GPU in WPF and Offscreen examples until #1634 has been resolved - settings.CefCommandLineArgs.Add("disable-gpu", "1"); - Cef.Initialize(settings, shutdownOnProcessExit: true, performDependencyCheck: true); + var osVersion = Environment.OSVersion; + //Disable GPU for Windows 7 + if (osVersion.Version.Major == 6 && osVersion.Version.Minor == 1) + { + // Disable GPU in WPF and Offscreen examples until #1634 has been resolved + settings.CefCommandLineArgs.Add("disable-gpu", "1"); + } + + Cef.Initialize(settings, shutdownOnProcessExit: false, performDependencyCheck: true); } } } diff --git a/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.csproj b/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.csproj index 0699454..fcaf388 100644 --- a/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.csproj +++ b/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.csproj @@ -1,7 +1,7 @@  - - + + Debug @@ -11,13 +11,14 @@ Properties CefSharp.MinimalExample.Wpf CefSharp.MinimalExample.Wpf - v4.0 + v4.5.2 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 - Client + + ..\ - fc464941 + 29f2d518 true @@ -27,6 +28,7 @@ x64 prompt MinimumRecommendedRules.ruleset + false bin\x64\Release\ @@ -36,6 +38,7 @@ x64 prompt MinimumRecommendedRules.ruleset + false true @@ -45,6 +48,7 @@ x86 prompt MinimumRecommendedRules.ruleset + false bin\x86\Release\ @@ -54,10 +58,14 @@ x86 prompt MinimumRecommendedRules.ruleset + false chromium-256.ico + + app.manifest + @@ -110,6 +118,7 @@ ResXFileCodeGenerator Resources.Designer.cs + SettingsSingleFileGenerator @@ -125,9 +134,10 @@ - - - + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CefSharp.MinimalExample.Wpf/packages.config b/CefSharp.MinimalExample.Wpf/packages.config index dfe4976..763374d 100644 --- a/CefSharp.MinimalExample.Wpf/packages.config +++ b/CefSharp.MinimalExample.Wpf/packages.config @@ -1,7 +1,7 @@  - - - - + + + + \ No newline at end of file diff --git a/NuGet.config b/NuGet.config index 9657baa..d3b4eb5 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,6 @@ - - +