Net Core - Support for compiling with .Net Core 3.1

- Make Wpf/WinForms/OffScreen projects target AnyCPU
Only the VC++ projects are platform specific now.
- Remove BrowserSubProcess project reference
Not needed as we now have a standalone exe
- Add OffScreen example
- Add WPF Example project
- Fix some compile errors for main solution
- Add BrowserSubProcess executable
- JavascriptObjectRepository remove isAsync param
Rather than throw exception remove the option
- BrowserSubprocess Exclude the WCF specific code from the netCore project
- Add some ifdef/ifndef to exclude the WCF specific implementation
- Move WCF implementation into separate namespace
This commit is contained in:
amaitland
2020-07-18 13:30:54 +10:00
parent a0d90788aa
commit e8cf336bf3
42 changed files with 420 additions and 181 deletions
+6 -15
View File
@@ -159,18 +159,16 @@ namespace CefSharp.Example
//settings.LogSeverity = LogSeverity.Verbose;
#if !NETCOREAPP
if (DebuggingSubProcess)
{
#if NETCOREAPP
settings.BrowserSubprocessPath = Path.GetFullPath("..\\..\\..\\..\\..\\CefSharp.BrowserSubprocess\\bin.netcore\\Debug\\netcoreapp3.1\\CefSharp.BrowserSubprocess.exe");
#else
var architecture = Environment.Is64BitProcess ? "x64" : "x86";
settings.BrowserSubprocessPath = Path.GetFullPath("..\\..\\..\\..\\CefSharp.BrowserSubprocess\\bin\\" + architecture + "\\Debug\\CefSharp.BrowserSubprocess.exe");
}
#else
// We use our Applications exe as the BrowserSubProcess, multiple copies
// will be spawned.
var exePath = Process.GetCurrentProcess().MainModule.FileName;
settings.BrowserSubprocessPath = exePath;
#endif
}
settings.RegisterScheme(new CefCustomScheme
{
@@ -241,14 +239,7 @@ namespace CefSharp.Example
//see https://github.com/cefsharp/CefSharp/wiki/General-Usage#proxy-resolution
//CefSharpSettings.Proxy = new ProxyOptions(ip: "127.0.0.1", port: "8080", username: "cefsharp", password: "123");
bool performDependencyCheck =
#if !NETCOREAPP
!DebuggingSubProcess;
#else
// For .NET Core, don't perform a dependency check, to allow publishing single-file
// executables.
false;
#endif
bool performDependencyCheck = !DebuggingSubProcess;
if (!Cef.Initialize(settings, performDependencyCheck: performDependencyCheck, browserProcessHandler: browserProcessHandler))
{
@@ -16,7 +16,6 @@
<UseWindowsForms>true</UseWindowsForms>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Platforms>x86;x64</Platforms>
</PropertyGroup>
<ItemGroup>