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?
Repro Steps:
See description
Actual Results:
Wrong configuration data is returned causing Debug and Start Without Debugging commands to invoke the wrong file!
Expected Results:
The correct data should be returned
Closed Dec 3, 2008 at 6:14 AM by DmitryPavlov


wrote Dec 3, 2008 at 6:14 AM

Resolved with changeset 24911.

wrote Feb 13, 2013 at 10:30 PM

wrote May 16, 2013 at 2:28 AM