As the title states, I'm trying to save data to the user file (projectname.vcxproj.user) rather than the project file (projectname.vcxproj)
Reading the variable (or initialising it) is done like this:
var globals = project.Globals;
string readValue = "";
if (!globals.VariableExists["variablename"])
{
globals.VariablePersists["variablename"] = true;
}
else
{
readValue = (string)globals["variablename"];
}
and writing the data is done with this line
var globals = m_project.Globals;
globals["variablename"] = "write this value";
However, the data gets written into the .vcxproj file as
<ProjectExtensions>
<VisualStudio>
<UserProperties variablename="write this value" />
</VisualStudio>
</ProjectExtensions>
rather than into the .vcxproj.user file. Is it possible to write to .vcxproj.user instead?