本文整理汇总了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);
}
示例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>"));
}