|
96 | 96 | <PropertyGroup> |
97 | 97 | <!-- |
98 | 98 | Allowable options are None, Content, NoAction. |
99 | | - None is the default (same as selecting the None Build Action in Visual Studio) for Nuget packages.config |
100 | | - Content is the default (same as selecting the None Build Action in Visual Studio) for Nuget PackageReference |
| 99 | + |
| 100 | + None is the default (same as selecting the None Build Action in Visual Studio) for Nuget packages.config |
| 101 | + for WinExe/Exe projects (anything that's not Library) see https://github.com/cefsharp/CefSharp/issues/4062 |
| 102 | + None will copy the dependenceis to a directly referencing project file which is useful for library projects |
| 103 | + that target packages.config as buildTransitive is not supported. |
| 104 | + |
| 105 | + Content is the default (same as selecting the Content Build Action in Visual Studio) for Nuget PackageReference |
| 106 | + and WinExe/Exe projects (anything that's not Library) |
101 | 107 | Technically the older Non-SDK Style project can use PackageReference under VS2019 (possibly VS2017 as well), |
102 | 108 | so we use NuGetProjectStyle which is defined in the .nuget.g.props file for projects using PackageReference. |
103 | | - For Library projects with Nuget supports buildTransitive we don't include our additional files and packages, the transitive reference should flow directly to the consuming projects. |
104 | 109 | For class libraries that are often AnyCPU and consuming Exe/WinExe projects that are x64 or x86 the resulting build output |
105 | | - is polluted with extra copies in sub folders. |
| 110 | + is polluted with extra copies in sub folders. Set CefSharpBuildAction to NoAction to avoid copying the files. |
106 | 111 | --> |
107 | 112 | <CefSharpBuildAction Condition="'$(CefSharpBuildAction)' == '' AND '$(NuGetProjectStyle)' != 'PackageReference'">None</CefSharpBuildAction> |
108 | | - <CefSharpBuildAction Condition="'$(CefSharpBuildAction)' == '' AND '$(NuGetProjectStyle)' == 'PackageReference'">Content</CefSharpBuildAction> |
| 113 | + <CefSharpBuildAction Condition="'$(CefSharpBuildAction)' == '' AND ('$(NuGetProjectStyle)' == 'PackageReference' OR '$(OutputType)' != 'Library')">Content</CefSharpBuildAction> |
109 | 114 |
|
110 | 115 | <CefSharpTargetDir Condition="'$(CefSharpTargetDir)' == ''"></CefSharpTargetDir> |
111 | 116 | <!-- Ideally we could use EnsureTrailingSlash, was only added on 2017 so unlikely supported in older version of VS --> |
|
0 commit comments