public DebugProject() : base(typeof(Target), typeof(Configuration), isInternal: true) { _projectInfo = DebugProjectGenerator.DebugProjects[GetType()]; // set paths RootPath = _projectInfo.ProjectFolder; SourceRootPath = RootPath; // add selected source files SourceFiles.AddRange(_projectInfo.ProjectFiles); // ensure that no file will be automagically added SourceFilesExtensions.Clear(); ResourceFilesExtensions.Clear(); NonEmbeddedResourceFilesExtensions.Clear(); PRIFilesExtensions.Clear(); ResourceFiles.Clear(); NoneExtensions.Clear(); VsctExtension.Clear(); // nor removed SourceFilesExcludeRegex.Clear(); Name = _projectInfo.DisplayName; // Use the new csproj style ProjectSchema = CSharpProjectSchema.NetCore; // prevents output dir to have a framework subfolder CustomProperties.Add("AppendTargetFrameworkToOutputPath", "false"); // we need to disable determinism while because we are using wildcards in assembly versions // error CS8357: The specified version string contains wildcards, which are not compatible with determinism CustomProperties.Add("Deterministic", "false"); AddTargets(DebugProjectGenerator.GetTargets()); }
public void ConfigureAll(Configuration conf, Target target) { conf.ProjectPath = RootPath; conf.ProjectFileName = "[project.Name].[target.DevEnv]"; conf.Output = Configuration.OutputType.DotNetClassLibrary; DebugProjectGenerator.AddSharpmakePackage(conf); conf.Options.Add(Options.CSharp.LanguageVersion.CSharp5); conf.ReferencesByPath.AddRange(_projectInfo.References); foreach (var projectReference in _projectInfo.ProjectReferences) { conf.AddPrivateDependency(target, projectReference); } // set up custom configuration only to setup project if (string.CompareOrdinal(conf.ProjectPath.ToLower(), RootPath.ToLower()) == 0 && _projectInfo.IsSetupProject) { conf.SetupProjectOptions(); } }
public DebugProject() : base(typeof(Target), typeof(Configuration), isInternal: true) { _projectInfo = DebugProjectGenerator.DebugProjects[GetType()]; // set paths RootPath = _projectInfo.ProjectFolder; SourceRootPath = RootPath; // add selected source files SourceFiles.AddRange(_projectInfo.ProjectFiles); // ensure that no file will be automagically added SourceFilesExtensions.Clear(); ResourceFilesExtensions.Clear(); PRIFilesExtensions.Clear(); ResourceFiles.Clear(); NoneExtensions.Clear(); VsctExtension.Clear(); Name = _projectInfo.DisplayName; AddTargets(DebugProjectGenerator.GetTargets()); }