Skip to content

Commit 049181b

Browse files
japjperlun
authored andcommitted
VS2017 build support (using the VS2015 tooling) (cefsharp#2179)
* initial vs2017 build support * update nuget retrieval url apparently http://nuget.org/nuget.exe is version 2.8, which is fairly old * enable child process debugging
1 parent 6b9f911 commit 049181b

File tree

4 files changed

+35
-10
lines changed

4 files changed

+35
-10
lines changed

CefSharp.BrowserSubprocess/CefSharp.BrowserSubprocess.csproj

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -110,14 +110,9 @@
110110
</ProjectReference>
111111
</ItemGroup>
112112
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
113+
<Import Project="$(SolutionDir)\CefSharp.props" />
113114
<PropertyGroup>
114-
<PostBuildEvent>if $(PlatformName) == x86 (
115-
"$(DevEnvDir)..\..\VC\bin\editbin" /largeaddressaware /TSAWARE "$(TargetPath)"
116-
call "$(DevEnvDir)..\Tools\vsvars32.bat"
117-
sn -R "$(TargetPath)" "$(ProjectDir)..\CefSharp.snk"
118-
) else (
119-
"$(DevEnvDir)..\..\VC\bin\amd64\editbin" /TSAWARE "$(TargetPath)"
120-
)</PostBuildEvent>
115+
<PostBuildEvent>$(CefSharpBrowserSubprocessPostBuildEvent)</PostBuildEvent>
121116
</PropertyGroup>
122117
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
123118
Other similar extension points exist, see Microsoft.Common.targets.

CefSharp.props

+27-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,38 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

44
<PropertyGroup>
55
<VisualStudioProductVersion>2013</VisualStudioProductVersion>
66
<VisualStudioProductVersion Condition="'$(VisualStudioVersion)'=='14.0'">2015</VisualStudioProductVersion>
7+
<VisualStudioProductVersion Condition="'$(VisualStudioVersion)'=='15.0'">2015</VisualStudioProductVersion>
78

89
<PlatformToolset>v120</PlatformToolset>
910
<PlatformToolset Condition="'$(VisualStudioVersion)'=='14.0'">v140</PlatformToolset>
11+
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v140</PlatformToolset>
12+
13+
<CefSharpBrowserSubprocessPostBuildEvent>
14+
<![CDATA[
15+
if $(PlatformName) == x86 (
16+
"$(DevEnvDir)..\..\VC\bin\editbin" /largeaddressaware /TSAWARE "$(TargetPath)"
17+
call "$(DevEnvDir)..\Tools\vsvars32.bat"
18+
sn -R "$(TargetPath)" "$(ProjectDir)..\CefSharp.snk"
19+
) else (
20+
"$(DevEnvDir)..\..\VC\bin\amd64\editbin" /TSAWARE "$(TargetPath)"
21+
)
22+
]]></CefSharpBrowserSubprocessPostBuildEvent>
23+
24+
<CefSharpBrowserSubprocessPostBuildEvent Condition="'$(VisualStudioVersion)'=='15.0'">
25+
<![CDATA[
26+
if $(PlatformName) == x86 (
27+
call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars32.bat"
28+
editbin /largeaddressaware /TSAWARE "$(TargetPath)"
29+
sn -R "$(TargetPath)" "$(ProjectDir)..\CefSharp.snk"
30+
) else (
31+
call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars64.bat"
32+
editbin /TSAWARE "$(TargetPath)"
33+
)
34+
]]>
35+
</CefSharpBrowserSubprocessPostBuildEvent>
1036
</PropertyGroup>
1137

1238
</Project>

CefSharp3.ChildProcessDbgSettings

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ChildProcessDebuggingSettings IsEnabled="true" xmlns="http://schemas.microsoft.com/vstudio/ChildProcessDebuggingSettings/2014">
3+
<DefaultRule EngineFilter="[inherit]" />
4+
</ChildProcessDebuggingSettings>

build.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ function DownloadNuget()
274274
if(-not (Test-Path $nuget))
275275
{
276276
$client = New-Object System.Net.WebClient;
277-
$client.DownloadFile('http://nuget.org/nuget.exe', $nuget);
277+
$client.DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', $nuget);
278278
}
279279
}
280280

0 commit comments

Comments
 (0)