コード例 #1
0
        public void TestParseProjectFile()
        {
            var binPath  = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            var projFile = Path.Combine(binPath, "DemoModule.csproj.test");

            Assert.IsTrue(File.Exists(projFile));

            var parser = new DefaultProjectFileParser();
            var pfd    = parser.Parse(projFile);

            foreach (var x in pfd.References)
            {
                Console.WriteLine("Full={0},Path={1}, ReferenceType={2}, simple={3}",
                                  x.FullName, x.Path, x.ReferenceType, x.SimpleName);
            }
        }
コード例 #2
0
        public void TestParseProjectFile()
        {
            var modulesBaseDir = Environment.CurrentDirectory;
            var projFile       = Path.Combine(modulesBaseDir, "DemoModule.csproj.test");

            Assert.IsTrue(File.Exists(projFile));

            var parser = new DefaultProjectFileParser();
            var pfd    = parser.Parse(projFile);

            foreach (var x in pfd.References)
            {
                Console.WriteLine("Full={0},Path={1}, ReferenceType={2}, simple={3}",
                                  x.FullName, x.Path, x.ReferenceType, x.SimpleName);
                Console.WriteLine(Path.Combine(modulesBaseDir, x.SimpleName + ".dll"));
            }
        }