Example #1
0
 private void WriteXunitDiscoverPackage()
 {
     if (!m_isXunitTestProject)
     {
         var projectDir = Path.GetParent(Context.PathTable).ToString(Context.PathTable);
         Directory.CreateDirectory(projectDir);
         var path = System.IO.Path.Combine(projectDir, "packages.config");
         MsbuildWriter.WriteFile("BuildXL.Ide.Generator.Old.CommonBuildFiles.packages.config", path);
         m_isXunitTestProject = true;
     }
 }
Example #2
0
        /// <summary>
        /// Perform the generation of msbuild files
        /// </summary>
        public bool Generate()
        {
            IReadOnlyList <MsbuildFile> msbuildFiles = GenerateMsbuildFiles();

            // After generating all msbuild files, decide the project and assembly references
            ProcessRawReferences(msbuildFiles);

            // Now, merge the projects in a msbuild file by finding the conditioned and unconditioned properties/items.
            // TODO: Merging doesn't work for vcxproj or any proj with multiple qualifiers, e.g., there are duplicate entries in <ItemGroup/>.
            // TODO: Fix me!
            //foreach (var msbuildFile in msbuildFiles)
            //{
            //    CreateConditionedProjects(msbuildFile);
            //}

            // Write the msbuild files to the disk
            var writer = new MsbuildWriter(msbuildFiles, m_context);

            writer.Write();

            return(true);
        }