dotnetomaniak.pl - Artykuły z tagiem roslyn

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 15 dni, 2 godziny, 37 minut temu cezarypiatek 59 ź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 134 dni, 3 godziny, 42 minuty 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 216 dni, 1 godzinę, 31 minut 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 225 dni, 1 godzinę, 46 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 330 dni, 1 godzinę, 53 minuty 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 407 dni, 3 godziny, 23 minuty 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 421 dni, 3 godziny, 34 minuty temu cezarypiatek 70 ź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 435 dni, 2 godziny, 20 minut 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 454 dni, 3 godziny, 28 minut 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 484 dni, 2 godziny, 43 minuty 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 963 dni, 2 godziny, 27 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 1228 dni, 11 godzin, 35 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 1293 dni, 2 godziny, 1 minutę 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

I'm working on the project where I have an opportunity to use Roslyn compiler as a service. It is very good :) However yesterday it took me more than 2 hours to write working unit tests (based on MSTest) for my code! Here are some tips that may save your time.

Dziel się z innymi:
Roslyn and unit tests suck | Michał Komorowski
1 2

Najaktywniejsi

1
(32 895,6)
2
(32 816,53)
3
(27 178,29)
4
(21 178,88)
5
(20 336,33)
6
(13 018,14)
7
(10 516,6)
8
(9 775,28)
9
(8 478,28)
10
(6 837,96)
11
(6 214,22)
12
(5 393,84)
13
(4 157,41)
14
(4 026,73)
15
(3 908,07)
16
(3 599,64)
17
(3 448,35)
18
(3 318,39)
19
(3 224,66)
20
(3 206,43)