There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
MPF ProjectNode.GetProjectOptions() returns wrong configuration options
Problem Description: There appears to be a bug in ProjectNode.GetProjectOptions(). At the top of the method, it checks to see if the current options field is not null, and if not, returns the existing options.
This logic is wrong, because it doesn't check to see if the cached options object matches the configuration specified in the config argument. This causes incorrect configuration options to be returned to the caller. Here is one scenario:
In a release configuration, user presses F5 to debug which cases ProjectConfig.DebugLaunch() to be called. If the "StartProgram" property is not set, GetOutputAssembly() is called to get the filename to debug. GetOutputAssembly() calls GetProjectOptions(
"Release" ) but returns the ProjectOptions for a debug configuration if that was the last configuration that was read and cached.
This causes the path of the output assembly in a debug configuration to be returned. End result is that pressing F5 runs the debug build of the assembly, even in release mode.
Not sure what the best way to fix this is, but since the options field is private and there is no public or protected property around it, it can't be worked around in the project node subclass and requires a change in the base class code.
This bug exists in VS2005 as well. Could we please get this fixed in the next update to the SDK?
Wrong configuration data is returned causing Debug and Start Without Debugging commands to invoke the wrong file!
The correct data should be returned