-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Move platform dependent files to respective directories. #3168
Conversation
✅ Build CefSharp 83.4.2-CI3576 completed (commit dc3e7a3b13 by @) |
…orm specific folders.
…rm specfic folders.
…m specfic folders.
✅ Build CefSharp 83.4.2-CI3577 completed (commit 981a6849e1 by @) |
✅ Build CefSharp 83.4.2-CI3583 completed (commit fb8667e165 by @) |
✅ Build CefSharp 83.4.2-CI3584 completed (commit bbb211fe39 by @) |
<Visible>false</Visible> | ||
</None> | ||
</ItemGroup> | ||
<UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Web\Microsoft.Web.Publishing.Tasks.dll" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this run on VS2013/VS2015
? The folder structure changed starting with VS2017
, so I'd be surprised if this actually ran on older versions.
From what I can tell Microsoft.Web.Publishing.Tasks.dll
is not guaranteed to be installed in Visual Studio
, looks like it's only installed as part of the web development tools. I don't think we can reasonably ask people to install this just to use our nuget package. Specially anyone upgrading for whom the packages worked previously.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't aware of this, I think we can resolve this by using a custom task library that utilizes Microsoft.Web.Xdt.
It's an interesting concept and I wish the
This is a breaking change for anyone currently setting this property.
This is a breaking change and would cause problems for those using build scripts, clickonce, other installers, etc. I expect this would be a support nightmare.
They were deliberately verbose, don't remember the exact details, something about
Not clear how this would impact anyone using I have some other concerns which I've commented inline. I'm happy to include the transforms and allow the user to include a reference to a special .targets file, possibly even add a configuration option for Basically I'm not prepared to consider any breaking changes to the current set of packages. |
I haven't looked too closely at these packages, but in my opinion this is a step backwards from a usability perspective. The current packages are far more developer friendly in my opinion. E.g. to use the new packages, my project would have to depend on both the x64 and x86 packages and conditionally include the PackageReference based on the Platform.
I think this could be resolved by using a custom msbuild task that uses Microsoft.Web.Xdt to do the transformations. The task could do variable substitution as is done for web.config files.
I don't really see any way around this. I can see how this could be a breaking change from a deployment perspective, but I'm not sure I'd consider that a breaking change for the package as a whole. Any time a package is upgraded, users will likely have to adjust their deployment scripts as files may have been removed or new ones may have been added. These packages depend on cef.redist.x86 and cef.redist.x64 which I suspect have not remained consistent in this manner from version to version. Why would anyone expect different from these packages or any other packages for that manner?
I can revert to the
The
|
✅ Build CefSharp 83.4.2-CI3591 completed (commit 62d4fc2625 by @) |
No, if I can get it working properly then the meta package will select the correct runtime there is a discussion at #2796 (comment) that outlines the approach. This is the way forward in my opinion. |
Personally I think your underestimating the disruption your proposed changes would cause. From memory I've only ever had a handful of requests for having side by side I am happy to add some new
There are more than a few people targeting My actual point is there are quite a number of different use cases that would need to be tested in detail. If I cannot get |
✅ Build CefSharp 83.4.2-CI3601 completed (commit 24260255b3 by @) |
✅ Build CefSharp 83.4.2-CI3602 completed (commit 3ff77a0950 by @) |
I know it's possible to do this with the packages in their current form, but nothing about the above is developer friendly. With the changes I've proposed one can easily switch between the x86, x64, and AnyCPU targets without making any application or project changes. I think support for I don't have a whole lot of experience with creating platform dependent NuGet packages, so most of this is new to me. From my limited experience I've seen a couple different ways of dealing with this issue. Most prefer to just copy all package files to the build output folder regardless of target platform. They either then use NuGet's built-in xml transforms or provide an AnyCPU interop library that forwards interfaces to the platform specific library. From my understanding, these transforms only get applied at package install and are removed during uninstall, which prevents dynamically changing the build folder structure. The transforms I've provided could be applied in this manner instead, but again users would not be able to use
My point here was that regardless of how |
@amaitland I've been thinking about this, and I think I have a partial solution:
With the above, side by side builds would be supported by defining |
That is also the hope for the newer set of packages.
It's complicated, specially 4 years ago the options were very limited. You'd be amazed at how often people attempt things you just never even though of. What we have currently is far from perfect, it is well tested though.
Which packages are you referring to specifically? Are they using
The different use cases would still need to be tested in detail.
I'm aware of how
It's an interesting idea
Seems like it would be simpler
If you wish to peruse this path then I'll have a look when I have time. I have quite the backlog so it would be at least a week (maybe more) before I have time to look at this again. |
Moving the The current implementation relying on I have some massive restructure planned (#3311) where the managed libraries will be converted from I do appreciate the contribution 👍 If it were 5+ years ago I probably would have gone done this path. Closing this now. |
This pull request simplifies AnyCPU builds and permits side by side installation of the CefSharp
libraries by moving the CefSharp libraries to the platform dependent folders. With this change,
CefSharpTargetDir is no longer used to indicate where to put platform dependent files, and no
project changes are needed for AnyCPU builds.
Fixes: #3161
Summary:
<dependentAssembly>
sections to the app.config during build.Changes:
How Has This Been Tested?
Types of changes
Checklist: