Multiple source file issues in VS Solution

Having problems with building or using the CefSharp .NET binding? Ask your CEF-related questions here. Please ask general usage questions on StackOverflow.

Moderator: amaitland

Multiple source file issues in VS Solution

Postby tech5678 » Mon Nov 02, 2020 1:53 pm

Yesterday I downloaded the latest CefSharp3 full solution and set CefSharp.Winforms.Example as my startup solution, because it's closest to what I need to do (modify the requestcontext in a certain way upon initialization). I did a NuGet restore but it said nothing needed to be done. After install missing build components and fixing my VCTarget path, I was finally able to build the Winforms.Example (using build.ps1, VS 2017) and it runs. However, I have noticed that several of the other projects in the solution seem to have problems that would appear to prevent building.

For example, file ChromiumWebBrowser.cs, line 343, the references to "Cef" say that the name "Cef" does not exist in the current context.

Same file, line 34, ManagedCefBrowserAdapter, advises that the type or namespace cannot be found.

Both types of problems exist in a number of the files, so am I missing something that needs to be done before I can build those projects?

The Building CEFSharp wiki page doesn't indicate anything else needing to be done (https://github.com/cefsharp/CefSharp/wiki/Building-CefSharp), but it also mentions that it's out of date.
tech5678
Techie
 
Posts: 10
Joined: Fri Aug 14, 2020 11:01 am

Re: Multiple source file issues in VS Solution

Postby amaitland » Tue Nov 03, 2020 3:45 pm

If you compiled with build.ps1 then the whole solution should have compiled successfully.

There are three ChromiumWebBrowser.cs files in the solution, which one are you referring?

If you've successfully run build.ps1 then you already have successfully compiled the solution.

CI builds are succeeding so I don't believe there are any compilation errors in the project currently
https://ci.appveyor.com/project/cefshar ... s/36074785
Maintainer of the CefSharp project.
amaitland
Master
 
Posts: 969
Joined: Wed Jan 14, 2015 2:35 am

Re: Multiple source file issues in VS Solution

Postby amaitland » Thu Nov 05, 2020 10:25 pm

Testing with VS2019 (I usually use VS2017) and there appears to be a problem with the C# language version passed to the compiler.

We are limited in the C# version we can target as the project still targets .Net 4.5.2 as it's lowest version.

The error message was `CS1617 Invalid option '7.3' for /langversion; must be ISO-1, ISO-2, Default, Latest or a valid version in range 1 to 7.1.`

VS2015/2017/2019 should now all use 7.1

Relevant commit https://github.com/cefsharp/CefSharp/co ... 805ef045c6
CI Build is still passing as expected https://ci.appveyor.com/project/cefshar ... s/36165761
Maintainer of the CefSharp project.
amaitland
Master
 
Posts: 969
Joined: Wed Jan 14, 2015 2:35 am


Return to CefSharp Forum

Who is online

Users browsing this forum: No registered users and 1 guest