Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions CefSharp.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<VisualStudioProductVersion>2019</VisualStudioProductVersion>
<VisualStudioProductVersion Condition="'$(VisualStudioVersion)'=='17.0' AND Exists('$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS2022\libcef_dll_wrapper.lib')">2022</VisualStudioProductVersion>
<VisualStudioProductVersion>2022</VisualStudioProductVersion>
<VisualStudioProductVersion Condition="'$(VisualStudioVersion)'=='18.0' AND Exists('$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS2026\libcef_dll_wrapper.lib')">2026</VisualStudioProductVersion>

<PlatformToolset>v142</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='17.0'">v143</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='18.0'">v145</PlatformToolset>

<!-- TODO: We might need to do something here when VS2019 and VS2022 are installed -->
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<!-- <WindowsTargetPlatformVersion Condition="'$(VisualStudioVersion)'=='16.0'">10.0</WindowsTargetPlatformVersion> -->
<!-- <WindowsTargetPlatformVersion Condition="'$(VisualStudioVersion)'=='17.0'">10.0</WindowsTargetPlatformVersion> -->
</PropertyGroup>

</Project>
19 changes: 10 additions & 9 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#requires -Version 5

param(
[ValidateSet("vs2022","vs2019", "nupkg-only", "update-build-version")]
[ValidateSet("vs2022","vs2026", "nupkg-only", "update-build-version")]
[Parameter(Position = 0)]
[string] $Target = "vs2022",
[Parameter(Position = 1)]
Expand Down Expand Up @@ -80,7 +80,7 @@ function Warn
function BuildSolution
{
param(
[ValidateSet('v142','v143')]
[ValidateSet('v145','v143')]
[Parameter(Position = 0, ValueFromPipeline = $true)]
[string] $Toolchain,

Expand Down Expand Up @@ -153,7 +153,7 @@ function BuildSolution
function VSX
{
param(
[ValidateSet('v142','v143')]
[ValidateSet('v143','v145')]
[Parameter(Position = 0, ValueFromPipeline = $true)]
[string] $Toolchain
)
Expand All @@ -168,10 +168,11 @@ function VSX

switch -Exact ($Toolchain)
{
'v142'
'v145'
{
$VS_VER = 16;
$VS_OFFICIAL_VER = 2019;
$VS_VER = 18;
$VS_OFFICIAL_VER = 2026;
$VS_PRE = "-prerelease";
}
'v143'
{
Expand Down Expand Up @@ -537,7 +538,7 @@ if(-not (Test-Path $VSWherePath))
$VSWherePath = Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio\Installer\vswhere.exe'
}

#Check if we already have vswhere which is included in newer versions of VS2017/VS2019
#Check if we already have vswhere which is included in newer versions of VS2022
if(-not (Test-Path $VSWherePath))
{
Write-Diagnostic "Downloading VSWhere as no install found at $VSWherePath"
Expand Down Expand Up @@ -577,9 +578,9 @@ switch -Exact ($Target)
{
Nupkg $NupkgFiles
}
"vs2019"
"vs2026"
{
VSX v142
VSX v145
Nupkg $NupkgFiles
}
"vs2022"
Expand Down