VS2022 differs from previous versions in how the file paths appear to work. Use a filter to match based on filename + extension
rather than an exact file path match.
I've also updated the CefSharpAnyCPUExcludeCoreRuntimeBeforeGenerateApplicationManifest target to include a similar filter.
Leaving CefSharpExcludeCoreRuntimeBeforeGenerateApplicationManifest as is because it's only for VS2017
In VS2019:
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\buildTransitive\..\CefSharp\x86\CefSharp.Core.Runtime.dll;
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\buildTransitive\..\CefSharp\x86\CefSharp.Core.Runtime.pdb;
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\buildTransitive\..\CefSharp\x86\CefSharp.Core.Runtime.xml
In VS2022:
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\CefSharp\x86\CefSharp.Core.Runtime.dll;
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\CefSharp\x86\CefSharp.Core.Runtime.pdb;
C:\Projects\CefSharp.MinimalExample\packages\CefSharp.Common.94.4.50\CefSharp\x86\CefSharp.Core.Runtime.xml
Issue #3854
- Fail fast if nuget.exe not found
- Check for VSWhere at build start
(should always be installed as it's included in VS2019 and above)
- Remove netcore31 from $Target valid set, we'll just rely on the
$TargetFramework
- Push-Location to working directory for easier debugging
- Now there are just two targets that actually copy files as the AnyCPU was just a duplicate of
the x86/x64 ones.
- Remove file exists checks and just rely on the CefSharpPropertiesLoaded not being set
- Added a duplicate copy of CefSharpPlatformTarget (as _CefSharpPlatformTarget) to make
sure we copy the correct files.
When using Non SDK Stlye project with PackageReference and publishing with ClickOnce the CefSharp.Core.Runtime.*
files were missing from the installer.
Far as I can tell ClickOnce publishing isn't supported for SDK Style projects so just disable for PackageReference for now
https://github.com/cefsharp/CefSharp/discussions/3613#discussioncomment-913061
One final attempt to workaround https://github.com/dotnet/project-system/issues/4158
The None/Content entries aren't picked up as the .targets file doesn't exist before the Nuget restore (only when using packages.config)
Attempt to copy the files via calling CefRedist32CopyResources/CefRedist64CopyResources tasks.
Properties aren't accessible, I believe that tasks should be, so hopefully this copies the files.
Build actions like Publish are very unlikely to work correctly as the files won't have been included via the <Content/> entries.
* Add support for Windows ARM64 for the NETCore packages.
Note: .NET 5.0 or higher is required to build a WinForms/WPF application for win-arm64.
Fixescefsharp/CefSharp#2944
* PR feedback: Remove "WIN32" define as it is already defined by minwindef.h.
* PR feedback: Switch the CefSharp.*.Example.netcore and CefSharp.Test.netcore projects from cef.redist to chromiumembeddedframework.runtime.
Note: These projects are excluded for build when platform is 'arm64', as otherwise the build fails as WinForms and WPF are not yet available for ARM64 in .NET 5.0.
* Follow-Up: Update path to CefSharp.Test.dll.
* PR feedback: Also use RuntimeInformation for the .NET Framework example projects.
* PR feedback:
- Remove copying of CefRedist files in CefSharp.AfterBuild.targets which is no longer needed.
- Update .vsconfig to include the VC ARM64 build tools.
- Remove CefSharpBuildAction default to NoAction when Nuget 5.0 and Library
For those writing plugins this would have resulted in no files being copied, will rely on users setting
to NoAction themselves when required
- When $PlatformTarget is empty default to $Platform as the fallback, older Non SDK Style library projects
are known to not set PlatformTarget when Platform is AnyCPU which would have resulted in only the x86 files being copied.
- Fix formatting of CefSharp.Common.NETCore.targets
When targeting AnyCPU with an SDK Style project PlatformTarget will default to x86 before build
and after build it will have been correctly updated to AnyCPU. This is too late for our purpose as we
have already copied the x86 files resulting in a build that won't run on an an x64 machine.
Issue https://github.com/dotnet/sdk/issues/1560
Disable an error to the user. Add <PlatformTarget>AnyCPU</PlatformTarget> as simple workaround to proj file.
See also https://github.com/cefsharp/CefSharp/discussions/3430 for background.
Release #3446
- The Debug PDBs will now use SourceLink
- The C++/CLI projects will use SourceLink
- CefSharp.Core.dll now generates/uses a ref assembly
- The managed (c#) projects still embed sources/symbols for Release builds
At some point we should investigate generating a snupkg to reduce the dll size
- Remove the workound as it's not working (behaviour is different depending on the SDK version installed)
- Add Prefer32Bit to diag output
For SDK style projects the $(PlatformTarget) is incorrectly set by default
Issue https://github.com/dotnet/sdk/issues/1560
Explicitly setting $(PlatformTarget) in your project file is the recommended solution until the above issue is fixed.
- NoAction should now disable AnyCPU checks
- Default to NoAction when Library and Nuget 5.0 when using PackageReference, the Transitive references should flow through to the consuming
projects.
For class libraries we don't want to copy our files into their output folder by default as they won't actually,
so added CefSharpBuildAction and defaulted to NoAction (can be overridden by the user if required).
Consuming packages will have the transitive reference added and files copied into WinExe/Exe projects by default
- Previous fix worked for .Net Core 3.1, the .Net 5.0 SDK handles things differently
Have to remove the runtimeconfig.json file when publishing so the BrowserSubprocess
Runs for the SelfContained framework
- Fix formatting