Closed drewnoakes closed 3 years ago
@tmeschter this may be coming from the back end. These are the values received from the server (copied into a data structure verbatim from the Project Query API model types).
It shows that one configuration has an empty unevaluated value, while the other does not. I do not believe this is expected. The UI is deciding that these two values are materially different in some way, and must be presented individually.
The first is Debug|AnyCPU
, the second Release|AnyCPU
.
I've only seen this with the Microsoft.VisualStudio.ProjectSystem.Managed.VS
project. It doesn't happen for a new .NET Console App.
Observations:
On my local system, msbuild /p:Configuration=Debug /pp Microsoft.VisualStudio.ProjectSystem.Managed.VS.csproj
and msbuild /p:Configuration=Release /pp Microsoft.VisualStudio.ProjectSystem.Managed.VS.csproj
produced different results. MSBuild couldn't find the NuGet-generated .props and .targets files because they didn't exist for the Release configuration. Running msbuild /t:restore /p:Configuration=Release Microsoft.VisualStudio.ProjectSystem.Managed.VS.csproj
caused those files to be generated, at which point the preprocessed output was the same (other than the paths to the .props and .targets generated by NuGet), and subsequently opening the property pages no longer showed the duplicated controls.
My guess at the moment is that the missing .props/.targets somehow affects our ability to get the unevaluated value, but not the evaluated value. I will need to investigate further.
@drewnoakes I see part of what is going on here. Normally the project.assets.json file and .props/.targets generated by NuGet restore would go into <project folder>\obj
. In our repo, however, they are in <repo root>\artifacts\<configuration>\obj\<project name>
. We've taken files that are not normally configuration-specific, and put them in a configuration-specific location. So they are available to some configurations and not others, and this causes differences in evaluation later on.
I'm inclined to close this bug as I don't think this is a general issue, and instead open a new bug specific to the layout of intermediate files in our repo. What do you think?
@tmeschter nice discovery. That sounds both plausible and reasonable to me.
Pinging @davkean in case he has any background context on the rationale for having the obj
folder in a configuration-specific location.
Seeing as this is an oddity of how we have our repo set up, we're going to close this.
@drewnoakes @tmeschter Despite living in a configuration-independent location, The assets file is configuration-dependent, hence why we restore when the configuration changes.
Visual Studio Version: main
Summary:
The UI shows doubled edit controls for selected properties.
Steps to Reproduce:
ProjectSystem.sln
Microsoft.VisualStudio.ProjectSystem.Managed.VS
Expected Behavior:
Single edit control when value does not vary by configuration.
Actual Behavior:
Doubled edit controls, despite there being no need for doubles