dotnet / dotnet/project-system
Properly fix AppDesigner's Designer.Designer.vb generation issue
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
Related: https://github.com/dotnet/project-system/issues/1058
## Description
As it stands, if you regenerate `Designer.Designer.vb` in `Microsoft.VisualStudio.AppDesigner`, the build will break. This issue was already [fixed for Editors](https://github.com/dotnet/project-system/pull/3741), so I'm requesting the same fix for **AppDesigner**. Currently, the generation issue was [worked around](https://github.com/dotnet/project-system/pull/6202) but the build breaks because a test checking this exact situation will fail. It is good that we have this check, but we should properly fix the issue.
## Context
I've been currently attempting to remove the use of the [roslyn-tools](https://github.com/dotnet/roslyn-tools/) repo in our repo. In this work, our VB projects have this set from the [RepoToolset Imports.targets](https://github.com/dotnet/roslyn-tools/blob/fdb5a92abe11d120a34ff64e7cbaca3c07b3994c/src/RepoToolset/tools/Imports.targets#L49-L54):
```xml
```
The reason it ends up having `"Designer"` instead of `"Microsoft.VisualStudio.Editors.Designer"` is because it has no root namespace set. When you *do not clear* the root namespace, this properly generates as `"Microsoft.VisualStudio.Editors.Designer"` since it seems to be generated as `"{RootNamespace}Designer"`. However, the build itself doesn't succeed as there are some source file references that do not resolve properly.
## Suggestions
There are 2 ways of fixing this:
- Do the same process that was done [for Editors](https://github.com/dotnet/project-system/pull/3741), but for AppDesigner
- Use the default `RootNamespace` (do not have it cleared) and update the broken references
- This option would be better after the infrastructure changes are merged, since then we control clearing the `RootNamespace` in our repo.
Contributor guide
Assessment
This issue has not been assessed yet.