- Artykuły z tagiem roslyn

In the last two posts, I’ve described 14 different code smells related to the async/await keywords. Beside the problem description, I’ve also provided info about code analyzers that can detect and report given issue. Those analyzers come from a few different packages that are not strictly devoted to the asynchronous programming area. They also contain rules from other fields with predefined severity, which might not be appropriate to your needs, or you might not be interested in enforcing them at all. Th...

Dziel się z innymi:
Async code smells and how to track them down with analyzers - Summary · Cezary Piątek Blog

Narzędzia 158 dni, 11 godzin temu cezarypiatek 78 źrodło rozwiń

Which analyzer package should I use and how to configure it to avoid most common problems related to async/await.

Dziel się z innymi:
Async code smells and how to track them down with analyzers - Part I · Cezary Piątek Blog

Sztuka programowania 181 dni, 12 godzin, 9 minut temu cezarypiatek 66 źrodło rozwiń

How to keep two different types in synchronization using roslyn analyzers.

Tagi: C#, dotnet, roslyn
Dziel się z innymi:
[EN] Twin types - properties synchronization without inheritance · Cezary Piątek Blog

Narzędzia 300 dni, 13 godzin, 14 minut temu cezarypiatek 51 źrodło rozwiń

How to improve developer's experience while working with non-nullable references

Tagi: roslyn
Dziel się z innymi:
[EN] Improving non-nullable reference types handling · Cezary Piątek Blog

Sztuka programowania 382 dni, 11 godzin, 2 minuty temu cezarypiatek 61 źrodło rozwiń

How to create immutable types without writing a large amount of boilerplate code.

Dziel się z innymi:
[EN] Immutable types in C# with Roslyn · Cezary Piątek Blog

Sztuka programowania 391 dni, 11 godzin, 18 minut temu cezarypiatek 88 źrodło rozwiń

In this blog post, I’m going to describe how to create a tool for generating code during the build process and how I used it to create auto-synchronizing mapping classes.

Dziel się z innymi:
How to simulate AutoMapper that works during the build time · Cezary Piątek Blog

Narzędzia 496 dni, 11 godzin, 25 minut temu cezarypiatek 97 źrodło rozwiń

This blog post continues the series "Avoid thread synchronization problems with Roslyn" and this part is about the traps related to the usage of synchronization primitives.

Dziel się z innymi:
Avoid thread synchronization problems with Roslyn: Synchronization primitives traps · Cezary Piątek Blog

Narzędzia 573 dni, 12 godzin, 55 minut temu cezarypiatek 52 źrodło rozwiń

How I built a very simple macro system for C# that works right in the code editor

Dziel się z innymi:
[EN] CSharp Macros - let the Roslyn type for you · Cezary Piątek Blog

Narzędzia 587 dni, 13 godzin, 6 minut temu cezarypiatek 72 źrodło rozwiń

I've decided to create a series of blog posts where I will present what I've recently learned about the traps related to the multithreading in C#. I will also show you my proposition of Roslyn analyzers that can possibly help to avoid those issues right at the stage of writing the code. This part is about choosing a suitable object for locking.

Dziel się z innymi:
[EN] Avoid multithreading traps with Roslyn: Lock object selection · Cezary Piątek Blog

Sztuka programowania 601 dni, 11 godzin, 52 minuty temu cezarypiatek 59 źrodło rozwiń

How to avoid common mocking issues and save a lot of typing with the help of Roslyn.

[EN] Effective mocking · Cezary Piątek Blog

Narzędzia 620 dni, 13 godzin temu cezarypiatek 162 źrodło rozwiń

Over a year ago I wrote a blog post about designing exceptions. I found this article very useful by myself and I used it as a reference a few times during code review. However, it’s almost impossible to expect that, after reading the recommended resource, anybody would start to apply described rules immediately and remember about them all the time.

Dziel się z innymi:
[EN] Exception usage analyzer · Cezary Piątek Blog

Sztuka programowania 650 dni, 12 godzin, 15 minut temu cezarypiatek 86 źrodło rozwiń

When we started PlatformX project, we were using full .NET Framework. Then we migrated to .NET Core. Despite many advantages this migration meant a problem with using Roslyn. This problem is called MsBuildWorkspace...

