I can create an inline component like
<h1>@foo</h1>
@functions {
string foo = "foo";
}
However when I create Foo.razor
containing just:
<h1>@foo</h1>
And Foo.razor.cs
containing:
namespace MyApp.Client.Components {
public class Foo: ComponentBase {
public string foo;
}
}
I get:
Error CS0101 The namespace 'MyApp.Client.Components' already contains a definition for 'Foo'
I am using the latest VS 2019 and Blazor libraries.
What am I doing wrong?