Exemplo n.º 1
0
        public void ConfigureAll(Configuration conf, CommonTarget target)
        {
            conf.SolutionFileName = Name;
            conf.SolutionPath     = Path.Combine(Globals.TmpDirectory, "solutions");

            conf.AddProject <HelloWorldExe>(target.ToSpecificDotNetOSTarget(DotNetOS.windows));
        }
Exemplo n.º 2
0
        public virtual void ConfigureAll(Configuration conf, CommonTarget target)
        {
            conf.ProjectFileName = "[project.Name].[target.DevEnv]";
            conf.ProjectPath     = @"[project.SourceRootPath]";

            conf.IntermediatePath  = Path.Combine(Globals.TmpDirectory, @"obj\[target.DirectoryName]\[project.Name]");
            conf.TargetLibraryPath = Path.Combine(Globals.TmpDirectory, @"lib\[target.DirectoryName]\[project.Name]");
            conf.TargetPath        = Path.Combine(Globals.OutputDirectory, "[target.DirectoryName]");

            conf.Options.Add(Options.CSharp.WarningLevel.Level5);
            conf.Options.Add(Options.CSharp.TreatWarningsAsErrors.Enabled);
        }
Exemplo n.º 3
0
        public override void ConfigureAll(Configuration conf, CommonTarget target)
        {
            base.ConfigureAll(conf, target);

            conf.Output = Configuration.OutputType.DotNetClassLibrary;

            if (target.DotNetFramework.IsDotNetFramework())
            {
                conf.ReferencesByName.Add("System");
            }

            if (target.DotNetFramework.IsDotNetCore())
            {
                conf.ReferencesByNuGetPackage.Add("System.Text.Encoding.CodePages", "4.5.0");
            }
        }
Exemplo n.º 4
0
        public static CommonTarget[] GetDefaultTargets(DotNetOS dotNetOS = DotNetOS.Default)
        {
            var netFrameworkTarget = new CommonTarget(
                Platform.anycpu,
                DevEnv.vs2019,
                Optimization.Debug | Optimization.Release,
                DotNetFramework.v4_7_2,
                dotNetOS: 0 // OS is not applicable for .net framework
                );

            var netCoreTarget = new CommonTarget(
                Platform.anycpu,
                DevEnv.vs2019,
                Optimization.Debug | Optimization.Release,
                DotNetFramework.net5_0,
                dotNetOS: dotNetOS
                );

            return(new[] { netFrameworkTarget, netCoreTarget });
        }
Exemplo n.º 5
0
 public OSMultiFrameworksHelloWorldSolution()
     : base(typeof(CommonTarget))
 {
     AddTargets(CommonTarget.GetDefaultTargets());
 }
Exemplo n.º 6
0
 public override void ConfigureAll(Configuration conf, CommonTarget target)
 {
     base.ConfigureAll(conf, target);
     conf.Output = Configuration.OutputType.DotNetConsoleApp;
     conf.AddPrivateDependency <HelloWorldLib>(target.ToDefaultDotNetOSTarget());
 }
Exemplo n.º 7
0
 public HelloWorldExe()
 {
     SourceRootPath = @"[project.RootPath]\HelloWorldMultiframeworks";
     AddTargets(CommonTarget.GetDefaultTargets(DotNetOS.windows));
 }
Exemplo n.º 8
0
 public HelloWorldLib()
 {
     SourceRootPath = @"[project.RootPath]\[project.Name]";
     AddTargets(CommonTarget.GetDefaultTargets());
 }