Tagi: roslyn
Dziel się z innymi:
How to use Roslyn with .NET Core | Michał Komorowski

A few weeks ago I posted about negative aspects of applying AutoMapper. As an alternative I suggested typing all mapping code by hand or utilize some kind of generator like T4Scaffoling or something Roslyn based. In the past I experimented with T4Scaffoling but it was quite tedious. It requires preparation of templates in T4 syntax, referencing it to the project and writing some PowerShell code to provide data for templates. There also was an issue with assembly locking. Then I tried to generate code wit...

Dziel się z innymi:
[EN] Generate mapping code with Roslyn code fix provider. · CEZARY PIĄTEK

Narzędzia 1129 dni, 11 godzin, 59 minut temu cezarypiatek 65 źrodło rozwiń

A while ago 2 of my SpecFlow tests started failing on the build server. At the same time, on a few local machines no problems were observed. I also didn't find any exceptions in the log, so I decided to log into the server and debug a problem there. Quite soon I figured out that the problem is in the algorithm that uses Roslyn to analyse and understand the code...

Tagi: roslyn
Dziel się z innymi:
Roslyn rme again | Michał Komorowski

I can’t be the only person who hates waiting for the code to compile and run… Especially when I want to test only a small part of it! That’s a total waste of time! But good news everyone, I found a way to run a part of my C# code without building the whole project!Ctrl + E, E – the magical shortcut!

Dziel się z innymi:
Ctrl + E, E – the best Visual Studio shortcut I’ve seen so far! – A Girl Among Geeks

Inne 1394 dni, 21 godzin, 7 minut temu AGirlAmongGeeks 401 źrodło rozwiń

My last 2 posts were about problems with using Roslyn. Nonetheless, even if I sometime hate it, I'm still using it so the time has come to show some practical example of using Roslyn. Recently, I've been working on the task that can be summed up as: Take this ugly code and do something with it. i.e. more or less the refactoring task...

Tagi: roslyn
Dziel się z innymi:
How I removed 50% of the code | Michał Komorowski

In my previous post I wrote about my problem with "empty" projects and Roslyn. The symptom was that in some cases according to Roslyn my C# projects didn't contain any files. For quite a long time, I haven't been able to find a solution. Especially because I couldn't reproduce problem on my local machine. Fortunately, today I noticed exactly the same problem on another computer.

Tagi: roslyn
Dziel się z innymi:
Why I hate Roslyn even more | Michał Komorowski

Recently at work I’ve been looking into migrating our projects from VS2013 to VS2017. As part of the process we decided to move from C# 5.0 to C# 7.0. It turned out that after the switch some of our projects won’t build anymore. I spent some time investigating the issue and found the outcome interesting so let me share my story with you.

Tagi: C# 6.0, roslyn
Dziel się z innymi:
Method overload resolution in C# 6.0: an interesting bug story

Sztuka programowania 1459 dni, 11 godzin, 33 minuty temu miloszpiechocki 65 źrodło rozwiń

The more I work with Roslyn the more I appreciate the possibilities it gives and the more I hate it. And I hate it for the same thing as many other projects I worked with in the past. What is it? Well, I like when a system fails fast, fails loudly and fails in the clear way. Unfortunately, Roslyn can do something completely different what sometimes makes working with it the pain in ass. I'll give you some examples.

Tagi: roslyn
Dziel się z innymi:
Why I hate Roslyn | Michał Komorowski

This post from Report from the battlefield series will be about my own mistake. It is related to async/await and MARS i.e. Multiple Active Result Sets. async/await allows us to use asynchronous programming more easily. MARS is a feature of MSSQL that allows us to have more than one pending request opened per connection at the same time...

Dziel się z innymi:
Report from the battlefield #9 - async/await + MARS | Michał Komorowski
1 2


(32 895,6)
(32 816,53)
(27 178,29)
(21 178,88)
(20 336,33)
(13 018,14)
(10 531,65)
(9 775,28)
(8 791,31)
(6 837,96)
(6 214,22)
(5 393,84)
(4 157,41)
(4 026,73)
(3 908,07)
(3 599,64)
(3 448,35)
(3 318,39)
(3 224,66)
(3 221,45)