本文整理汇总了C#中ICSharpCode.SharpDevelop.Project.ProjectBuildOptions类的典型用法代码示例。如果您正苦于以下问题:C# ProjectBuildOptions类的具体用法?C# ProjectBuildOptions怎么用?C# ProjectBuildOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProjectBuildOptions类属于ICSharpCode.SharpDevelop.Project命名空间,在下文中一共展示了ProjectBuildOptions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MSBuildEngineWorker
internal MSBuildEngineWorker(IMSBuildEngine parentBuildEngine, IProject project, ProjectBuildOptions options, IBuildFeedbackSink feedbackSink, List<string> additionalTargetFiles)
{
this.parentBuildEngine = parentBuildEngine;
this.project = project;
this.projectFileName = project.FileName;
this.projectMinimumSolutionVersion = project.MinimumSolutionVersion;
this.options = options;
this.feedbackSink = feedbackSink;
this.additionalTargetFiles = additionalTargetFiles;
}
示例2: BuildAsync
public override Task<bool> BuildAsync(ProjectBuildOptions options, IBuildFeedbackSink feedbackSink, IProgressMonitor progressMonitor)
{
if (this.MinimumSolutionVersion == SolutionFormatVersion.VS2005) {
return SD.MSBuildEngine.BuildAsync(
this, options, feedbackSink, progressMonitor.CancellationToken,
new [] { Path.Combine(FileUtility.ApplicationRootPath, @"bin\SharpDevelop.CheckMSBuild35Features.targets") });
} else {
return base.BuildAsync(options, feedbackSink, progressMonitor);
}
}
示例3: StartBuild
public override void StartBuild(ProjectBuildOptions options, IBuildFeedbackSink feedbackSink)
{
if (this.MinimumSolutionVersion == Solution.SolutionVersionVS2005) {
MSBuildEngine.StartBuild(this,
options,
feedbackSink,
MSBuildEngine.AdditionalTargetFiles.Concat(
new [] { Path.Combine(MSBuildEngine.SharpDevelopBinPath, "SharpDevelop.CheckMSBuild35Features.targets") }));
} else {
base.StartBuild(options, feedbackSink);
}
}
示例4: StartBuild
public static void StartBuild(IProject project, ProjectBuildOptions options, IBuildFeedbackSink feedbackSink, IEnumerable<string> additionalTargetFiles)
{
if (project == null)
throw new ArgumentNullException("project");
if (options == null)
throw new ArgumentNullException("options");
if (feedbackSink == null)
throw new ArgumentNullException("feedbackSink");
if (additionalTargetFiles == null)
throw new ArgumentNullException("additionalTargetFiles");
MSBuildEngine engine = new MSBuildEngine(project, options, feedbackSink);
engine.additionalTargetFiles = additionalTargetFiles;
engine.StartBuild();
}
示例5: BuildAsync
public Task<bool> BuildAsync(IProject project, ProjectBuildOptions options, IBuildFeedbackSink feedbackSink, CancellationToken cancellationToken, IEnumerable<string> additionalTargetFiles)
{
if (project == null)
throw new ArgumentNullException("project");
if (options == null)
throw new ArgumentNullException("options");
if (feedbackSink == null)
throw new ArgumentNullException("feedbackSink");
var additionalTargetFileList = additionalTargetFiles != null ? additionalTargetFiles.ToList() : new List<string>();
if (project.MinimumSolutionVersion >= SolutionFormatVersion.VS2010) {
additionalTargetFileList.Add(Path.Combine(Path.GetDirectoryName(typeof(MSBuildEngine).Assembly.Location), "SharpDevelop.TargetingPack.targets"));
}
var engine = new MSBuildEngineWorker(this, project, options, feedbackSink, additionalTargetFileList);
return engine.RunBuildAsync(cancellationToken);
}
示例6: GetBuildDependencies
public virtual ICollection<IBuildable> GetBuildDependencies(ProjectBuildOptions buildOptions)
{
lock (SyncRoot) {
List<IBuildable> result = new List<IBuildable>();
foreach (ProjectSection section in this.ProjectSections) {
if (section.Name == "ProjectDependencies") {
foreach (SolutionItem item in section.Items) {
foreach (IProject p in ParentSolution.Projects) {
if (p.IdGuid == item.Name) {
result.Add(p);
}
}
}
}
}
return result;
}
}
示例7: StartBuild
public virtual void StartBuild(ProjectBuildOptions options, IBuildFeedbackSink feedbackSink)
{
feedbackSink.ReportError(new BuildError { ErrorText = "Building project " + Name + " is not supported.", IsWarning = true });
// we don't know how to build anything, report that we're done.
feedbackSink.Done(true);
}
示例8: BuildAsync
public Task<bool> BuildAsync(ProjectBuildOptions options, IBuildFeedbackSink feedbackSink, IProgressMonitor progressMonitor)
{
// SharpDevelop already has built our dependencies, so we're done immediately.
return Task.FromResult(true);
}
示例9: MSBuildEngine
private MSBuildEngine(IProject project, ProjectBuildOptions options, IBuildFeedbackSink feedbackSink)
{
this.projectFileName = project.FileName;
this.projectMinimumSolutionVersion = project.MinimumSolutionVersion;
this.options = options;
this.feedbackSink = feedbackSink;
}
示例10: GetBuildDependencies
public ICollection<IBuildable> GetBuildDependencies(ProjectBuildOptions buildOptions)
{
List<IBuildable> result = new List<IBuildable>();
foreach (IBuildable b in wrapped.GetBuildDependencies(buildOptions)) {
result.Add(factory.GetWrapper(b));
}
lock (cachedBuildDependencies) {
if (buildOptions != null)
cachedBuildDependencies[buildOptions] = result;
else
cachedBuildDependenciesForNullOptions = result;
}
return result;
}
示例11: GetBuildDependencies
public ICollection<IBuildable> GetBuildDependencies(ProjectBuildOptions buildOptions)
{
throw new NotImplementedException();
}
示例12: StartBuild
public void StartBuild(ProjectBuildOptions buildOptions, IBuildFeedbackSink feedbackSink)
{
throw new NotImplementedException();
}
示例13:
void IBuildable.StartBuild(ProjectBuildOptions buildOptions, IBuildFeedbackSink feedbackSink)
{
// building a solution finishes immediately: we only care for the dependencies
feedbackSink.Done(true);
}
示例14: BuildAsync
public override Task<bool> BuildAsync(ProjectBuildOptions options, IBuildFeedbackSink feedbackSink, IProgressMonitor progressMonitor)
{
bool success = false;
if (!VB6Helper.GetIsVB6Available())
{
feedbackSink.ReportError(new BuildError("", "Cannot locate VB6.EXE. Please make sure that you have entered the correct path to the VB6-directory under 'Tools -> VB6'."));
}
else
{
feedbackSink.ReportMessage(new RichText("Building the project using VB6.EXE..."));
var result = VB6Helper.MakeProject(_vbProject);
string[] errors = result.Results;
if (errors.Length == 0)
{
feedbackSink.ReportMessage(new RichText("Building with VB6.EXE completed successfully!"));
success = true;
}
else
{
foreach (string error in errors)
{
if (!string.IsNullOrWhiteSpace(error))
{
feedbackSink.ReportError(new BuildError("", error));
}
}
}
}
return Task.FromResult(success);
}
示例15: CreateProjectBuildOptions
public virtual ProjectBuildOptions CreateProjectBuildOptions(BuildOptions options, bool isRootBuildable)
{
if (options == null)
throw new ArgumentNullException("options");
// start of default implementation
var configMatchings = this.ParentSolution.GetActiveConfigurationsAndPlatformsForProjects(options.SolutionConfiguration, options.SolutionPlatform);
ProjectBuildOptions projectOptions = new ProjectBuildOptions(isRootBuildable ? options.ProjectTarget : options.TargetForDependencies);
projectOptions.BuildOutputVerbosity = options.BuildOutputVerbosity;
// find the project configuration
foreach (var matching in configMatchings) {
if (matching.Project == this) {
projectOptions.Configuration = matching.Configuration;
projectOptions.Platform = matching.Platform;
}
}
// fall back to solution config if we don't find any entries for the project
if (string.IsNullOrEmpty(projectOptions.Configuration))
projectOptions.Configuration = options.SolutionConfiguration;
if (string.IsNullOrEmpty(projectOptions.Platform))
projectOptions.Platform = options.SolutionPlatform;
// copy global properties to project options
foreach (var pair in options.GlobalAdditionalProperties)
projectOptions.Properties[pair.Key] = pair.Value;
if (isRootBuildable) {
// copy properties for root project to project options
foreach (var pair in options.ProjectAdditionalProperties) {
projectOptions.Properties[pair.Key] = pair.Value;
}
}
return projectOptions;
}