question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Visual Studio for Mac ignores parameter values provided by the user

See original GitHub issue

When a template is used with Visual Studio 2022 for Mac, the parameter values provided by the user are ignored and the default values are used instead. The same template works correctly with .NET CLI and Visual Studio 2022 for Windows.

I used Visual Studio 2022 for Mac ver 17.4 (build 2406)

Here is a sample template to use for reproduce the issue.

The template defines two parameters:

  • param, used in an assignment in Program.cs
  • value, used in appsettings.json

They are replaced with the respective default values, MyParameter and MyValue, instead of the values provided by the user

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mrwardcommented, Nov 29, 2022

It will be in Visual Studio for Mac 17.5 preview 2. I do not have an exact date but I expect it will be available sometime in December.

0reactions
vlada-shubinacommented, Dec 5, 2022

Closing:

  • it is already fixed
  • not related to the repo

if the issue is still reproduced in the Visual Studio for Mac 17.5 preview 2, please comment on this option or preferably open VS feedback issue. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CA1026: Default parameters should not be used
The compiler ignores the values of default parameters for Managed Extension for C++ when it accesses managed code. The Visual Basic compiler ...
Read more >
User and Workspace Settings
The Settings editor is the UI that lets you review and modify setting values that are stored in a settings.json file. You can...
Read more >
Suppress code analysis violations - Visual Studio (Windows)
Learn how to suppress code analysis violations in Visual Studio. Understand how to use the SuppressMessageAttribute attribute for in-source ...
Read more >
Calculate code metrics - Visual Studio (Windows)
Developers can use Visual Studio to generate code metrics data that measure the complexity and maintainability of their managed code.
Read more >
IntelliSense of C++/CLI ignores default value of argument ...
If you have a C# class that uses a default value in a constructor: public class MyClass { public MyClass(ISomeArgument argument = null)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found