Skip to content

Commit fb6990a

Browse files
committed
CefSharp.Common.targets - Improve PlatformCheck error messaging
Only the error will be shown in the VS error pane, hopefully the additional messages are useful. Issue #3009
1 parent 44113d7 commit fb6990a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

NuGet/CefSharp.Common.targets

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Target Name="PlatformCheck" BeforeTargets="ResolveAssemblyReferences" Condition="(('$(Platform)' != 'x86') AND ('$(Platform)' != 'x64') AND ('$(Platform)' != 'Win32') AND '$(CefSharpAnyCpuSupport)' != 'true')">
4-
<Error Text="$(MSBuildThisFileName) contains unmanaged resoures, set your project and solution platform to x86 or x64. Alternatively for AnyCPU Support see https://github.com/cefsharp/CefSharp/issues/1714" />
4+
<Message Text="$(MSBuildThisFileName) contains unmanaged resoures which must be copied to your build output folder." />
5+
<Message Text="$(MSBuildThisFileName) relies on the Solution Platform (not the TargetPlatform property that's defined individually in your [cs|vb|vcx]proj files) to determine which platform to target." />
6+
<Message Text="For details on changing your Solution Platform see https://msdn.microsoft.com/en-us/library/ms185328.aspx#Anchor_0" />
7+
<Error Text="$(MSBuildThisFileName) is unable to proceeed as your current Solution Platform is '$(Platform)'. To target AnyCPU please read https://github.com/cefsharp/CefSharp/issues/1714. Alternatively change your Solution Platform to x86 or x64 and the relevant files will be copied automatically." HelpKeyword="CefSharpSolutionPlatformCheck" />
58
</Target>
69

710
<Target Name="FrameworkVersionCheck" BeforeTargets="ResolveAssemblyReferences" Condition="(('$(TargetFrameworkVersion)' == 'v4.5.1') OR ('$(TargetFrameworkVersion)' == 'v4.5') OR ('$(TargetFrameworkVersion)' == 'v4.0'))">

0 commit comments

Comments
 (0)