Esempio n. 1
0
        public void addReference(string assemblyToLoad)
        {
            if (myProjectContent.NamespaceExists("System").isFalse())
            {
                myProjectContent.AddReferencedContent(pcRegistry.Mscorlib);
            }
            if (assemblyToLoad.valid().isFalse())
            {
                return;
            }
            IProjectContent referenceProjectContent = pcRegistry.GetProjectContentForReference(assemblyToLoad, assemblyToLoad);

            if (referenceProjectContent == null)
            {
                "referenceProjectContent was null".error();
            }
            else
            {
                myProjectContent.AddReferencedContent(referenceProjectContent);
                if (referenceProjectContent is ReflectionProjectContent)
                {
                    (referenceProjectContent as ReflectionProjectContent).InitializeReferences();
                }
                else
                {
                    "something when wrong in DefaultProjectContent.add_Reference".error();
                }
            }

            //var supportedLanguage = SupportedLanguage.CSharp;
        }