Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Mysterious forced .csproj elements for Blazor components (App.razor)

$
0
0

Since I put my App.razor's @code into an App.razor.cs file, Visual Studio stuffed this crap into my .csproj file. Removing it gives these compile errors:depiction of diff and compile errors

Here's the contents App.razor, just in case:

    using MyProject.Client.Services;    using MyProject.Data;    using System.Data;    using System.Text;    namespace MyProject.Components;    public partial class App : ComponentBase {        [Inject]        private ServerDbAccess Db { get; set; } = null!;        [Inject]        private ServerSessionData SessionData { get; set; } = null!;        protected async override Task OnInitializedAsync() {            await base.OnInitializedAsync();            IDbConnection dbCon = await this.Db.ConnectDb_Async();            await this.SessionData.Load_Async( dbCon );        }    }

Any idea what's going on?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>