Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate serialization assembly issue #2223

Closed
craigt1313 opened this issue Jan 3, 2018 · 8 comments
Closed

Generate serialization assembly issue #2223

craigt1313 opened this issue Jan 3, 2018 · 8 comments

Comments

@craigt1313
Copy link

craigt1313 commented Jan 3, 2018

  • What version of the product are you using?

  • What architecture x86 or x64?
    Tried with both, independently

  • On what operating system?
    Win10

  • using WinForms

  • What steps will reproduce the problem?

    • using https://github.com/cefsharp/CefSharp.MinimalExample:
      -- set CefSharp.MinimalExample.Winforms as startup project
      -- on project properties Application tab, set startup project to CefSharp.MinimalExample.WinForms.Program
      -- change solution configuration to Release (x86 or x64)
      -- on project properties Build tab, set Generate serialization assembly to On
      -- build project

    -*Error on build: Could not load file or assembly 'CefSharp.Core.dll or one of its dependencies. The specified module could not be found.

  • Please provide any additional information below.
    - Does the cef log provide any relevant information? debug.log does not exist in bin x64 folder after test

@amaitland
Copy link
Member

@craigt1313 Thanks for actually taking the time to fill out the bug report in detail.

We've seen reports of this before, I'm not sure this is actually a problem with CefSharp directly, more a side affect of sgen being unable to resolve the unmanged resources, basing this assumption on https://stackoverflow.com/questions/35554317/using-c-cli-dll-when-generate-serialization-assembly-is-enabled#comment58800966_35555385

I'll leave this open for now, just incase someone else has a comment, it's likely to be closed as wonfix unless someone comes up with something meaningful.

@vwmberry95
Copy link
Contributor

I ran into this issue today when converting an older WinForms project to CefSharp.

It would be helpful to include this issue in the FAQs: https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions#Runtime_dependencies

@amaitland
Copy link
Member

@vwmberry95 The Wiki is editable by anyone with a GitHub account, you can add this if you like.

@amaitland
Copy link
Member

It's possible to call sgen from msbuild, someone experiencing this problem might want to give it a try see
https://www.codeproject.com/Articles/526956/All-about-XmlSerializer-Performance-and-Sgen

@ahomburger
Copy link

I experienced this today. I found by going to the Properties / Build page and changing the Generate serialization assembly from On to Auto took care of the problem.

@gqphd
Copy link

gqphd commented Feb 10, 2019

Same here

@geekcyclist
Copy link

I had a similar problem in a legacy VB.Net WinForm project I took over. After swapping out the old WebControl for CefSharp, we could build and run in Debug mode just fine, but a Release build would fail.

I noticed that the File listed on the build error was SGEN - the XmlSerializationGenerator.

As far as I could tell there were no objects that required XmlSerializtion, so I went to the Project Properties > Compile > Advanced Compile Options and changed "Generate serialization assemblies:" from Auto to No.

The solution builds and runs just fine in Release mode now.

@amaitland
Copy link
Member

The project structure has changed with out of necessity to support .Net Core/Net 5.0, (see #3319 for details). Starting with 87.1.130-pre

You no longer directly reference the CLI/C++ DLL, limited testing suggests that's enough to resolve this (I've only tested with a single project with Generate Serialization Assembly turned On).

Closing now as hopefully this is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants