Pull to refresh
6.48

Visual Studio *

Integrated development environment (IDE) from Microsoft

Show first
Rating limit
Level of difficulty

Azure PowerShell: Mostly Harmless

Reading time17 min
Views803

Picture 6

Hello, everyone. Today we have another Microsoft project on the check. By the title of this article, you can guess that this time developers didn't «please» us with a large number of errors. We hope the project's authors won't be offended by the title. After all, a small number of errors is great, isn't it? However, we still managed to find something intriguing in the Azure PowerShell code. We suggest getting to know the features of this project and checking out errors, found using the PVS-Studio C# analyzer.
Read more →
Total votes 27: ↑27 and ↓0+27
Comments0

The best is the enemy of the good

Reading time11 min
Views1.2K

Picture 6

This article is the story how we once decided to improve our internal SelfTester tool that we apply to test the quality of the PVS-Studio analyzer. The improvement was simple and seemed to be useful, but got us into some troubles. Later it turned out that we'd better gave up the idea.
Read more →
Total votes 43: ↑41 and ↓2+39
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

Checklist for writing great Visual Studio extensions

Reading time3 min
Views1K
Great Visual Studio extensions share a few key features that sets them apart from the rest. They look and feel well crafted, are performant and reliable, do what they advertise to perfection, and blend in naturally among Visual Studio’s own features.

To make it easier to write great extensions, we’ve worked with the extensibility community to come up with a simple checklist to follow. There’s even a GitHub issue template you can use so you remember to go through the checklist.

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

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

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

Improvements to Visual Studio App Center Distribution

Reading time2 min
Views1K

Here at Visual Studio App Center, we try to incorporate customer obsession in our day to day. Earlier this year we started an effort for widespread customer outreach to understand our users and guide product prioritization. The effort helped us gain a lot of insight and helped our prioritization last quarter. However, as we continue to grow, we unfortunately don’t have the capacity to reach out to as many customers as we would like.


To continue to engage with as many customers are possible, we created a GitHub repo specifically for this purpose. We’ve been using the repo to track monthly iterations from the team, feature requests, and community interest for certain features. We are making changes to align our priorities for the upcoming quarters based on what our customers are requesting.


I wanted to highlight some of the changes we’ve made to the Distribution service based off what we learned from customer outreach and feedback. All of these changes are available now:


  • Distributing releases to multiple destinations
  • Distribution releases to individual testers
  • Turning off email notification for releases
  • Disabling a release
  • Make releases sortable

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

New features for extension authors in Visual Studio 2019 version 16.1

Reading time3 min
Views1.8K

Earlier this week, we released Visual Studio 2019 version 16.1 Preview 1 (see release notes). It’s the first preview of the first update to Visual Studio 2019. If you’re not already set up to get preview releases, then please do that now. The preview channel installs side-by-side with the release channel and they don’t interfere with each other. I highly recommend all extension authors install the preview.




Got the 16.1 preview installed now then? That’s great. Here are some features in it you might find interesting.

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

Web and Azure Tool Updates in Visual Studio 2019

Reading time2 min
Views875

Hopefully by now you’ve seen that Visual Studio 2019 is now generally available. As you would expect, we’ve added improvements for web and Azure development. As a starting point, Visual Studio 2019 comes with a new experience for getting started with your code and we updated the experience for creating ASP.NET and ASP.NET Core projects to match:



If you are publishing your application to Azure, you can now configure Azure App Service to use Azure Storage and Azure SQL Database instances, right from the publish profile summary page, without leaving Visual Studio. This means that for any existing web application running in App Service, you can add SQL and Storage, it is no longer limited to creation time only.

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

Visual Studio 2019 .NET productivity

Reading time2 min
Views1.7K

Your friendly neighborhood .NET productivity team (aka. Roslyn) focuses a lot on improving the .NET coding experience. Sometimes it’s the little refactorings and code fixes that really improve your workflow. You may have seen many improvements in the previews, but for all of you who were eagerly awaiting the GA release here’s a few features you may enjoy!


Read more →
Total votes 11: ↑11 and ↓0+11
Comments1

Checking the Roslyn Source Code

Reading time21 min
Views1.6K
PVS-Studio vs Roslyn

Once in a while we go back to the projects that we have previously checked using PVS-Studio, which results in their descriptions in various articles. Two reasons make these comebacks exciting for us. Firstly, the opportunity to assess the progress of our analyzer. Secondly, monitoring the feedback of the project's authors to our article and the report of errors, which we usually provide them with. Of course, errors can be corrected without our participation. However, it is always nice when our efforts help to make a project better. Roslyn was no exception. The previous article about this project check dates back to December 23, 2015. It's quite a long time, in the view of the progress that our analyzer has made since that time. Since the C# core of the PVS-Studio analyzer is based on Roslyn, it gives us additional interest in this project. As a result, we're as keen as mustard about the code quality of this project. Now let's test it once again and find out some new and interesting issues (but let's hope that nothing significant) that PVS-Studio will be able to find.
Read more →
Total votes 34: ↑34 and ↓0+34
Comments0

How the CSS markup fragment broke the C++ compiler

Reading time2 min
Views1.8K

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
Comments1

Counting Bugs in Windows Calculator

Reading time11 min
Views42K

A few days ago, Microsoft made the source code of their Windows Calculator publicly available. Calculator is an application that has traditionally shipped with every Windows version. A number of Microsoft projects went open-source over the recent years, but this time the news was covered even by non-IT media on the very first day. Well, it's a popular yet tiny program in C++. Despite its size, we still managed to find a number of suspicious fragments in its code using the PVS-Studio static analyzer.
Read more →
Total votes 44: ↑41 and ↓3+38
Comments2

C++ Binary Compatibility and Pain-Free Upgrades to Visual Studio 2019

Reading time4 min
Views3.6K

Visual Studio 2019 pushes the boundaries of individual and team productivity. We hope that you will find these new capabilities compelling and start your upgrade to Visual Studio 2019 soon.


As you are considering this upgrade, rest assured that Visual Studio 2019 makes it distinctively easy to move your codebase from previous versions of Visual Studio. This post captures the reasons why your upgrade to Visual Studio 2019 will be pain-free.


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

Authors' contribution