Example #1
0
        // Token: 0x0600003C RID: 60 RVA: 0x00002A80 File Offset: 0x00000C80
        private bool AddProjectToPathMap(IProjectNode projectNode)
        {
            var configProperties = projectNode.PropertiesFor(projectNode.Configuration.ActiveConfigurationName);
            var assemblyPath     = Path.Combine(configProperties.targetDir, configProperties.TargetFileName);

            if (File.Exists(assemblyPath))
            {
                return(AddAssemblyToPathMap(assemblyPath, true));
            }
            return(true);
        }
Example #2
0
        public void how_to_convert_MSBuild_Project_to_IProjectNode()
        {
            // Say you got an MSBuild Project somehow.
            Microsoft.Build.Evaluation.Project project = this.MsBuildLibrary;

            IProjectNode projectNode = project.Adapt().AsProjectNode();

            Assert.IsNotNull(projectNode);

            // Now we can use Clide's project node API, such as accessing
            // the MSBuild properties using dynamic syntax.
            string assemblyName = projectNode.Properties.AssemblyName;

            Assert.AreEqual("ClassLibrary", assemblyName);

            // Or a property for a specific configuration
            string debugType = projectNode.PropertiesFor("Debug|AnyCPU").DebugType;

            Assert.AreEqual("full", debugType);
        }