In Visual Studio, you could quickly change your project's namespace by following these steps:
Step 1. Open your MAUI project in visual studio.
Step 2. Use the
Ctrl+Shift+H shortcut keys to open the Replace in files window.
Step 3. Fill in the above input field with the namespace you need to replace, such as
MauiApp10. Then, in the input field below, fill in the new name you used to replace the original namespace, such as
Step 4. Click the drop-down arrow in the input box on the right side of File types and select
Step 5. Click Replace All button.
After that, You would see that
MauiApp10 has been automatically replaced with
MauiAppRenamed throughout the project.
Step 6. Right-click your project in
Solution Explorer and select
Rename to replace it with a new name, such as
For class libraries, you could replace namespaces with the same steps.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.