当前位置: 首页>>代码示例>>C#>>正文


C# Project.GetAssemblyName方法代码示例

本文整理汇总了C#中Microsoft.Build.Evaluation.Project.GetAssemblyName方法的典型用法代码示例。如果您正苦于以下问题:C# Project.GetAssemblyName方法的具体用法?C# Project.GetAssemblyName怎么用?C# Project.GetAssemblyName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.Build.Evaluation.Project的用法示例。


在下文中一共展示了Project.GetAssemblyName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Add

 public void Add(Project project)
 {
     projects.Add(project.GetAssemblyName(), project);
 }
开发者ID:uQr,项目名称:DXBuildGenerator,代码行数:4,代码来源:SortedProjects.cs

示例2: Generate

        internal void Generate()
        {
            XDocument project = XDocument.Load(TemplateFileName);

            string[] projectFiles = Directory.GetFiles(SourceCodeDir, "*.csproj", SearchOption.AllDirectories);

            vsShellAssembly = GetMicrosoftVisualStudioShellAssembly();

            var silverlightProjects = new SortedProjects();
            var windowsProjects = new SortedProjects();

            if (!string.IsNullOrWhiteSpace(OutputPath))
                SetPropertyValue(project, "OutputPath", OutputPath);

            SetPropertyValue(project, "DevExpressSourceDir", SourceCodeDir);
            SetPropertyValue(project, "TasksAssembly", GetType().Assembly.Location);

            foreach (var projectFile in projectFiles)
            {
                bool added = false;

                ProjectInfo pi = GetProjectInfo(projectFile);
                if (!(pi.IsSilverlight && SkipSilverlightProjects) &&
                    !(pi.IsTest && SkipTestProjects) &&
                    !(pi.IsMvc && SkipMvcProjects) &&
                    !(pi.IsWinRT && SkipWinRTProjects))
                {

                    Project p = new Project(projectFile);
                    //TODO: Get rid of hard-coded exclusions
                    if (!p.GetAssemblyName().Contains("SharePoint") && !p.FullPath.Contains("DevExpress.Xpo.Extensions.csproj"))
                    {
                        if (pi.IsSilverlight)
                        {
                            if (!p.FullPath.Contains(".DemoBase."))
                            {
                                silverlightProjects.Add(p);
                                added = true;
                            }
                        }
                        else
                        {
                            windowsProjects.Add(p);
                            if (p.GetPropertyValue("OutputType") == "Library")
                                libraryAssemblyNames.Add(p.GetAssemblyName());
                            added = true;
                        }
                    }
                }

                if (!added)
                {

                    if (!pi.IsSilverlight)
                        windowsProjects.AddExcluded(pi.AssemblyName);
                }

            }

            silverlightProjects.Sort();
            windowsProjects.Sort();

            foreach (var p in windowsProjects.SortedList)
                UpdateProjectReferences(p);

            referenceFiles.Clear();
            PopulateReferenceFiles(silverlightProjects.UnknownReferences);
            PopulateReferenceFiles(windowsProjects.UnknownReferences);
            referenceFiles.Add(typeof(System.Data.Entity.DbContext).Assembly.Location);
            string xamlResProcDll = Directory.GetFiles(ReferencesPath, "DevExpress.Build.XamlResourceProcessing*.dll", SearchOption.AllDirectories).FirstOrDefault();
            if (!string.IsNullOrEmpty(xamlResProcDll))
            {
                referenceFiles.Add(xamlResProcDll);
                ConvertTargetFiles(
                    Path.Combine(@"$(BuildTasksPath)", Path.GetFileName(xamlResProcDll)));
            }
            else
                Console.WriteLine("WARNING: DevExpress.Build.XamlResourceProcessing not found.");

            CreateReferenceFilesGroup(project);
            ConvertPatchInternals(project);

            ConvertProjectsToBuild(project, silverlightProjects, "4.0", true);
            ConvertProjectsToBuild(project, windowsProjects, "4.0", false);
            CreateAssemblyNamesItems(project);

            File.WriteAllText(OutputFileName, project.ToString().Replace("<ItemGroup xmlns=\"\">", "<ItemGroup>"));
        }
开发者ID:uQr,项目名称:DXBuildGenerator,代码行数:88,代码来源:BuildGenerator.cs


注:本文中的Microsoft.Build.Evaluation.Project.GetAssemblyName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。