With asp.net core 1.0.1, you can set the default namespace in the project.json file as follows:
"tooling": { "defaultNamespace": "Your.Name.Space" }
yeoman asp.net generator will respect this defaultNamespace when creating new classes
For the new Visual Studio 2017 csproj toolkit, you can add the following XML to change the default namespace (up at the top level <PropertyGroup> link ):
<PropertyGroup> <Optimize>true</Optimize> ... <RootNamespace>My.Root.Namespace</RootNamespace> </PropertyGroup>
This is necessary only if your .csproj file_name does not match your intended root namespace for the project.
nover
source share