Project-system: AvailableItemName not working through NuGet

Created on 9 Mar 2017  路  6Comments  路  Source: dotnet/project-system

Steps to reproduce:

  1. Create a new .NET Standard project in Visual Studio 2017
  2. Add the Antlr4 NuGet package (version 4.6.1-beta002 or higher)
  3. Reload the project (to avoid #113)
  4. Create a file Test.g4 and attempt to set the build action to Antlr4

Actual result:

Antlr4 is not an available build action.

Expected result:

Build action should have been changed.

Feature Request Needs-CPS-work Parity-Legacy-Feature Resolution-Duplicate

Most helpful comment

I've converted #113 to represent AvailableItemName feature in general. We'll make sure that works without a reload when we implement it.

All 6 comments

It's a missing feature; we don't support AvailableItemName. Build Actions in CPS are currently driven by ProjectSchemaDefinitions: https://github.com/dotnet/roslyn-project-system/blob/master/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/CSharp.ProjectItemsSchema.xaml.

Given compat with the legacy project system, we'll probably need to do something here.

@davkean This is #1715

@davkean It wasn't clear how close #113 is to being resolved. In the past, #113 was essentially a known issue since forever, with a well-known workaround available that reloading the project would cause available items to be populated. I filed this issue hoping to at minimum restore the old workaround to unblock users who are affected by lack of support for custom build actions. In other words, I saw #113 as the ideal "it should work even without a restart", where #1715 was "it should at least work when using a reload as a workaround".

I've converted #113 to represent AvailableItemName feature in general. We'll make sure that works without a reload when we implement it.

Was this page helpful?
0 / 5 - 0 ratings