Visual Studio 2019 does not see part of the component when using using
1) Create a component in a different folder.
2) Connect it anywhere using using
3) Error "CS0103 C # The name 'context' doesn鈥檛 exist in the current context"
http://dt-byte.ru/fcb6801d.png
dotnet --info
袩邪泻械褌 SDK 写谢褟 .NET Core (芯褌褉邪卸邪褞褖懈泄 谢褞斜芯泄 global.json):
Version: 3.0.100-preview4-011223
Commit: 118dd862c8
小褉械写邪 胁褘锌芯谢薪械薪懈褟:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100-preview4-011223\
Host (useful for support):
Version: 3.0.0-preview4-27615-11
Commit: ee54d4cbd2
Components/TableView.razor
@typeparam TItem
@for (var i = 0; i < Items.Count; i++)
{
<p>@Body(Items[i])</p>
}
@functions{
[Parameter]
IReadOnlyList<TItem> Items { get; set; }
[Parameter]
protected RenderFragment<TItem> Body { get; set; }
}
Pages/index.razor
@page "/"
@using Blazorside.Components
<TableView Items="@Items">
<Body>
@context
</Body>
</TableView>
@functions{
List<string> Items { get; set; } = new List<string> { "one", "two" };
}
For clarity, I鈥檒l clarify that the error occurs only in Visual Studio and only if TableView.razor is in a different folder, the project itself is being built and working.
This is also happening with the Telerik UI for Blazor grid templates. We are also seeing customers report that context does not exist.
https://twitter.com/robertmclaws/status/1117927153356673024

If the project builds successfully on the command-line, then this looks like a known tooling limitation with VS2019 16.1 Preview 1, which will get fixed shortly with Preview 2. To workaround the tooling issue you should be able to fully qualify the component tag name with the component's namespace.
May be related - when in a subfolder (like ~/Shared/someFolder/myComponent.razor), the components' intellisense does not recognize the [Parameter] attribute, but it does compile and work.

Edit: fixed screenshot
This should be fixed now with Visual Studio 2019 16.1 Preview 2. Install the latest bits from the Visual Studio 2019 Preview channel and you should be good to go. Let us know if this doesn't resolve the issue for you!
Thanks, it works
Most helpful comment
If the project builds successfully on the command-line, then this looks like a known tooling limitation with VS2019 16.1 Preview 1, which will get fixed shortly with Preview 2. To workaround the tooling issue you should be able to fully qualify the component tag name with the component's namespace.