Pull to refresh
48.79

Development for Windows *

Developing for Microsoft OSs

Show first
Rating limit
Level of difficulty

Checking the .NET Core Libraries Source Code by the PVS-Studio Static Analyzer

Reading time59 min
Views1.7K

Picture 19

.NET Core libraries is one of the most popular C# projects on GitHub. It's hardly a surprise, since it's widely known and used. Owing to this, an attempt to reveal the dark corners of the source code is becoming more captivating. So this is what we'll try to do with the help of the PVS-Studio static analyzer. What do you think – will we eventually find something interesting?
Read more →
Total votes 28: ↑25 and ↓3+22
Comments1

The story of how PVS-Studio found an error in the library used in… PVS-Studio

Reading time3 min
Views1.2K

Picture 1

This is a short story about how PVS-Studio helped us find an error in the source code of the library used in PVS-Studio. And it was not a theoretical error but an actual one — the error appeared in practice when using the library in the analyzer.
Read more →
Total votes 27: ↑24 and ↓3+21
Comments0

WinForms: Errors, Holmes

Reading time17 min
Views1K

Picture 5

We like to search for errors in Microsoft projects. Why? It's simple: their projects are usually easy to check (you can work in Visual Studio environment for which PVS-Studio has a convenient plugin) and they contain few errors. That's why the usual work algorithm is as follows: find and download an open source project from MS; check it; choose interesting errors; make sure there are few of them; write an article without forgetting to praise the developers. Great! Win-win-win: it took a little time, the bosses are glad to see new materials in the blog, and karma is fine. But this time «something went wrong». Let's see what we have found in the source code of Windows Forms and whether we should speak highly of Microsoft this time.
Read more →
Total votes 28: ↑26 and ↓2+24
Comments0

Saving Routing State to the Disk in a Cross-Platform .NET Core GUI App with ReactiveUI and Avalonia

Reading time17 min
Views7K

image


User interfaces of modern enterprise applications are quite complex. You, as a developer, often need to implement in-app navigation, validate user input, show or hide screens based on user preferences. For better UX, your app should be capable of saving state to the disk when the app is suspending and of restoring state when the app is resuming.


ReactiveUI provides facilities allowing you to persist application state by serializing the view model tree when the app is shutting down or suspending. Suspension events vary per platform. ReactiveUI uses the Exit event for WPF, ActivityPaused for Xamarin.Android, DidEnterBackground for Xamarin.iOS, OnLaunched for UWP.


In this tutorial we are going to build a sample application which demonstrates the use of the ReactiveUI Suspension feature with Avalonia — a cross-platform .NET Core XAML-based GUI framework. You are expected to be familiar with the MVVM pattern and with reactive extensions before reading this note. Steps described in the tutorial should work if you are using Windows 10 or Ubuntu 18 and have .NET Core SDK installed. Let's get started! Source code of the app described in this tutorial is available on GitHub.

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

Take your Linux development experience in Windows to the next level with WSL and Visual Studio Code Remote

Reading time2 min
Views2K
Using VS Code Remote and the Windows Subsystem for Linux (WSL) gives you a fully featured Linux development environment on a Windows laptop or desktop. Let’s look at how using these tools will completely change how you develop with Linux tools in Windows.

image
Total votes 12: ↑10 and ↓2+8
Comments0

Evolution of every developer's most popular tool (in Visual Studio)

Reading time2 min
Views9.1K
Every development environment has a tool called «Output». There is no need to describe what it does, since all developers without exception use it in their work on a daily basis. It is simple and conservative. 

It has remained essentially unchanged for decades, and to this day looks something like this:


Text, text, and more text. Lots of text...

Even in this tiny example the line containing the error is not immediately apparent. Finding it takes time and effort. Simply because one has to read through the text and search for the words «error», «exception» or «warning». The programmer has to search, and the client has to pay for the time spent searching.
Read more →
Total votes 11: ↑9 and ↓2+7
Comments2

PVS-Studio for Visual Studio

Reading time10 min
Views1.1K


Many of our articles are focused on anything, but not the PVS-Studio tool itself. Whereas we do a lot to make its usage convenient for developers. Nevertheless, our efforts are often concealed behind the scenes. I decided to remedy this situation and tell you about the PVS-Studio plugin for Visual Studio. If you use Visual Studio, this article is for you.
Read more →
Total votes 18: ↑18 and ↓0+18
Comments0

The dangers of using multi-character constants

Reading time2 min
Views1.3K

Picture 1

During code analysis, PVS-Studio analyzes the data flow and operates variable values. Values are taken from constants or derived from conditional expressions. We call them virtual values. Recently, we have refined them in order to work with multi-character constants and this has become the reason to create a new diagnostic rule.

Introduction


Multi-character-literals are implementation-defined, so different compilers can encode them in different ways. For example, GCC and Clang set a value, based on the order of the symbols in the literal, while MSVC moves them depending on the symbol's type (regular or escape).
Read more →
Total votes 16: ↑15 and ↓1+14
Comments0

WSL 2 is now available in Windows Insiders

Reading time3 min
Views4.1K

We’re excited to announce starting today you can try the Windows Subsystem for Linux 2 by installing Windows build 18917 in the Insider Fast ring! In this blog post we’ll cover how to get started, the new wsl.exe commands, and some important tips. Full documentation about WSL 2 is available on our docs page.


Read more →
Total votes 19: ↑18 and ↓1+17
Comments1

Who put Python in the Windows 10 May 2019 Update?

Reading time3 min
Views1.8K

Some days ago the Windows team announced the May 2019 Update for Windows 10. In this post we’re going to look at what we, the Python team, have done to make Python easier to install on Windows by helping the community publish to the Microsoft Store and, in collaboration with Windows, adding a default “python.exe” command to help find it. You may have already heard about these on the Python Bytes podcast, at PyCon US, or through Twitter.


The header of the Python 3.7 page in the Microsoft Store
Read more →
Total votes 10: ↑9 and ↓1+8
Comments0

Nullable Reference types in C# 8.0 and static analysis

Reading time12 min
Views3.6K

Picture 9


It's not a secret that Microsoft has been working on the 8-th version of C# language for quite a while. The new language version (C# 8.0) is already available in the recent release of Visual Studio 2019, but it's still in beta. This new version is going to have a few features implemented in a somewhat non-obvious, or rather unexpected, way. Nullable Reference types are one of them. This feature is announced as a means to fight Null Reference Exceptions (NRE).
Read more →
Total votes 19: ↑18 and ↓1+17
Comments1

Support of Visual Studio 2019 in PVS-Studio

Reading time19 min
Views1K


Support of Visual Studio 2019 in PVS-Studio affected a number of components: the plugin itself, the command-line analyzer, the cores of the C++ and C# analyzers, and a few utilities. In this article, I will briefly explain what problems we encountered when implementing support of the IDE and how we addressed them.
Read more →
Total votes 31: ↑30 and ↓1+29
Comments0

DynamicData: Dynamic Collections, the MVVM Architecture, and Reactive Extensions

Reading time10 min
Views17K


February 2019 marked the release of ReactiveUI 9 — the cross-platform framework for building GUI applications on the Microsoft .NET platform. ReactiveUI is a tool for tight integration of reactive extensions with the MVVM design pattern. You could familiarize yourself with the framework via a series of videos or the welcome page of the documentation. The ReactiveUI 9 update includes numerous fixes and improvements, but probably the most crucial and interesting one is integration with the DynamicData framework, allowing you to work with dynamic collections in Reactive fashion. Let’s find out what we can use DynamicData for and how this powerful reactive framework works under the hood!

Read more →
Total votes 14: ↑12 and ↓2+10
Comments2

Windows Terminal Build 2019 FAQ

Reading time3 min
Views1.8K

Last week, Microsoft held its Build 2019 conference at the Washington State Convention Center in Seattle. Build is a large event with several thousand people from around the world attending to learn all about the current, newest, and future developer-oriented tech coming from Microsoft.


We had the pleasure of meeting so many of you at our booth and answering all your questions!


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

Introducing Windows Terminal

Reading time4 min
Views3.2K

We are beyond excited to announce Windows Terminal! Windows Terminal is a new, modern, fast, efficient, powerful, and productive terminal application for users of command-line tools and shells like Command Prompt, PowerShell, and WSL.



Windows Terminal will be delivered via the Microsoft Store in Windows 10 and will be updated regularly, ensuring you are always up to date and able to enjoy the newest features and latest improvements with minimum effort.


Read more →
Total votes 15: ↑14 and ↓1+13
Comments0

Windows Virtual Desktop now in public preview on Azure

Reading time1 min
Views1.3K

We recently shared the public preview of the Windows Virtual Desktop service on Azure. Now customers can access the only service that delivers simplified management, multi-session Windows 10, optimizations for Office 365 ProPlus, and support for Windows Server Remote Desktop Services (RDS) desktops and apps. With Windows Virtual Desktop, you can deploy and scale your Windows desktops and apps on Azure in minutes, while enjoying built-in security and compliance.


Image of women on her desktop in the workplace

Read more →
Total votes 11: ↑10 and ↓1+9
Comments0

Authors' contribution