Closed KirillOsenkov closed 1 year ago
Yeah, I did use items at first, but they appeared in VS as files. I tried looking up how to make them not visible, but couldn't find a way.
What tag did you use for the items? The item type is defined by the items tag name and if you just use a tag name not known to VS you should be fine.
I used something like InternalsAssemblyName
. I don't think there's a chance it's a known tag.
Hmm, you are right, custom items in the main csproj indeed show up in the solution explorer. Never noticed that before because I'm doing all my customization in a secondary targets file, but thats probably not applicable here.
I can find workarounds like setting an InProject=false or Visible=false attribute on the item (both seem to work), not sure if that has other negative effects. It would be nicer if one could declare an item type to be hidden by default.
@KirillOsenkov is an MSBuild expert, maybe he'll know :)
Hmm, adding an ItemDefinition
in the targets file might work:
<ItemDefinitionGroup>
<InternalsAssemblyName>
<Visible>false</Visible>
</InternalsAssemblyName>
</ItemDefinitionGroup>
I'll give it a try when I get a chance.
Yes, that should work.
Fixed in cf3816a
It feels like it's better to use an MSBuild item to represent multiple values, this way it's perhaps more straightforward and you don't need to muck with semicolon separated lists.