We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello! I'm unsure if this is a bug or something I'm doing incorrectly.
I'm unable to get the .csproj to generate the project configuration to match the .sln configurations.
Here is the example I created that produces the issue:
using Sharpmake; using System.Reflection; using System.Text.Json; using System.Collections.Generic; using System.Linq; using System.IO; using System; [Fragment, Flags] public enum ErrorFlag { First = 1, Second = 2 } public class ErrorTarget : ITarget { public DevEnv DevEnv; public Platform Platform; public Optimization Optimization; public DotNetFramework Framework; public BuildSystem BuildSystem; public ErrorFlag ErrorFlag; } [Generate] public class ErrorProject : CSharpProject { public ErrorProject() : base(typeof(ErrorTarget)) { AddTargets(new ErrorTarget { DevEnv = DevEnv.vs2022, Platform = Platform.win64, Optimization = Optimization.Debug | Optimization.Release | Optimization.Retail, Framework = DotNetFramework.net6_0, BuildSystem = BuildSystem.MSBuild, ErrorFlag = ErrorFlag.First | ErrorFlag.Second }); RootPath = @Path.Combine("[project.SharpmakeCsPath]"); SourceRootPath = @Path.Combine("[project.SharpmakeCsPath]"); } [Configure] public void Configure(Project.Configuration conf, ErrorTarget target) { conf.Name = "[target.Platform]_[target.Optimization]_[target.ErrorFlag]"; conf.TargetPath = "[project.SharpmakeCsPath]/generated"; } }; [Generate] public class DemoSolution : Solution { public DemoSolution() : base(typeof(ErrorTarget)) { AddTargets(new ErrorTarget { DevEnv = DevEnv.vs2022, Platform = Platform.win64, Optimization = Optimization.Debug | Optimization.Release | Optimization.Retail, Framework = DotNetFramework.net6_0, BuildSystem = BuildSystem.MSBuild, ErrorFlag = ErrorFlag.First | ErrorFlag.Second }); } [Configure] public void Configure(Solution.Configuration conf, ErrorTarget target) { conf.Name = "[target.Platform]_[target.Optimization]_[target.ErrorFlag]"; conf.SolutionPath = Path.Combine("generated", "[target.DevEnv]"); conf.AddProject<ErrorProject>(target); } } public static class Main { [Sharpmake.Main] public static void SharpmakeMain(Arguments arguments) { KitsRootPaths.SetUseKitsRootForDevEnv(DevEnv.vs2022, KitsRootEnum.KitsRoot10, Options.Vc.General.WindowsTargetPlatformVersion.Latest); // Generate solutions arguments.Generate(typeof(DemoSolution)); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello! I'm unsure if this is a bug or something I'm doing incorrectly.
I'm unable to get the .csproj to generate the project configuration to match the .sln configurations.
Here is the example I created that produces the issue:
The text was updated successfully, but these errors were encountered: