You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Visual Studio 2013 Update 3 does not allow CefSharp to load #576
I have Visual Studio 2013 Update 3 and have created a new WinForms project. I added CefSharp via NuGet. When I go to add the browser control to the form it complains that I'm using platform "AnyCPU".
If I go to the Build tab in Properties I see the "Platform" dropdown at the top which has only one choice: Active (AnyCPU)
I can change "Platform Target" farther down the page to x86. It appears that CefSharp cares about the Platform dropdown because it still gives the error "CefSharp.Common does not work correctly on 'AnyCPU' platform. You need to specify platform (x86 / x64)". I don't seem to be able to change the Platform drowdown at the top to anything else.
My packages.config has these lines:
package id="cef.redist" version="3.1750.1738" targetFramework="net45"
package id="CefSharp.Common" version="33.0.2" targetFramework="net45"
package id="CefSharp.WinForms" version="33.0.2" targetFramework="net45"
Same. Now I can't even access my project. Once I added CefSharp Visual Studio says "There is no editor available for "Project/Directory/file.vb". Make sure the application for the file type (.vb) is installed." It will not let me access any of my project files.
@brfenskeCefSharp doesn't support AnyCPU as it's complied specifically for x64 and x86, so you need to pick one or the other.
Right click your solution, select Configuration Manager
From the Action Solution platform dropdown select New
Select either x86 or x64 based on your requirements
Press Ok
Press Close and you should now be targeting either x86 or x64
This isn't a problem with VS2013. Nor is it technically a problem with CefSharp, the nuget package just forces you to choose a platform target, otherwise if you'd stayed with AnyCPU, you would have compiled, and run your app and CefSharp would have silently failed.
Now I can't even access my project. Once I added CefSharp Visual Studio says "There is no editor available for "Project/Directory/file.vb". Make sure the application for the file type (.vb) is installed." It will not let me access any of my project files.
@AJDev77 Try the steps above. It's possible yours might be a different problem. If that's the case, please open a unique issue.
Duh I'm too slow - @amaitland Got there first with a better description 😜 ... still ...
That CefSharp cares (warns/complains) about the platform is due to this recent addition https://github.com/cefsharp/CefSharp/pull/526/files we added it because Platform == either x86 or x64 is currently needed to determine the right CEF unmanaged DLLs to pick during build.
I have VS2013 update 3 too (Professional). Set the Platform on the solution level in the 'Configuration Manager' dialog too, so it gets added to your .sln file. After that you should also have it in the project leveI build settings. I guess we need a new FAQ item now... But let's get you guys running first!
Updating Configuration Manager and adding "x86" did the trick. I use that so seldom I forgot all about it. Thanks everyone. Eager to see how much better this is than the OOB IE browser control!
Activity
AJDev77 commentedon Nov 5, 2014
Same. Now I can't even access my project. Once I added CefSharp Visual Studio says "There is no editor available for "Project/Directory/file.vb". Make sure the application for the file type (.vb) is installed." It will not let me access any of my project files.
amaitland commentedon Nov 6, 2014
@brfenske
CefSharpdoesn't supportAnyCPUas it's complied specifically forx64andx86, so you need to pick one or the other.Configuration ManagerAction Solution platformdropdown selectNewx86orx64based on your requirementsOkCloseand you should now be targeting eitherx86orx64This isn't a problem with
VS2013. Nor is it technically a problem withCefSharp, the nuget package just forces you to choose a platform target, otherwise if you'd stayed withAnyCPU, you would have compiled, and run your app andCefSharpwould have silently failed.@AJDev77 Try the steps above. It's possible yours might be a different problem. If that's the case, please open a unique issue.
jornh commentedon Nov 6, 2014
Duh I'm too slow - @amaitland Got there first with a better description 😜 ... still ...
That CefSharp cares (warns/complains) about the platform is due to this recent addition https://github.com/cefsharp/CefSharp/pull/526/files we added it because Platform == either
x86orx64is currently needed to determine the right CEF unmanaged DLLs to pick during build.I have VS2013 update 3 too (Professional). Set the
Platformon the solution level in the 'Configuration Manager' dialog too, so it gets added to your.slnfile. After that you should also have it in the project leveI build settings. I guess we need a new FAQ item now... But let's get you guys running first!brfenske commentedon Nov 6, 2014
Updating Configuration Manager and adding "x86" did the trick. I use that so seldom I forgot all about it. Thanks everyone. Eager to see how much better this is than the OOB IE browser control!
amaitland commentedon Nov 6, 2014
Maybe even reference the FAQ item in the error description?
jornh commentedon Nov 6, 2014
Not a bad idea at all - see the last note in https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions#CefSharp_binaries (but stop when you end up in this issue the third time if you follow the link ;)
AJDev77 commentedon Nov 7, 2014
@amaitland Thanks, this worked!