The type or namespace name ‘QueryOption’ could not be found

Starting with Microsoft Graph .NET SDK 5.0, the QueryOption class is no longer used. Instead, query options are set using the requestConfiguration modifier. Let’s take a simple example: If you must use QueryOptions, your only alternative is to downgrade the Microsoft Graph package to a 4.x version.

|

How to fix: Command dotnet ef not found

Could not execute because the specified command or file was not found.Possible reasons for this include:– You misspelled a built-in dotnet command.– You intended to execute a .NET Core program, but dotnet-ef does not exist.– You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the…

|

What’s new in .NET 8

.NET 8 was released on November 14, 2023 as an LTS (Long Term Support) version, meaning it will continue to receive support, updates, and bug fixes for at least three years from its release date. As usual, .NET 8 brings support for a new version of the C# languange, namely C# 12. Check out our dedicated page…

What’s new in C# 12

As technology continues to evolve, so does the C# programming language. With the release of C# 12 on the horizon, developers can look forward to a host of exciting new features and enhancements that promise to streamline their coding experience and open up new possibilities in software development. If you haven’t yet switched to C#…

How to switch to C# 12

While trying out C# 12 features, it’s possible you might come across errors similar to these: Feature is not available in C# 11.0. Please use language version 12.0 or later. or Error CS8652: The feature ‘<feature name>’ is currently in Preview and unsupported. To use Preview features, use the ‘preview’ language version. There are two…

C# 12 – Default values for parameters in lambda expressions

Starting with C# version 12, you can specify default values for your parameters in lambda expressions. The syntax and the restrictions on the default parameter values are the same as for methods and local functions. Let’s take an example: This lambda can now be consumed as follows: params array in lambda expressions You can also…

C# 11 – Generic attributes

All right folks, generic attributes are finally a thing in C#! 🥳 You can define one just as you would define any other generic class: And use it like you would use any other attribute: Generic attribute restrictions When applying the attribute, all the generic type arguments must be provided. In other words, the generic…