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

Empty value in runsettings should be treated as the tag not being present at all unless overridden #3471

Closed
nohwnd opened this issue Mar 16, 2022 · 1 comment

Comments

@nohwnd
Copy link
Member

nohwnd commented Mar 16, 2022

Description

Make providing provide empty value in runconfiguration the same as not specifying the tag at all, unless the option forces it. Currently not providing TargetFrameworkVersion fails the run, while omitting the tag falls to auto-detection. Which is our desired approach anyway. There are probably many options like this. And it makes authoring runsettings painful.

<RunSettings>
<RunConfiguration>
    <TargetFrameworkVersion></TargetFrameworkVersion>    
</RunConfiguration >
</RunSettings>
C:\> dotnet test --diag:logs2\log.txt --settings .\r.runsettings

...

Microsoft (R) Test Execution Command Line Tool Version 17.2.0-preview-20220207-08
Copyright (c) Microsoft Corporation.  All rights reserved.

Settings file provided does not conform to required format. An error occurred while loading the settings.  
Error: Invalid setting 'RunConfiguration'. Invalid value '' specified for 'TargetFrameworkVersion'..

Steps to reproduce

Don't provide value to tfm and it fails.

Expected behavior

I would expect to just fallback to auto-detection, as if the tag is not specified at all.

Actual behavior

It fails my run.

Diagnostic logs

Environment

AB#1865121

@nohwnd
Copy link
Member Author

nohwnd commented Aug 3, 2023

Seems like a simple thing worth a look. Or closing if it is too complicated because there are no more asks for this.

@nohwnd nohwnd closed this as completed Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant