Skip to content
New issue

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

MSBuildFileLogger Verbosity does not accept Verbosity.Verbose #1602

Closed
kendaleiv opened this issue May 10, 2017 · 1 comment · Fixed by #1762
Closed

MSBuildFileLogger Verbosity does not accept Verbosity.Verbose #1602

kendaleiv opened this issue May 10, 2017 · 1 comment · Fixed by #1762
Labels
Milestone

Comments

@kendaleiv
Copy link

Task("Build")
    .IsDependentOn("Restore-NuGet-Packages")
    .Does(() =>
{
    MSBuild(solution, settings =>
        settings.SetConfiguration(configuration)
            .WithProperty("TreatWarningsAsErrors", "True")
            .SetVerbosity(Verbosity.Minimal)
            .AddFileLogger(new MSBuildFileLogger
            {
                Verbosity = Verbosity.Verbose
            }));
});

results in

========================================
Build
========================================
Executing task: Build
Microsoft (R) Build Engine version 15.1.1012.6693
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : Logger error MSB4103: "Verbose" is not a valid logger verbosity level.
An error occurred when executing task 'Build'.
Error: MSBuild: Process returned an error (exit code 1).

However, Verbosity.Diagnostic works great!

@devlead devlead added the Bug label May 11, 2017
@devlead
Copy link
Member

devlead commented May 11, 2017

Issue seems to be here

 parameters.Add(Verbosity != null ? $"Verbosity={Verbosity.Value.ToString()}" : null);

where probably same logic that's used here should be reused.

 builder.Append(string.Format(CultureInfo.InvariantCulture, "/v:{0}", GetVerbosityName(settings.Verbosity)));

devlead added a commit to devlead/cake that referenced this issue Aug 21, 2017
@devlead devlead added this to the v0.22.0 milestone Aug 22, 2017
devlead added a commit to devlead/cake that referenced this issue Aug 28, 2017
devlead added a commit to devlead/cake that referenced this issue Aug 30, 2017
devlead added a commit to devlead/cake that referenced this issue Aug 31, 2017
bjorkstromm added a commit that referenced this issue Aug 31, 2017
GH1602: Fix MSBuild file logger verbosity issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants