Pull to refresh
75.67

.NET *

A hub about .NET

Show first
Rating limit
Level of difficulty

Structured Logging and Interpolated Strings in C# 10

Level of difficultyMedium
Reading time10 min
Views44K

Structured logging is gaining more and more popularity in the developers' community. In this article I'd like to demonstrate how we can use structured logging with the Microsoft.Extensions.Logging package and show the idea how we can extend it using the new features of C# 10.

Read more
Total votes 6: ↑6 and ↓0+6
Comments0

PVS-Studio checks the code quality in the .NET Foundation projects: LINQ to DB

Reading time11 min
Views591

The .NET Foundation is an independent organization, created by Microsoft, to support open-source projects around the DotNet platform. Currently, the organization gathered many libraries under its wing. We have already tested some of these libraries with the help of PVS-Studio. The next project to check with the analyzer - LINQ to DB.

Read more
Rating0
Comments0

OWASP Top Ten and Software Composition Analysis (SCA)

Reading time9 min
Views1.3K

The OWASP Top Ten 2017 category A9 (which became A6 in OWASP Top Ten 2021) is dedicated to using components with known vulnerabilities. To cover this category in PVS-Studio, developers have to turn the analyzer into a full SCA solution. How will the analyzer look for vulnerabilities in the components used? What is SCA? Let's try to find the answers in this article!

Read more
Rating0
Comments0

Creating Roslyn API-based static analyzer for C#

Reading time23 min
Views5.2K

After you read this article, you'll have the knowledge to create your own static analyzer for C#. With the help of the analyzer, you can find potential errors and vulnerabilities in the source code of your own and other projects. Are you intrigued? Well, let's get started.

Read more
Total votes 2: ↑1 and ↓10
Comments0

How Visual Studio 2022 ate up 100 GB of memory and what XML bombs had to do with it

Reading time7 min
Views3K

0865_VS2022_XMLBomb/image1.png


In April 2021 Microsoft announced a new version of its IDE – Visual Studio 2022 – while also announcing that the IDE would be 64-bit. We've been waiting for this for so long – no more 4 GB memory limitations! However, as it turned out, it's not all that simple...

Read more →
Total votes 2: ↑2 and ↓0+2
Comments0

XSS: attack, defense — and C# programming

Reading time11 min
Views2.4K

XSS - or cross-site scripting - is one of the most common vulnerabilities in web applications. It has been on the OWASP Top 10 list (the list of the most critical security risks to web applications) for a while now. So let's figure out together how your browser can acquire and execute a script from a third-party website, and what this may lead to (spoiler: your cookies could get stolen, for example). And while we're at it, we'll talk about ways you can protect yourself from XSS.

Read more
Total votes 1: ↑1 and ↓0+1
Comments0

Tutorial: how to port a project from Interop Word API to Open XML SDK

Reading time14 min
Views2.6K

With the .NET5 release further development of some projects was questionable due to the complexity of porting. One can abandon small outdated libraries or find a replacement. But it's hard to throw away Microsoft.Office.Interop.Word.dll. Microsoft doesn't plan to add compatibility with .NET Core/5+, so in this article we focus on creating Word files with Open XML SDK.

Read more
Total votes 2: ↑1 and ↓1+2
Comments0

Is PHP compilable?! PVS-Studio searches for errors in PeachPie

Reading time22 min
Views700

PHP is widely known as an interpreted programming language used mainly for website development. However, few people know that PHP also has a compiler to .NET – PeachPie. But how well is it made? Will the static analyzer be able to find actual bugs in this compiler? Let's find out!

Read more
Total votes 2: ↑2 and ↓0+2
Comments0

Optimization of .NET applications: a big result of small edits

Reading time17 min
Views1.9K

0852_NETAppsPerf_MinChangesMajorRes/image1.png


Today we're going to discuss how small optimizations in the right places of the application can improve its performance. Imagine: we remove the creation of an extra iterator in one place, get rid of boxing in the other. As a result, we get drastic improvements because of such small edits.

Read more →
Total votes 4: ↑2 and ↓2+2
Comments0

AngouriMath 1.3 update

Reading time5 min
Views4.3K

Four months of awesome work together with a few new contributors finally result in a new major release, which I'm happy to announce about.

Now we get completely new matrices, improved parser, a lot of new functions, almost rewritten interactive package (for working in Jupyter) and many more.

This article about a big update in a FOSS symbolic algebra library for .NET, I hope it may be interesting for someone!

Read more
Total votes 5: ↑5 and ↓0+5
Comments0

Creating a NuGet package for a library with platform-specific API

Level of difficultyMedium
Reading time13 min
Views9.4K

When creating a .NET library with a partially platform-specific API, we should think about how to pack it into a NuGet package so that the installed library will work in various scenarios (.NET Framework, .NET Core, self-contained application and so on). Unfortunately, it is difficult to find a step-by-step instruction on the web that describes how to perform this task. This article is intended to be such an instruction.

Read more
Total votes 1: ↑1 and ↓0+1
Comments0

How to be good in hackathons as a developer? Practice creating simple pet projects

Reading time6 min
Views3.4K

Hackathons could be very intimidating and stressful. The key to getting better is doing simple projects. In this article, we will look at an example of a web app that can be used for sharpening your skills when you prepare for a hackathon. We will use a powerful Google API based on Machine Learning and apply the following technologies: ASP.NET, HTML, Docker, Heroku, and Git.

Read more
Total votes 5: ↑5 and ↓0+5
Comments1

Authors' contribution