.NET

1454 readers
26 users here now

Getting started

Useful resources

IDEs and code editors

Tools

Rules

Related communities

Wikipedia pages

founded 1 year ago
MODERATORS
251
 
 

"A Visual Studio extension that checks and notifies about available updates for the installed NuGet packages for the open solution."

This time no fancy new features, but a complete refactor of the project structure which will keep the extension easy to maintain.

Thanks goes to @tomenglert

252
253
 
 

Summary of What's New in this Release of Visual Studio 2022 version 17.7 Preview 4

  • Fixes "Waiting for debugger" message on emulator when trying to debug .NET MAUI Android apps.
  • Fixing an issue with symbol loading when debugging MAUI projects.

Developer Community Highlights

  • TestExplorer unable to run GoogleTest tests since the "support" of namespaces in VS 17.6 preview 3
  • Blank Solution project template missing
  • Pylance language server isn't starting in VS due to a "Node.js was not found" error.
  • diagsession fails to load with Specified part does not exist in the package. (0x80131509)
  • Not running compatible code on the thread in Android MAUI
  • Xamarin.android not working, debug mode
  • .NET MAUI Android app: "Waiting for Debugger"
  • Unable to deploy Azure Functions app
  • MAUI Android .NET 8 Crash
254
255
 
 

Starting with Visual Studio 17.7 Preview 3, you can now enable a preview of our modernized Extension Manager that highlights extension details and helps you more easily discover the extensions you’ll love.

256
 
 

While implementing AutoMapper in some existing code, I came across the need to map to a nullable property. Other business logic relied on this particular long being null instead of 0. The DTO has a property that contains a (long)Id, but the Entity contains the virtual property as well as a nullable long? of the Id. Anyway after fumbling through a few tries, I finally came upon the solution and wanted to share it here.

In the MapperProfile for the direction of DTO to Entity you have to do a null check, but the trick for me was having to explicitly cast to (long?)null.

CreateMap<ExampleDto, ExampleEntity>().ForMember(ee => ee.ExampleId, options => options.MapFrom(ed => ed.ExampleProperty != null ? ed.ExampleProperty.ExampleId : (long?)null)).NoVirtualMap();

Hope someone else finds this helpful, and finds it here.

257
258
26
Announcing .NET 8 Preview 6 (devblogs.microsoft.com)
submitted 1 year ago by sboulema to c/dotnet
 
 

We’re delighted to let you know about the latest features and improvements coming with .NET 8 Preview 6! This release is a continuation of the Preview 5 release, and we’re committed to bringing you more enhancements with each monthly release.

Today we have an exciting release incorporated with plenty of library updates, a new WASM mode, more source generators, constant performance improvements, and NativeAOT support on iOS. We hope you enjoy these new features and improvements. Stay tuned for more updates as we continue our journey of making .NET better, together!

259
 
 

I just personally love them and I am looking to get a deeper understanding of them and how to implement them.

Do you chaps have any good resources? (Articles, nuget packages, etc.)

260
 
 

A Visual Studio extension that checks and notifies about available updates for the installed NuGet packages for the open solution.

Bug Fixes Remove infobar when closing a solution to prevent duplicates

261
 
 

Today, we’re excited to announce that Microsoft Dev Box is now generally available. Below we’ll highlight a few significant features of Dev Box for Visual Studio users. Read the announcement blog to learn more about our journey to Microsoft Dev Box and what the service means for Visual Studio subscribers.

262
 
 

Today, we’re releasing an update to the System.Web Adapters that simplify upgrading from ASP.NET to ASP.NET Core. This release brings a number of fixes as well as new scenarios that we’ll explore in this post.

263
264
265
266
28
submitted 1 year ago by starman to c/dotnet
267
11
Rider 2023.2 EAP 7 is out (blog.jetbrains.com)
submitted 1 year ago by starman to c/dotnet
268
12
submitted 1 year ago* (last edited 1 year ago) by jim_stark to c/dotnet
 
 

The documentation uses is in the example for "declaration patterns" but the book I am reading uses a switch statement. But when I try to run the code I run into errors.

using System;

public class Program
{
  public static void Main()
  {
    var o = 42;

    switch (o) {
      case string s:
        Console.WriteLine($"A piece of string is {s.Length} long");
        break;

      case int i:
        Console.WriteLine($"That's numberwang! {i}");
        break;
    }
  }
}

Error:

Compilation error (line 7, col 6): An expression of type 'int' cannot be handled by a pattern of type 'string'.

EDIT

Changing from

var o = 42;

to

object o = 42;

worked.

Full code: https://github.com/idg10/prog-cs-10-examples/blob/main/Ch02/BasicCoding/BasicCoding/Patterns.cs

269
 
 

What does "control falls through a switch statement" mean in this context? Control just moves on to the next statement?

I thought if there is no match and a default case doesn't exist it will raise an exception. Is it not true?

270
 
 

Many of us consider instrumentation as boring infrastructure. But, with the popularity of microservices architecture, its importance have significantly increased. Alex Thissen explains logging, metrics and tracing from .NET (and Azure) point of view. I think we should focus more on OpenTelemetry, but this is a good start.

271
19
submitted 1 year ago* (last edited 1 year ago) by starman to c/dotnet
 
 

New "AI" features:

  • Chat
  • Commit message generation
  • Unity solution generation
272
273
7
submitted 1 year ago by starman to c/dotnet
274
28
submitted 1 year ago* (last edited 1 year ago) by sisyphean to c/dotnet
 
 

The original thread is on the devil’s website and I don’t want to direct traffic to it, so here’s a link to the tweet instead:

https://twitter.com/davidfowl/status/1671351948640129024?s=46&t=OEG0fcSTxko2ppiL47BW1Q

275
8
Migrating Microsoft Forms to .NET 6 (devblogs.microsoft.com)
submitted 1 year ago by starman to c/dotnet
view more: ‹ prev next ›