Build dependency on cef.redist #4635
Replies: 3 comments
-
If you are using PackageReference see https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#controlling-dependency-assets If you are using older
Yes, see https://github.com/cefsharp/CefSharp/blob/master/NuGet/CefSharp.Common.targets#L113 |
Beta Was this translation helpful? Give feedback.
-
I followed the MSFT suggestion but have the following problem:
I think, the approach recommended in the referenced MSFT article refers to assets added as part of the package but does not refer to references to other dependent packages. I will try to refer to cef.redist packages explicitly so they will be part of the project file, and therefore I would be able to add the property. I will also add other properties such as none in addition to |
Beta Was this translation helpful? Give feedback.
-
I was able to come up with the configuration that allowed me to build and excluded brining unneeded dependencies.
Once you modify manually a project file, please don't forget to invoke "Restore NuGet packages" on the solution level. |
Beta Was this translation helpful? Give feedback.
-
I am building a solution with multiple assemblies with references to CefSharp DLLs (2 main executables and few class libraries with utility and reusable classes etc.). It means that at least 4 projects in the solution include package references to CefSharp NuGet package.
It also means that each time I build the solution there are 2 folders created - x86 and x64 - and then copied up to the final executable. Each such copy is 506M of disc space. Times number of assemblies - 4 and times 2 (debug and release), and we have 4G of dead space PER branch times 2 or 3 of active branches to work with and we have 10-12G wasted time number of team members (say, 3) and we are in the territory of 30 - 40G of lost space, which is not even used for executables since we have setup a single Bin directory where we maintain Cef redist files and browser subprocess: Cef.Sharp settings allow me specifying the location of subprocess at runtime - which I am using even during debugging (per deployment, I will have a deployment folder with browser subprocess and cef, which will be a sibling folder to the cache location).
Hence the question , is there any way to disable copying cef redist files and browser subprocess with each build?
I know the crude option - take 4 DLLs the build truly depends on and have a manual folder like "Vendors\CefSharp" and replace NuGet package references / dependencies with the manual references to these 4 DLLs, have those DLLs go to the repo with the source cod, but then I will be stuck in managing package upgrades etc. so I prefer using NuGet but need to solve these wasteful build conundrum.
Beta Was this translation helpful? Give feedback.
All reactions