0

I wish to view / edit the code which sets user created environment variables in my VS2022 solution. I found here a description of how to create them via property sheets, however it doesn't show how to view or edit the code written for those already created.

Adrian
  • 267
  • 2
  • 9
  • Does this help? https://visualgdb.com/documentation/projects/msbuild/propertysheets/ – phuzi Mar 30 '23 at 11:05
  • No. "There you can create new property sheets, or reference existing ones:" But you can't view or edit existing ones. – Adrian Mar 30 '23 at 11:13
  • Not even the section "Property Sheet Semantics" which explains how the property sheets are included in the project and shows the example XML with a single property? – phuzi Mar 30 '23 at 11:22
  • That just shows the XML in the vcxproj file, which I can see in a text editor (that's how I knew they were there). But how was this XML generated? Manually or via Visual Studio? The rest of they vcxproj file is generated via Visual Studio, hence I assumed this section would be as well. – Adrian Mar 30 '23 at 11:26
  • I see the XML syntax here: https://learn.microsoft.com/visualstudio/msbuild/propertygroup-element-msbuild?view=vs-2022, perhaps it has to be inserted manually via editing the vcxproj file in a text editor as I can't see it in the Visual Studio GUI anywhere. This would be very strange though. – Adrian Mar 30 '23 at 11:59
  • I would assume most of the time these would be generated by Visual Studio but why wouldn't doing this manually work? Only the `` is in the project file the rest is in the SamplePropertySheet.props file. – phuzi Mar 30 '23 at 12:05
  • Form that page: _"Note that due to the limitations of the Visual Studio GUI, the property sheets referenced by VisualGDB projects will appear empty, however you will still be able to edit them manually:"_ so yeah, a little weird that there's no tooling to visually edit this. – phuzi Mar 30 '23 at 12:06
  • Yes I saw that. In my case I have no .props file, all the XML is at the top of the vcxproj file. – Adrian Mar 30 '23 at 12:18

1 Answers1

0

It seems that the code for evaluating these environment variables has to be entered manually via text-editing the VCXPROJ file. Syntax can be found here and here.

Adrian
  • 267
  • 2
  • 9