Skip to content
/ bond Public
forked from microsoft/bond

Commit

Permalink
[c#] Refer to $(EnableDefaultItems) in dup codegen error
Browse files Browse the repository at this point in the history
The "Duplicate BondCodegen items were included" error message says that
the `$(EnableDefaultCompileItems)` property can be set to false to stop
automatic inclusion. The automatic inclusion behavior is conditioned on
the `$(EnableDefaultItems)` property, not
`$(EnableDefaultCompileItems)`.

Revise the error message to mention `$(EnableDefaultItems)`.

Fixes microsoft#1110
  • Loading branch information
chwarr committed Feb 24, 2022
1 parent 4ea1574 commit 223691b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ different versioning scheme, following the Haskell community's
use buffer allocators other than `new byte[]` (e.g.
`ArrayPool<byte>.Rent()`). ([Pull request
\#1128](https://github.com/microsoft/bond/pull/1128))
* The error message emitted when duplicate .bond items are detected by the
MSBuild codegen now correctly refers to `$(EnableDefaultItems)` as the
switch that controls this behavior. ([Issue
\#1110](https://github.com/microsoft/bond/issues/1110))

## 9.0.5: 2021-04-14 ##

Expand Down
4 changes: 2 additions & 2 deletions cs/build/nuget/Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@
ItemName="_BondCodegenFiltered"/>
</RemoveDuplicates>

<PropertyGroup Condition=" '$(EnableDefaultCompileItems)' == 'true' ">
<_DefaultItemsMessage> The Bond package includes BondCodegen items for all .bond files from your project directory by default. You can either remove these items from your project file, or set the 'EnableDefaultCompileItems' property to 'false' if you want to explicitly include them in your project file. To set per-item metadata, use the item update syntax (https://docs.microsoft.com/en-us/visualstudio/msbuild/item-element-msbuild#examples).</_DefaultItemsMessage>
<PropertyGroup Condition=" '$(EnableDefaultItems)' == 'true' ">
<_DefaultItemsMessage> The Bond package includes BondCodegen items for all .bond files from your project directory by default. You can either remove these items from your project file, or set the 'EnableDefaultItems' property to 'false' if you want to explicitly include them in your project file. To set per-item metadata, use the item update syntax (https://docs.microsoft.com/en-us/visualstudio/msbuild/item-element-msbuild#examples).</_DefaultItemsMessage>
</PropertyGroup>

<!-- The RemoveDuplicates task preserves the input order, so this is an
Expand Down

0 comments on commit 223691b

Please sign in to comment.