- Artykuły z tagiem roslyn

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 20 dni, 14 godzin, 27 minut temu cezarypiatek 49 ź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 102 dni, 12 godzin, 16 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 111 dni, 12 godzin, 31 minut temu cezarypiatek 87 ź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 216 dni, 12 godzin, 39 minut temu cezarypiatek 96 ź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 293 dni, 14 godzin, 8 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 307 dni, 14 godzin, 19 minut 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 321 dni, 13 godzin, 5 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 340 dni, 14 godzin, 14 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 370 dni, 13 godzin, 28 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 849 dni, 13 godzin, 12 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 1114 dni, 22 godziny, 20 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 1179 dni, 12 godzin, 46 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

Semantyczny model dostarcza nam wiele informacji o kodzie, które zwykle uzyskuje się po kompilacji. Na przykład przeładowanie metod jest dużo łatwiejsze do określenia już po kompilacji.  Oznacza to, że nie jest już to  klasyczna, statyczna analiza kodu. Z tego względu, najpierw danych kod należy skompilować za pomocą...

Tagi: .Net, C#, roslyn
Dziel się z innymi:
Roslyn: Analiza przepływu danych–semantyczny model

Narzędzia 1810 dni, 13 godzin, 44 minuty temu rroszczyk 127 źrodło rozwiń

1 2


(32 895,6)
(32 816,53)
(27 178,29)
(21 178,88)
(20 336,33)
(13 018,14)
(10 512,47)
(9 775,28)
(8 388,28)
(6 822,96)
(6 214,22)
(5 393,84)
(4 127,41)
(4 026,73)
(3 908,07)
(3 599,64)
(3 448,35)
(3 318,39)
(3 224,66)
(3 173,43)