Exemplo n.º 1
0
        public void AddProjectReference(string projectName, ProjectFileReference reference)
        {
            var metadata = new Dictionary <string, string>();

            metadata.Add("Name", projectName);

            if (!reference.Aliases.IsEmpty)
            {
                metadata.Add("Aliases", string.Join(",", reference.Aliases));
            }

            string relativePath = FilePathUtilities.GetRelativePath(_loadedProject.DirectoryPath, reference.Path);

            _loadedProject.AddItem("ProjectReference", relativePath, metadata);
        }
Exemplo n.º 2
0
        public void AddProjectReference(string projectName, ProjectFileReference reference)
        {
            var metadata = new Dictionary <string, string>
            {
                { MetadataNames.Name, projectName }
            };

            if (!reference.Aliases.IsEmpty)
            {
                metadata.Add(MetadataNames.Aliases, string.Join(",", reference.Aliases));
            }

            var relativePath = PathUtilities.GetRelativePath(_loadedProject.DirectoryPath, reference.Path);

            _loadedProject.AddItem(ItemNames.ProjectReference, relativePath, metadata);
        }