private static bool IsSilverlightMscorlib(IProjectToAssemblyReference reference)
        {
            var assemblyNameInfo = reference.ReferenceTarget.AssemblyName;
            var publicKeyTokenBytes = assemblyNameInfo.GetPublicKeyToken();
            if (publicKeyTokenBytes == null)
                return false;

            // Not sure if this is the best way to do this, but the public key token for mscorlib on
            // the desktop if "b77a5c561934e089". On Silverlight, it's "7cec85d7bea7798e"
            var publicKeyToken = AssemblyNameExtensions.GetPublicKeyTokenString(publicKeyTokenBytes);
            return assemblyNameInfo.Name == "mscorlib" && publicKeyToken == SilverlightMscorlibPublicKeyToken;
        }
Ejemplo n.º 2
0
        private static bool IsSilverlightMscorlib(IProjectToAssemblyReference reference)
        {
            var assemblyNameInfo    = reference.ReferenceTarget.AssemblyName;
            var publicKeyTokenBytes = assemblyNameInfo.GetPublicKeyToken();

            if (publicKeyTokenBytes == null)
            {
                return(false);
            }

            // Not sure if this is the best way to do this, but the public key token for mscorlib on
            // the desktop if "b77a5c561934e089". On Silverlight, it's "7cec85d7bea7798e"
            var publicKeyToken = AssemblyNameExtensions.GetPublicKeyTokenString(publicKeyTokenBytes);

            return(assemblyNameInfo.Name == "mscorlib" && publicKeyToken == SilverlightMscorlibPublicKeyToken);
        }