|
11 | 11 | <Delete Files="$(OutDir)CefSharp.Core.Runtime.xml" /> |
12 | 12 | </Target> |
13 | 13 |
|
14 | | - <!-- <Target Name="CefSharpAfterBuildDebug" AfterTargets="AfterBuild"> --> |
15 | | - <!-- <Message Importance="high" Text="CefSharp - ResourceFilesCopied = $(CefSharpResourceFilesCopied)" /> --> |
16 | | - <!-- </Target> --> |
| 14 | + <!-- |
| 15 | + Add to project file for debuggint purposes |
| 16 | + <Target Name="CefSharpAfterBuildDebug" AfterTargets="AfterBuild"> |
| 17 | + <CallTarget Targets="CefSharpAfterBuildDiagnostic"/> |
| 18 | + </Target> |
| 19 | + --> |
| 20 | + <Target Name="CefSharpAfterBuildDiagnostic"> |
| 21 | + <Message Importance="high" Text="CefSharp After Build Diagnostic" /> |
| 22 | + <Message Importance="high" Text="CefSharpBuildAction = $(CefSharpBuildAction)" /> |
| 23 | + <Message Importance="high" Text="CefSharpTargetDir = $(CefSharpTargetDir)" /> |
| 24 | + <Message Importance="high" Text="CefSharpTargetDirAnyCpu32 = $(CefSharpTargetDirAnyCpu32)" /> |
| 25 | + <Message Importance="high" Text="CefSharpTargetDirAnyCpu64 = $(CefSharpTargetDirAnyCpu64)" /> |
| 26 | + <Message Importance="high" Text="RuntimeIdentifier = $(RuntimeIdentifier)" /> |
| 27 | + <Message Importance="high" Text="TargetFramework = $(PlatformTarget)" /> |
| 28 | + <Message Importance="high" Text="libcef.dll exists = $(OutDir)$(CefSharpTargetDir)libcef.dll" Condition="Exists('$(OutDir)$(CefSharpTargetDir)libcef.dll')" /> |
| 29 | + <Message Importance="high" Text="libcef.dll exists AnyCPU(x86) = $(OutDir)$(CefSharpTargetDirAnyCpu32)libcef.dll" Condition="Exists('$(OutDir)$(CefSharpTargetDirAnyCpu32)libcef.dll')" /> |
| 30 | + <Message Importance="high" Text="libcef.dll exists AnyCPU(x64) = $(OutDir)$(CefSharpTargetDirAnyCpu64)libcef.dll" Condition="Exists('$(OutDir)$(CefSharpTargetDirAnyCpu64)libcef.dll')" /> |
| 31 | + <Message Importance="high" Text="CefSharpTransformXmlDllPath = $(CefSharpTransformXmlDllPath)" /> |
| 32 | + </Target> |
17 | 33 |
|
18 | 34 | <PropertyGroup> |
19 | 35 | <!-- |
|
28 | 44 |
|
29 | 45 | <PropertyGroup> |
30 | 46 | <!-- |
31 | | - Allowable options are None, Content, NoAction (anything other than None/Content |
32 | | - is the same as NoAction. None is the default (same as selecting the None Build Action in Visual Studio). |
33 | | - For SdkStyle projects (packagereference) set the default build action to Content. |
| 47 | + Allowable options are None, Content, NoAction. |
| 48 | + None is the default (same as selecting the None Build Action in Visual Studio) for Non-SdkStyle (packages.config) |
| 49 | + Content is the default (same as selecting the None Build Action in Visual Studio) for SdkStyle projects (PackageReference) |
34 | 50 | --> |
35 | 51 | <CefSharpBuildAction Condition="'$(CefSharpBuildAction)' == '' AND '$(UsingMicrosoftNETSdk)' != 'true'">None</CefSharpBuildAction> |
36 | 52 | <CefSharpBuildAction Condition="'$(CefSharpBuildAction)' == '' AND '$(UsingMicrosoftNETSdk)' == 'true'">Content</CefSharpBuildAction> |
|
82 | 98 | <Visible>false</Visible> |
83 | 99 | </None> |
84 | 100 | </ItemGroup> |
85 | | - <PropertyGroup> |
86 | | - <CefSharpResourceFilesCopied>true</CefSharpResourceFilesCopied> |
87 | | - </PropertyGroup> |
88 | 101 | </When> |
89 | 102 | <When Condition="'$(CefSharpBuildAction)' == 'Content'"> |
90 | 103 | <ItemGroup> |
|
95 | 108 | <Visible>false</Visible> |
96 | 109 | </Content> |
97 | 110 | </ItemGroup> |
98 | | - <PropertyGroup> |
99 | | - <CefSharpResourceFilesCopied>true</CefSharpResourceFilesCopied> |
100 | | - </PropertyGroup> |
101 | 111 | </When> |
102 | 112 | </Choose> |
103 | 113 | </When> |
|
121 | 131 | <Visible>false</Visible> |
122 | 132 | </None> |
123 | 133 | </ItemGroup> |
124 | | - <PropertyGroup> |
125 | | - <CefSharpResourceFilesCopied>true</CefSharpResourceFilesCopied> |
126 | | - </PropertyGroup> |
127 | 134 | </When> |
128 | 135 | <When Condition="'$(PlatformTarget)' == 'AnyCPU'"> |
129 | 136 | <ItemGroup> |
|
168 | 175 | <Visible>false</Visible> |
169 | 176 | </None> |
170 | 177 | </ItemGroup> |
171 | | - <PropertyGroup> |
172 | | - <CefSharpResourceFilesCopied>true</CefSharpResourceFilesCopied> |
173 | | - </PropertyGroup> |
174 | 178 | </When> |
175 | 179 | <!-- x86 and Win32--> |
176 | 180 | <Otherwise> |
|
188 | 192 | <Visible>false</Visible> |
189 | 193 | </None> |
190 | 194 | </ItemGroup> |
191 | | - <PropertyGroup> |
192 | | - <CefSharpResourceFilesCopied>true</CefSharpResourceFilesCopied> |
193 | | - </PropertyGroup> |
194 | 195 | </Otherwise> |
195 | 196 | </Choose> |
196 | 197 | </When> |
|
211 | 212 | <Visible>false</Visible> |
212 | 213 | </Content> |
213 | 214 | </ItemGroup> |
214 | | - <PropertyGroup> |
215 | | - <CefSharpResourceFilesCopied>true</CefSharpResourceFilesCopied> |
216 | | - </PropertyGroup> |
217 | 215 | </When> |
218 | 216 | <When Condition="'$(PlatformTarget)' == 'AnyCPU'"> |
219 | 217 | <ItemGroup> |
|
258 | 256 | <Visible>false</Visible> |
259 | 257 | </Content> |
260 | 258 | </ItemGroup> |
261 | | - <PropertyGroup> |
262 | | - <CefSharpResourceFilesCopied>true</CefSharpResourceFilesCopied> |
263 | | - </PropertyGroup> |
264 | 259 | </When> |
265 | 260 | <!-- x86 and Win32--> |
266 | 261 | <Otherwise> |
|
278 | 273 | <Visible>false</Visible> |
279 | 274 | </Content> |
280 | 275 | </ItemGroup> |
281 | | - <PropertyGroup> |
282 | | - <CefSharpResourceFilesCopied>true</CefSharpResourceFilesCopied> |
283 | | - </PropertyGroup> |
284 | 276 | </Otherwise> |
285 | 277 | </Choose> |
286 | 278 | </When> |
|
306 | 298 | The None/Content entries aren't picked up as the .targets file doesn't exist before the Nuget restore (only when using packages.config) |
307 | 299 | So in that scenario we use a Target to copy the files. Close/reopen the project and the None/Content entries will work as above |
308 | 300 | --> |
309 | | - <Target Name="CefSharpCopyFilesAfterNugetRestore32" AfterTargets="AfterBuild" Condition="'$(UsingMicrosoftNETSdk)' != 'true' AND '$(CefSharpResourceFilesCopied)' != 'true' AND '$(CefSharpBuildAction)' != 'NoAction' AND '$(PlatformTarget)' == 'x86'"> |
| 301 | + <Target Name="CefSharpCopyFilesAfterNugetRestore32" AfterTargets="AfterBuild" Condition="'$(UsingMicrosoftNETSdk)' != 'true' AND !Exists('$(OutDir)$(CefSharpTargetDir)libcef.dll') AND '$(CefSharpBuildAction)' != 'NoAction' AND '$(PlatformTarget)' == 'x86'"> |
310 | 302 | <Message Importance="high" Text="CefSharp - Files were not copied by MSBuild after Nuget install/restore, copying (x86) $(OutDir)$(CefSharpTargetDir)" /> |
311 | 303 | <Copy SourceFiles="@(CefRedist32)" DestinationFolder="$(OutDir)$(CefSharpTargetDir)" SkipUnchangedFiles="true" /> |
312 | 304 | <Copy SourceFiles="@(CefSharpCommonBinaries32)" DestinationFolder="$(OutDir)$(CefSharpTargetDir)" SkipUnchangedFiles="true" /> |
313 | 305 | </Target> |
314 | 306 |
|
315 | | - <Target Name="CefSharpCopyFilesAfterNugetRestore64" AfterTargets="AfterBuild" Condition="'$(UsingMicrosoftNETSdk)' != 'true' AND '$(CefSharpResourceFilesCopied)' != 'true' AND '$(CefSharpBuildAction)' != 'NoAction' AND '$(PlatformTarget)' == 'x64'"> |
| 307 | + <Target Name="CefSharpCopyFilesAfterNugetRestore64" AfterTargets="AfterBuild" Condition="'$(UsingMicrosoftNETSdk)' != 'true' AND !Exists('$(OutDir)$(CefSharpTargetDir)libcef.dll') AND '$(CefSharpBuildAction)' != 'NoAction' AND '$(PlatformTarget)' == 'x64'"> |
316 | 308 | <Message Importance="high" Text="CefSharp - Files were not copied by MSBuild after Nuget install/restore, copying (x64) $(OutDir)$(CefSharpTargetDir)" /> |
317 | 309 | <Copy SourceFiles="@(CefRedist64)" DestinationFolder="$(OutDir)$(CefSharpTargetDir)" SkipUnchangedFiles="true" /> |
318 | 310 | <Copy SourceFiles="@(CefSharpCommonBinaries64)" DestinationFolder="$(OutDir)$(CefSharpTargetDir)" SkipUnchangedFiles="true" /> |
319 | 311 | </Target> |
320 | 312 |
|
321 | | - <Target Name="CefSharpCopyFilesAfterNugetRestoreAnyCPU" AfterTargets="AfterBuild" Condition="'$(UsingMicrosoftNETSdk)' != 'true' AND '$(CefSharpResourceFilesCopied)' != 'true' AND '$(CefSharpBuildAction)' != 'NoAction' AND '$(PlatformTarget)' == 'AnyCPU'"> |
| 313 | + <Target Name="CefSharpCopyFilesAfterNugetRestoreAnyCPU" AfterTargets="AfterBuild" Condition="'$(UsingMicrosoftNETSdk)' != 'true' AND !Exists('$(OutDir)$(CefSharpTargetDirAnyCpu32)libcef.dll') AND '$(CefSharpBuildAction)' != 'NoAction' AND '$(PlatformTarget)' == 'AnyCPU'"> |
322 | 314 | <Message Importance="high" Text="CefSharp - Files were not copied by MSBuild after Nuget install/restore, copying (AnyCPU) $(OutDir)$(CefSharpTargetDir)" /> |
323 | 315 | <Copy SourceFiles="@(CefRedist32)" DestinationFolder="$(OutDir)$(CefSharpTargetDirAnyCpu32)" SkipUnchangedFiles="true" /> |
324 | 316 | <Copy SourceFiles="@(CefSharpCommonBinaries32)" DestinationFolder="$(OutDir)$(CefSharpTargetDirAnyCpu32)" SkipUnchangedFiles="true" /> |
|
0 commit comments