Pull to refresh
87.12
Rating

Development for Windows *

Developing for Microsoft OSs

Show first
Rating limit

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

PVS-Studio corporate blog Open source *.NET *C# *Development for Windows *

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
Views 1K
Comments 0

WinForms: Errors, Holmes

PVS-Studio corporate blog .NET *Visual Studio *C# *Development for Windows *

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
Views 936
Comments 0

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

Programming *.NET *C# *Development for Linux *Development for Windows *
Translation
Tutorial

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!

Read more →
Total votes 16: ↑16 and ↓0 +16
Views 4K
Comments 0

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

Microsoft corporate blog Python *Visual Studio *Development for Linux *Development for Windows *
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
Views 1.6K
Comments 1

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

Programming *Visual Studio *Debugging *Development for Windows *
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
Views 8.6K
Comments 2

PVS-Studio for Visual Studio

PVS-Studio corporate blog C++ *Visual Studio *C# *Development for Windows *


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
Views 924
Comments 1

The dangers of using multi-character constants

PVS-Studio corporate blog C++ *Visual Studio *Development for Windows *

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
Views 1.2K
Comments 0

WSL 2 is now available in Windows Insiders

Microsoft corporate blog Configuring Linux *Development for Linux *Development for Windows *

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
Views 3.7K
Comments 1

Who put Python in the Windows 10 May 2019 Update?

Microsoft corporate blog Python *Programming *Development for Windows *

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
Views 1.6K
Comments 0

Nullable Reference types in C# 8.0 and static analysis

PVS-Studio corporate blog .NET *Visual Studio *C# *Development for Windows *

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
Views 3.4K
Comments 1

Support of Visual Studio 2019 in PVS-Studio

PVS-Studio corporate blog .NET *Visual Studio *C# *Development for Windows *


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
Views 891
Comments 0

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

Programming *.NET *C# *Development for Windows *
Translation


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
Views 13K
Comments 2

Windows Terminal Build 2019 FAQ

Microsoft corporate blog PowerShell *Development for Windows *

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
Views 1.6K
Comments 0

Introducing Windows Terminal

Microsoft corporate blog PowerShell *Development for Windows *

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
Views 2.7K
Comments 0

.NET Core Workers as Windows Services

Microsoft corporate blog .NET *Visual Studio *Development for Windows *
In .NET Core 3.0 we are introducing a new type of application template called Worker Service. This template is intended to give you a starting point for writing long running services in .NET Core. In this walkthrough we will create a worker and run it as a Windows Service.

Read more →
Total votes 8: ↑7 and ↓1 +6
Views 9.9K
Comments 0

Windows Virtual Desktop now in public preview on Azure

Microsoft corporate blog Microsoft Azure *Development for Windows *Cloud services *

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
Views 1.1K
Comments 0

How the CSS markup fragment broke the C++ compiler

PVS-Studio corporate blog C++ *Visual Studio *C *Development for Windows *

Picture 1

Static analysis methodology involves various technologies. One of them is preprocessing files right before analyzing them. Preprocessed files are created by the compiler that runs in a special working mode. Unfortunately, our long-standing experience of developing a static analyzer shows that this mode is not great for testing. In this note, I'll give the example of a fresh bug in the C++ compiler from Microsoft.
Read more →
Total votes 29: ↑28 and ↓1 +27
Views 1.6K
Comments 1

Authors' contribution