Skip to content

Commit 604ea18

Browse files
committed
As requested in #210, added the “automagic copying” that has been requested, to improve the “F5 experience”.
1 parent 68a9754 commit 604ea18

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,20 @@
125125
</ProjectReference>
126126
</ItemGroup>
127127
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
128-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
129-
Other similar extension points exist, see Microsoft.Common.targets.
130-
<Target Name="BeforeBuild">
131-
</Target>
128+
<PropertyGroup>
129+
<UnmanagedPlatform>x64</UnmanagedPlatform>
130+
<UnmanagedPlatform Condition="'$(Platform)'=='x86'">Win32</UnmanagedPlatform>
131+
</PropertyGroup>
132+
<!-- TODO: Extract this to an includable .props file, which we can then bundle with the CefSharp.Wpf NuGet package. -->
132133
<Target Name="AfterBuild">
134+
<ItemGroup>
135+
<CefBinaries Include="$(SolutionDir)CEF\$(UnmanagedPlatform)\*.*" />
136+
<LocaleFiles Include="$(SolutionDir)CEF\locales\*.*" />
137+
<!-- We only need the .exe and .pdb but I don't know how to express that easily with MSBuild... -->
138+
<SubProcessFiles Include="$(SolutionDir)\CefSharp.BrowserSubprocess\bin\$(Platform)\$(Configuration)\CefSharp.BrowserSubprocess.*" />
139+
</ItemGroup>
140+
<Copy SourceFiles="@(CefBinaries)" DestinationFolder="$(TargetDir)" />
141+
<Copy SourceFiles="@(LocaleFiles)" DestinationFolder="$(TargetDir)locales" />
142+
<Copy SourceFiles="@(SubProcessFiles)" DestinationFolder="$(TargetDir)" />
133143
</Target>
134-
-->
135144
</Project>

0 commit comments

Comments
 (0)