dotnet / templates

Templates for .NET
185 stars 59 forks source link

Let template access MSBuild properties. #845

Open voroninp opened 5 months ago

voroninp commented 5 months ago

I set RootNamespace in Directory.Build.prop file and it differs from the assembly name. However, when I create Blazor Web App from the template and name project MyWebApp, Porgram.cs file contains this line:

using MyWebApp.Components;

However, generated razor classes are placed into <RootNamespace>.Components. It would be nice, if template could set namespace not from the project name, but msbuild properties as well, if they are defined.