ProjectConfig.get_CanonicalName returns display name instead of the canonical name


DisplayName is documented as being in the form "<configname>|<platform name>" http://msdn.microsoft.com/en-us/library/bb139670(v=VS.80).aspx
CanonicalName is just the config name such as "Debug" or "Release" http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivsprojectcfg.get_canonicalname(v=VS.80).aspx
In MPFProj get_CanonicalName just calls get_DisplayName, so a string such as "Debug|AnyCPU" is passed out when it should just be "Debug".
The fix is to make get_CanonicalName just to do:
    public virtual int get_CanonicalName(out string name)
        name = configName;
        return VSConstants.S_OK;


dinov wrote May 22, 2012 at 10:55 PM

If you are using MPFProj w/ Dev11 and are getting an error about x64 and ARM targets not being supported in the WPF designer you might want this fix.

wrote Feb 14, 2013 at 2:58 AM

KlausGuetter wrote Jan 24, 2014 at 7:38 AM

Thanks, helped a lot!