Quantcast
Channel: dotPeek : .NET Tools | The JetBrains Blog
Viewing all 221 articles
Browse latest View live

.NET Annotated Monthly | July 2020

$
0
0

July brought some special events to computing history. IBM announced the Model 650 Computer in 1953. In 1968 Intel was officially founded – and since, IBM has been using Intel chips in their personal computers. Computing history would be much different, and probably a lot less useful without chips from Intel or influence from IBM. Fun fact: Gordon Moore, one of the founders of Intel is responsible for Moore’s Law.

.NET Annotated Monthly newsletter by JetBrains!

.NET news

.NET tutorials and tips

What is Entity Framework in ASP.NET MVC – Asma Khalid demonstrates the what and how of ASP.NET MVC.

Visualizing ASP.NET Core endpoints using GraphvizOnline and the DOT language – This is an excellent and quite useful post by Andrew Lock showing how to visualize ASP.NET Core endpoints.

Learn how you manage routing in Blazor for .NET Core and VS Code – Check out this nice post by Chris Noring, showing you how to manage routing in Blazor.

Remote debugging Windows containers with Rider – Joost Meijles dives into debugging Windows containers, with Rider!

Dynamically Build LINQ Expressions – Jeremy Likness’ post on dynamically building LINQ Expressions will prove to be quite useful. It’s the kind of thing that many developers need to do, but have difficulty implementing.

Run Azurite in Docker with Rider and keep Azure Storage data local to a solution – Have you seen Azurite yet? How about running it in Docker? Let Maarten Balliauw show you!

Parse Markdown Front Matter With C# – Markdown! It’s a favorite way to whip up docs quickly. So this post by Khalid Abuhakmeh details how to parse it in C#.

Elastic Jobs in Azure SQL Database (2 Part series) – SQL is an important part of .NET development. Start with Part 1 by Anna Hoffman & Marisa Brasile and learn everything you need to know about Elastic Jobs in Azure SQL Databases.

On simplifying null validation with C# 9 – Everyone wants to make things like null check simpler. This post by Dave Brock shows you how.

5 useful Xamarin Forms Snippets – They are useful! Check out these Xamarin Forms snippets by Damien Doumer.

ASP.NET Core MVC API: How to Perform a Partial Update using HTTP PATCH Verb – This is valuable information for those times when you need to do something different, such as a partial update in a CRUD app. David Grace gives us the knowledge to get that done in this post.

Deploying ASP.NET Core Web Applications to Docker – Shipping is a feature! Bjoern Meyer writes about how to do it with Docker.

It’s all in the Host Class: Dependency Injection with .NET (Part 1) and Configuration (Part 2) – Christian Nagel reveals everything you need to know in this 2 Part series about the Host Class in .NET.

3+1 ways to manage state in your Blazor application – We strive for stateless apps but we also need to store data for each session. John Hilton shows us how to manage it in Blazor.

XML + JSON Output for Web APIs in ASP .NET Core 3.1 – Shahed Chowdhuri strikes again, with this excellent post on XML + JSON output for Web APIs.

Unraveling the Azure Maya Mystery and building a world – Ok, it’s not .NET per se, but Jen Looper has created this fun Azure Maya Mystery using Azure and Vue.JS. It’s great so check it out!

Integration of Azure Data Explorer with Cosmos DB for near real-time analytics – Azure Data Explorer and CosmosDB are now important facets if .NET development in the cloud. Let Minni Walia show you how to run near real-time analytics for it.

Events, community and culture

Struggling To Focus? How To Be Accountable While Working Remotely – Emily Whitten demonstrates how to do remote work well.

Dismantling barriers to participation in programming communities with Dr. Denae Ford – The software development industry has long been plagued by gatekeeping and unwelcoming communities. In this podcast, Scott Hanselman talks to Dr. Denae Ford about how to involve more folks by dismantling the barriers.

Does A 4-Day Workweek Actually Increase Productivity? – Well, does it? Microsoft Japan and other companies are trying it. In this blog post, Suzanne Zuppello has some thoughts about it. What do you think?

Random interesting and cool stuff

Contribute To The Top 10 Impactful .NET OSS Projects 2020 – Folks are always looking for OSS projects. Whether you’re new to OSS or an OSS pro, here are the top 10 impactful projects you might consider contributing to.

The ASP.NET Monsters [Dave Paquette, Simon Timms, James Chambers] .NET podcast. – These guys are fun and knowledgeable, and it’s definitely worth it to listen to their podcast.

And finally…

Here’s a chance to catch up on JetBrains news that you might have missed:

Check out this fantastic offer! CODE Magazine is offering a free subscription to JetBrains customers!

If you have any interesting or useful .NET or general programming news to share via .NET Annotated Monthly, leave a comment here, email me at rachel.appel@jetbrains.com, or drop me a message via Twitter.

Subscribe to .NET Annotated!


Getting Started with Rider for Unreal Engine

$
0
0

Getting started with Rider for Unreal Engine is quick and easy. This video will take you through the initial steps, getting the app installed once you’ve registered and installed, and setting Rider as the default source code editor for Unreal. You’ll be introduced to the two main keyboard shortcuts that are the entry points to Rider’s advanced feature set, and see what Unreal plugins are required to get the most out of Rider, such as integrating Rider with Unreal Blueprints. Register to download your copy at jb.gg/unreal.

JOIN THE EARLY PREVIEW

Your Rider team
JetBrains
The Drive to Develop

Case Study – How MRstudios Uses Rider

$
0
0

MRstudios - Industrial VR/AR solutions - Uses JetBrains RiderToday, we would like to share with you how MRstudios is using JetBrains Rider. They have a team of software developers, visual effects artists and 3D artists, working together to develop real-time 3D applications for the manufacturing industry.

We spoke with Thomas Weiss, Technical Director and Co-Founder of MRstudios.

Hi Thomas! Can you tell us a little more about yourself and MRstudios?

I am the Technical Director and Co-Founder of MRstudios, a company I established with my friend Morten in Berlin in March 2016. In 2017, we incorporated the company in Prague. I have a Master’s degree in Computational Visualistics and 10+ years of experience in the fields of offline and real-time rendering.

MRstudios specializes in the development of real-time 3D applications for the manufacturing industry. We are proud to be considered one of the market leaders in Industrial Virtual and Augmented Reality solutions in German-speaking and Nordic markets.

What size is your team at MRstudios, and how large is the company?

Today, our team consists of more than 10 people, including software developers, programmers, visual effects artists, 3D artists, and a strong business development and operations team.

What is your current technology stack, and what types of projects do you work on?

We mainly work with game development tools such as 3ds Max, Blender, Photoshop, Quixel, Substance Painter, Git, and Unity. We use these tools to create interactive 3D experiences such as Virtual, Augmented, and Mixed Reality software applications – engineered from concept to completion, as we like to say.

This means that we cover the entire value chain, supporting clients all the way from the very early brainstorming stages through to rolling out a VR/AR strategy in corporations with thousands of staff members globally.

Our projects are usually targeted at technical training, sales and marketing, and product development. We are also increasingly supporting clients with highly complex systems, such as linking Unity-based software with enterprise cloud systems. The goal is always the same: speaking the language of our clients and making their life as easy as possible by adding to their existing channels and software architecture.

MRstudios - HVAC products

Are all your developers on the same operating system?

No, our developers are completely free to use whatever operating system they like the most. We don’t force them to use a strict framework. If someone doesn’t like Windows, which can happen, why can’t they use Linux? The same applies to Android or Apple devices.

Independent of the system applied, we have ISO27001 security protocols in place, which is highly valued by our industrial clients.

Why did you switch to Rider for your Unity development? How has it helped your team?

Using Visual Studio as an IDE in combination with Unity is better than using MonoDevelop, but a proper connection between the tools was still missing. The first time I heard of Rider was at Unite 2018 in Berlin. Back then I was very curious about it, but I wasn’t ready to switch from my existing development environment to something that I barely knew.

In the beginning of 2020, we had a lot of internal discussions on how to optimize and streamline our existing workflows as everyone was using different development tools such as Visual Studio, Visual Studio Code, Xcode, Sourcetree, and the like. This was the moment Rider was reintroduced.

Thanks to Rider, we now have a common tool that runs on all three major platforms, has a beautiful Git integration, and comes with perfect support for Unity. Since the introduction of Rider, the code quality and readability has significantly increased. Coding has never been this fast and easy as it is with Rider.

Did you face any issues switching from Visual Studio to Rider? What kind of experience did you have using a different tool?

Switching to Rider was flawless. Even commonly used shortcuts could be easily transferred. Switching your IDE is usually a very difficult process as it means you must adapt to a new user interface and a different environment.

You never know how Unity is going to react to a new IDE or whether you will encounter complications due to incompatibilities. We have discovered more and more tools within Rider that have helped us develop applications faster and in a more structured manner.

What does your typical development flow look like? How much time do you spend in Unity, and how much in Rider?

Given that we already have a 3D model that we can interact with, we start with the implementation of basic interactions like camera movements, animations of the model itself, and the like.

The user interface is developed during the 3D modeling phase, so optimally we can already start implementing it and making it interactable next to the implementation of the basic interactions. At this stage, client reviews are usually coming in and need to be implemented, so it is a back-and-forth between Unity and Rider depending on whether the changes affect the model or the interactions.

Toward the end, the development shifts to Rider, since the model and the visuals are already final. Implementing localization and backend connections is one of the last steps and Rider-only.

What do you think of the link between Rider and Unity?

My colleagues and I had never seen an IDE that could communicate with Unity in such a flawless and intuitive way. Code compilation in the background is a massive game changer. The usage information of methods and variables is very helpful. Code completion and automatic implementation of UnityEvents speeds up the whole workflow when working with the Unity EventSystem.

On top of all these features is the visually appealing integration of Git. Ultimately, well-developed code should be a feast for the eyes, too, shouldn’t it?

Has your coding style or architecture changed with better tooling support?

Definitely! Everyone comes from a different development background and has different methods for writing readable code. Rider tries to smooth out such differences by basically enforcing certain standards like naming conventions. Aside from this, it is the simple refactoring of if-statements, highlighting unused variables or methods, and the easy definition of namespaces.

We are to some extent a German company as both founders are from there, so we appreciate very well-structured coding environments. Rider supports this approach directly and indirectly, even if you have team members who tend to be, let’s say, a bit more liberal with their coding.

What are your favorite Rider features that help you on a daily basis?

In a nutshell:

Are you aware of our Early Access Preview versions, and do you use them?

No, but I would like to try them out.

Note from JetBrains: you can download and install the Early Access Previews of Rider, or use the Toolbox App and install stable Rider and EAP versions side by side.


We’d like to thank Thomas and MRstudios for taking part in this Q&A.

If you use JetBrains IDEs and would like to share your experience with us, please let us know by leaving a comment below or contacting us.

Create a Beautiful Mobile App With JetBrains Rider and Syncfusion Components

$
0
0

Wondering how to build a Xamarin mobile application with Rider? In this blog post, our friends from Syncfusion explain how to do it using Syncfusion Xamarin Components.

JetBrains Rider is a cross-platform IDE for consistent application development. Cross-platform is what most mobile developers are, targeting Android and iOS.

Syncfusion Xamarin components include over 145 essential controls, like DataGrid, Charts, and ListView, for building powerful line-of-business Xamarin applications.

In this post we’ll be using JetBrains Rider along with Syncfusion Xamarin components to develop a mobile application that will illustrate a bus seating layout in a ticket booking app. To develop this application, we’re going to use Syncfusion’s Maps control for Xamarin.

Creating a Xamarin project in Rider

Follow the below steps to create a Xamarin application in JetBrains Rider:

  1. Open the Rider IDE. When prompted with a few options, choose to create a New Solution.

  2. In the New Solution dialog, select Application under the Xamarin category. Choose Xamarin.Forms for the type, .NET Standard for the sharing strategy, and then provide a name for the solution. Here we are going to use SeatingLayoutApp as its name. Click Create to create the project and the solution.

Adding SfMaps to the app

Follow the below steps to add an SfMaps control to the Xamarin project:

  1. Right-click the Solution name in the Solution Explorer and choose Manage NuGet Packages.

  2. Search for Syncfusion.Xamarin.SfMaps NuGet, select the NuGet package, and install it in the three projects in the solution.

    If you face any issues installing the NuGet package, try to update the packages —such as Xamarin.Forms package v3.6.0.344457 or above and Android support libraries package v28.0.0.1 or above—before installing the Syncfusion.Xamarin.SfMaps package.

  3. Add the necessary XML Namespace for adding the Maps control in the application, and then add the Maps controls along with the layers.
    <?xml version="1.0" encoding="utf-8"?>
    
    <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:SeatingLayoutApp"
                 xmlns:maps="clr-namespace:Syncfusion.SfMaps.XForms; 
                 assembly=Syncfusion.SfMaps.XForms"
                 x:Class="SeatingLayoutApp.MainPage">
    
        <Grid>
            <maps:SfMaps>
                <maps:SfMaps.Layers>
                    <maps:ShapeFileLayer />
                </maps:SfMaps.Layers>
        	</maps:SfMaps>
        </Grid>
    
    </ContentPage>
  4. Add the necessary shape files to render the shapes on the map. A shape file is a set of files that are stored in a non-topological geometry with the attribute information for the spatial features and records in a data set.

    The maps control supports reading and loading shape files. A shape file can be a set of files or a single file. Generally, a shape file contains the following files:

    • Main file (.shp)
    • dBase file (.dbf)

    Download the shape files from the GitHub location: .shp file and .dbf file.

    • Android
      1. Add the necessary shape files to the Assets folder of the Android project.
      2. Open their properties by right-clicking them.
      3. Set AndroidAsset as the value for the Build action property.
    • iOS
      1. Add the necessary shape files to the Resources folder of the iOS project.
      2. Open their properties by right-clicking them.
      3. Set BundleResource as the value for the Build action property.
  5. To launch the SfMaps control in iOS, SfMapsRenderer should be initialized in the FinishedLaunching method of the AppDelegate class.
    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
    { 
        global::Xamarin.Forms.Forms.Init(); 
        Syncfusion.SfMaps.XForms.iOS.SfMapsRenderer.Init(); 
        LoadApplication(new App()); 
        return base.FinishedLaunching(app, options);
    }

With this we have created a Xamarin application, added an SfMaps control, and configured it.

Rendering custom shapes

Since the Xamarin.Forms SfMaps control renders shapes from shape data in the main shape file (.shp) and the dBase file (.dbf), you need to build shape data with coordinates that render a bus seating layout. For this blog post, we created the shape data beforehand. Now, assign the shape data file to the Uri property in the ShapeFileLayer. Since you need to select multiple seats, set the SelectionMode property to Multiple. Also, assign GeometryType to Points for custom shapes as shown in the following code.

<maps:SfMaps> 
    <maps:SfMaps.Layers> 
        <maps:ShapeFileLayer Uri="Custom.shp" 
         SelectionMode="Multiple" GeometryType="Points"> 
        </maps:ShapeFileLayer> 
    </maps:SfMaps.Layers>
</maps:SfMaps>

Next, create a view model class named ViewModel and populate the data for the seat number. Set the BindingContext of the MainPage to the view model class and Bind ShapeItems to the ItemsSource property of ShapeFileLayer.

Also, set the ShapeIDPath property to refer to the data field in the ItemsSource, and set the ShapeIDTableField property to refer to the column name in the dBase file (.dbf) of shape layers to identify the shape.

public class ViewModel
{
    public List<ShapeData> ShapeItems { get; set; } 

    public SeatingLayoutViewModel() 
    { 
        int totalSeats = 22; 
        ShapeItems = new List<ShapeData>(); 
        for (int i = 1; i < totalSeats; i++) 
        { 
            ShapeItems.Add(new ShapeData("" + i)); 
        }
    }
}

public class ShapeData
{ 
    public ShapeData(string seatNumber) 
    { 
        SeatNumber = seatNumber; 
    } 

    public string SeatNumber { get; set; }
}
<Grid x:Name="Maingrid" BackgroundColor="White">
    <Grid.BindingContext>
        <local:ViewModel /> 
    </Grid.BindingContext>
    <maps:SfMaps EnableZooming="false" x:Name="Maps">
        <maps:SfMaps.Layers> 
            <maps:ShapeFileLayer Uri="Custom.shp" ItemsSource="{Binding ShapeItems}" 
                 SelectionMode="Multiple" ShapeIDPath="SeatNumber" 
                 ShapeIDTableField="seatno" EnableSelection="true" GeometryType="Points" 
                 ShapeSelectionChanged="MapsTicketBooking_ShapeSelectionChanged"> 
            </maps:ShapeFileLayer> 
        </maps:SfMaps.Layers> 
    </maps:SfMaps>
</Grid>

 

Setting shape colors

Colors are applied to shapes to differentiate the booked seats and available seats. To do this, set the colors from the data source to the ShapeColorValuePath property. For the booked seats’ color, use the EqualColorMapping feature to set the color based on the seat number.

<Grid x:Name="Maingrid" BackgroundColor="White">
    <Grid.BindingContext>
        <local:ViewModel />
    </Grid.BindingContext>
    <maps:SfMaps EnableZooming="false" x:Name="Maps">
        <maps:SfMaps.Layers>
            <maps:ShapeFileLayer Uri="Custom.shp" ItemsSource="{Binding ShapeItems}" SelectionMode="Multiple"
                                 ShapeIDPath="SeatNumber" ShapeIDTableField="seatno" EnableSelection="true"
                                 GeometryType="Points"
                                 ShapeSelectionChanged="MapsTicketBooking_ShapeSelectionChanged">
                <maps:ShapeFileLayer.ShapeSettings>
                    <maps:ShapeSetting ShapeFill="Gray" SelectedShapeColor="#62AA5F"
                                       ShapeColorValuePath="SeatNumber"
                                       ShapeValuePath="SeatNumber">
                        <maps:ShapeSetting.ColorMappings>
                            <maps:EqualColorMapping Value="9" Color="#FFA500" />
                            <maps:EqualColorMapping Value="8" Color="#FFA500" />
                            <maps:EqualColorMapping Value="1" Color="#FFA500" />
                            <maps:EqualColorMapping Value="2" Color="#FFA500" />
                        </maps:ShapeSetting.ColorMappings>
                    </maps:ShapeSetting>
                </maps:ShapeFileLayer.ShapeSettings>
            </maps:ShapeFileLayer>
        </maps:SfMaps.Layers>
    </maps:SfMaps>
</Grid>

Enabling selection

For selecting shapes in maps, the selection feature should be enabled. All the shapes in the maps can be selected. This means you need to add code in the ShapeSelectionChanged event to restrict the selection of already booked seats and display the seat number to the right of the map when a non-booked seat is clicked.

private void MapsTicketBooking_ShapeSelectionChanged(object sender, ShapeSelectedEventArgs e)
{
    ShapeFileLayer shapeLayer = sender as ShapeFileLayer;
    ShapeData data = e.Data as ShapeData;
    if (data != null)
    {
        if (data.SeatNumber == "1" || data.SeatNumber == "2" 
            || data.SeatNumber == "8" || data.SeatNumber == "9")
        {
            if (shapeLayer.SelectedItems.Contains(e.Data))
                shapeLayer.SelectedItems.Remove(e.Data);
        }
    }
}

Customizing the map

Furthermore, you can add titles, images, and borders to maps in XAML to create the appearance of a bus seating layout, and you can add a button to clear the selection.

All these features are implemented in a sample we shared in this GitHub location. Build and deploy the project in all the platforms (Android, iOS).

The screenshot of the completely implemented sample will be similar to the one below.

Conclusion

I hope you have enjoyed reading this post and can see how easy it is to create a mobile application with JetBrains Rider and Syncfusion Xamarin Components.

To learn about even more features of the Syncfusion Maps component, visit the Feature Tour page. Try this sample and share your feedback as comments below.

Rider 2020.1.4 and ReSharper Ultimate 2020.1.4 Bugfixes Are Ready!

$
0
0

Rider 2020.1.4 and ReSharper Ultimate 2020.1.4 are ready for you to download.

ReSharper Ultimate 2020.1.4

ReSharper 2020.1.4 comes with better support for one more C# 8 language feature: the ability to mark property accessors separately with the Obsolete and Deprecated attributes (RSRP-477579).

Rider 2020.1.4

Rider 2020.1.4 has a couple of fixes in addition to the C# 8 update from ReSharper:

  • No more indefinite "waiting for intention actions…" message after calling the Alt+Enter menu (RIDER-44548).
  • Rider can successfully connect to MS SQL Server (DBE-10839).

You’ll find ReSharper Ultimate 2020.1.4 and Rider 2020.1.4 on our website, or you can update using the Toolbox App.

Introducing the .NET Guide – Tutorials, Tips & Tricks for .NET, Rider, and ReSharper

$
0
0

We’re happy to introduce you to the .NET Guide – a central place for tutorials, tips & tricks for .NET and the JetBrains .NET tools!

All tips and tutorials are organized by product, technology, and topic. Tips & tricks show you how ReSharper and Rider can help you write better code, faster. Tutorials come with a screencast and extra written content, and are excellent for learning the basics and exploring additional resources. Tutorials range from an overview of .NET and ASP.NET Core, to profiling applications.

Some tutorials that are already available:

Go check them out!

Tutorial: Shortcuts, Editing, and Completion in Rider

Bite-sized tips will periodically be tweeted from our Twitter accounts, @ReSharper and @JetBrainsRider. An example is this tip showing live and postfix templates that help write code to iterate a collection.

Tutorials are more elaborate, and typically contain a screencast and written content that provides further learning and resources. Don’t want to read the text? Watch the screencast! Don’t want to watch the screencast? The text will get you there! Doing both will give you more value, as video and text cover additional topics.

Have your own tips & tricks to share? Want to see a specific tutorial?

We have already gathered quite a few tips & tricks and tutorials, and we’ll add more over time. What do you want to see? Are you looking for specific tutorials, or have tips & tricks everyone should know about?

Share your thoughts in the comments below!

How to stop worrying and adopt nullable reference types – Webinar Recording

$
0
0

The recording of our July 9 webinar, How to stop worrying and adopt nullable reference types – Webinar Recording, with Andrey Dyatlov, is now available. Subscribe to our community newsletter to receive notifications about future webinars.


Nullable reference types is a deceptively simple feature. While starting with it is as easy as adding a single ? mark to your source code, migrating large code bases has been proven to be a tedious and sometimes quite tricky task especially when complex code contracts and generics are involved.

The presentation will quickly cover what benefits this feature brings to the table, how it differs from JetBrans.Annotations attributes and how it evolved since its original release almost a year ago.

I will show a couple of ways to ease migration of large code bases to nullable reference types and how you can start to benefit from the feature immediately without putting any effort into annotating your code base just yet. I will also outline the most common pitfalls and explain how to deal with generics and potential analysis shortcomings as well as how to guide the compiler through complex code contracts to get the most out of this feature.

(more…)

Implicit References, Context Popup, Configuration and Deprecation Messages – NuGet Updates in Rider 2020.2 EAP

$
0
0

Working with NuGet is an important part of every .NET project, and therefore its integration in Rider is one of our top priorities. Previously we introduced productivity boosts like import of missing packages, the NuGet quicklist and auto-display of README files. Now we want to show you some recent additions in the latest Rider 2020.2 EAP release.

In this new version, we’ve added a new way to view implicit package references, extended the NuGet package list with a brand new context popup menu to access common operations, implemented a package search history, enhanced the config view with a property pane to manage package folders with additional validation, introduced warnings about package deprecation, and fixed several more issues along the road. We’ve also made a large number of internal refactorings to pave the way for more features and fixes to come.

Let’s get ready for some NuGet magic!

Implicit Package References

Up until now, we could use the Solution Explorer to browse NuGet packages and view the transitive dependencies and assemblies contained in these packages:

Expanding Implicit Packages in Solution Explorer

The task of investigating transitive packages becomes tedious with extensive dependency chains, and even more so if we need to see why a certain package was imported, i.e., to check which explicit package references a given transitive package.

From Rider 2020.2 we can use the NuGet tool window to see all the transitive packages of a solution or project in a new Implicitly Installed Packages section:

NuGet List with Implictly Referenced Packages

Hovering over implicit packages reveals a tooltip containing information about its version and the referencing package. If the package is referenced in multiple versions, they will all be shown:

Tooltip for Implicitly Referenced Packages

Context Popup Menu

Another convenient feature we’ve added is a new context popup menu that can be invoked via right-clicking or pressing Alt-Enter on a NuGet package:

NuGet Package Context Menu

From here we can quickly access all the relevant actions for a single NuGet package, like updating or removing the package, opening it in the Assembly Explorer to examine the API, revealing it in the filesystem explorer, navigating to the related NuGet.org entry, or finding dependent code. Also remember that we can just start typing here to filter actions!

Notably, there is also a new Quick NuGet Documentation action that is more of a keyboard-driven way to bring up the implicit reference paths to a package:

Quick Documentation for NuGet Packages

This action uses the same shortcut as the existing Quick Documentation action to integrate fluently into our existing muscle memory.

Package Search History

The search box for packages also received an update. Notice the little triangle next to the magnifier? We can either click on it or use Alt/Option - Down Arrow to open the history of recent package searches:

NuGet Package Search History Dropdown

By the way, this is also available in other search boxes, like Find/Replace in File or Find/Replace in Solution.

Specify Package Folders  & Validate NuGet.config

A central part of NuGet is the configuration, which resides in NuGet.config files and works hierarchically across directories. In Rider, we already have the Sources tab in the NuGet tool window to take a glance not only at the relevant NuGet files but also at the effective configuration. In Rider 2020.2 we can now also edit values for two of the most commonly changed properties globalPackagesFolder and repositoryPath:

Editing Common NuGet Properties

For relative values, we can see the effective path right below the text boxes. Of course we can also choose from a directory dialog, for instance to choose a folder from another disk.

When adding or changing local source feeds, it’s pretty annoying when we find out later that we put in the wrong value. In the Feeds tab we can now immediately see whether a feed path is invalid as the path will be highlighted with a red rectangle:

Indicator for Invalid NuGet Feeds

A warning message will also be shown in the search list if we search for a package and it is not found in any of the feeds:

Warning Message for Invalid NuGet Feeds

Deprecation Warnings

When searching for a package in the NuGet tool window, it would be great to have a visual indication of which packages are still in maintenance or have been deprecated. The new warning in the details pane will help us:

Deprecation Message for NuGet Packages

We hope you like the new NuGet improvements! These are just the initial steps towards better NuGet integration that we plan to implement. Feel free to leave us feedback in the comments below. Download Rider or – even better – try JetBrains ToolBox to easily test new releases and leave your working environments untouched!


Webinar – REST – the ignored parts

$
0
0

Join us Tuesday, August 25, 2020, 16:00 – 17:00 CEST (10:00 AM – 11:00 AM EDT or check other timezones) for our free live webinar, REST – the ignored parts, with Irina Scurtu.

Register now!

In a world dominated by APIs, where everyone seems to implement microservices with so many paradigms and standards to choose from, REST seems to be the default option. Despite that, many of these so-called REST APIs don’t respect the guidelines and become brittle by overlooking some of the most powerful constraints.

In this session, we will look over how we can design a REST API that is flexible and evolvable by being in sync with what HTTP has to offer.

We will look over OData as a way to filter data, versioning, hypermedia types specs, and status codes by fine-tuning .NET Core.

(more…)

Licensing Update for JetBrains .NET and Visual Studio Tools

$
0
0

In brief, what’s changing?

To simplify the licensing for our .NET and Visual Studio tools, we’ve reduced it to just three simple options:

  • ReSharper subscription – for users of our Visual Studio extensions: ReSharper or ReSharper C++ or both.
  • Rider subscription – for users who prefer our fast standalone .NET IDE, or do cross-platform .NET Core, Unity, or Xamarin development.
  • dotUltimate subscription – for users who combine Visual Studio extensions with Rider in their development, or need any of our advanced profilers (dotTrace and dotMemory) or a code coverage tool (dotCover).

(There is also an All Products Pack, of course, which includes all JetBrains desktop tools.)

To simplify things, we covered ReSharper and ReSharper C++ with one license. We also decreased the price of the all-in-one .NET pack (which now falls under dotUltimate).

To make it easier to work with all tools included in dotUltimate, we’ll have a common installer for all the dotUltimate products on Windows. It will be able to install all the .NET products and VS extensions by JetBrains by the time the 2020.2 release is ready.

More details on the change

Starting August 2020, we will no longer sell the following licenses:

  • ReSharper C++
  • ReSharper Ultimate
  • ReSharper Ultimate+Rider

The dotUltimate license will cover all paid .NET & Visual Studio tools from JetBrains (ReSharper, ReSharper C++, Rider, dotTrace, dotMemory, and dotCover). It will cost the same as ReSharper Ultimate currently does, but will also include Rider. Holders of active ReSharper Ultimate and ReSharper Ultimate+Rider licenses will be automatically transferred to the new dotUltimate, with all their continuity discounts preserved.

If you are a ReSharper or Rider license holder and you want to simply continue using the corresponding product only, you can safely ignore this post. Nothing changes for you. ReSharper license holders will get access to the ReSharper C++ product and vice-versa.

To figure out what this change means to you and if you need to react, please keep reading.

Why we will update our licensing

Get an easier licensing scheme

Simpler licensing is the main goal of the change. Customers can now choose the IDE or the extension they need, or they can get all the .NET products in one pack.

Rider and ReSharper under one license

Switching between Rider and Visual Studio with ReSharper is easy with dotUltimate. You can work on your Windows projects in Visual Studio augmented by ReSharper, and at the same time use the fast and powerful Rider IDE for your cross-platform .NET development.

Because Rider is powered by the ReSharper engine, as a Rider user you won’t miss any benefits that are part of your ReSharper experience, but will find even more goodies. For example, integrated support for VCS, Local History always on hand to save you from losing uncommitted changes, and SQL editing tools from the DataGrip team – all of this in a fast and responsive editor.

To learn more about Rider, check out our Rider Essentials, where our developer advocates share their favorite tips and tricks and help you discover new ways to work with the IDE.

Profiling and code coverage support

A dotUltimate license is a great choice for developers who are keen to eliminate performance bottlenecks, plug memory leaks, and ensure their unit tests are fully covered. The dotUltimate license gives you access to the profilers (dotTrace and dotMemory) and a coverage tool (dotCover). And it’s not only about these individual tools or the integration in Visual Studio, as the dotUltimate license also covers plugins for dotCover and dotTrace in Rider!

We want to make profiling tools even more easily accessible in the code editor for your day-to-day code maintenance activities. In Rider v2020.1, we introduced Dynamic Program Analysis (DPA), which auto-detects memory issues in your application while running in the background of your IDE. DPA is licensed as part of Rider (and we plan to add it to ReSharper later).

Use C++ along with C#

Another part of the change is the C++ support that we now provide to all our ReSharper customers. We have two siblings in the family that have lots of shared code – ReSharper and ReSharper C++, each of which provides value to its set of users. However, according to our feature usage statistics, we see that one in seven .NET projects includes some native C++ code. There is also C++/CLI, a bridge between C# and C++, which can be better served by using a combination of both flavors of ReSharper.

So if you work with both C++ and C#, you no longer need to buy a second license – the ReSharper license now includes both ReSharper and ReSharper C++. The licenses currently available will continue to work but will now also include access to the other ReSharper, too.

ReSharper C++ will continue to evolve – the team has some very promising plans in the pipeline. Moreover, it now powers Rider for Unreal Engine, a preview edition of Rider with C++ support that can be used to craft games with Unreal Engine. When released, it will become a part of the Rider product, bringing to it C++. This decision is fully aligned with the ReSharper/ReSharper C++ licensing change.

What this means for you

Identify yourself with one (or several) of the groups below to understand how exactly the change affects you:

  1. You have an active ReSharper Ultimate subscription. Before August 2020, we will automatically transfer it to the newly created dotUltimate license. The change will be reflected in your JetBrains Account. You can continue using ReSharper and ReSharper C++, the profilers (dotTrace and dotMemory), and the coverage tool (dotCover) as before, and also start using Rider right away. Discounts for your second and third subscription years onwards are applied when this license is updated. Fallback products now also include Rider.
  2. You have an active ReSharper Ultimate + Rider subscription. Before August 2020, we will automatically transfer it to the newly created dotUltimate license. The change will be reflected in your JetBrains Account. You can continue using all .NET tools from JetBrains. And you’ll pay less next time you are updating the license, not only because the continuity discounts are preserved but also because the dotUltimate license comes with a lower price.
  3. You have an active ReSharper subscription. Starting August 2020, it’s also valid for ReSharper C++. Fallback products now also include ReSharper C++.
  4. You have an active ReSharper C++ subscription. Starting in August 2020, it’s also valid for the ReSharper product. Please note we will no longer sell new licenses of this kind. Only renewals will be possible (via JetProfile or contact the sales). Continuity discounts are preserved. Fallback products now also include ReSharper.
  5. You have an active Rider subscription. There are no changes you need to consider.

If you have an active All Products Pack subscription, there are no changes to your license. If you own several subscriptions for several .NET products and have questions or just want to upgrade to a bigger pack (like dotUltimate, for example), please contact our sales team.

What you need to do with regard to the licensing changes

We know you have lots of important projects and tasks to do. So we’ll do our best to perform all the changes automatically and smoothly, in order not to impact you. Our team is now preparing the change and making sure the transfer process runs seamlessly.

Once the changes are released, you will be able to start using the new products available with your updated license right away.

There is only one scenario where action from you would be required – if you are using an activation code and would like to use the newly added products (not previously available to you under your license). In this case you will need to reissue the activation code in your JetBrains Account once the change is made effective (see the Important dates section below).

For example, if you have an active ReSharper Ultimate license and use an activation code to register the product, it will still work for ReSharper, dotTrace, dotMemory, and dotCover. To use Rider after the change, the activation code will have to be reissued in your JetBrains Account.

Important dates

These changes will take effect with the 2020.2 release, which we estimate to be released approximately the first week of August. Transferring of the active ReSharper Ultimate and ReSharper Ultimate+Rider licenses will start one week before that, at the end of July. All licenses will be transferred automatically, and a notification with a link to this blog post will be visible in the JetBrains Accounts of all affected customers.

Have a question?

Drop it here in comments or contact our support or sales teams. We’ll be happy to assist.

We do hope the changes open new opportunities for many of you and you are just as excited as we are to move forward with this!

Your .NET team
JetBrains
The Drive to Develop

ReSharper Command-Line Tools – Cross-Platform and Global Tools

$
0
0

We’re often asked how ReSharper and Rider relate to build servers, and how their features can be utilized in CI/CD environments. There are actually quite a few tools bundled in free packages – namely ReSharper.CommandLineTools or dotCover.CommandLineTools – that can help to continuously monitor and improve our codebase. In this post, we will discuss the ReSharper tools, which include:

  • InspectCode – runs code analysis to find and report code issues
  • DupFinder – identifies semantically duplicated code fragments
  • CleanupCode – reformats code to make it consistent

Check out our blog posts that put a more practical focus on InspectCode, DupFinder, and CleanupCode:

ReSharper InspectCode Report in TeamCity

But now, without further ado, let’s get to the real news: these tools are now cross-platform, and can be used as .NET global tools!

Running Cross-Platform

Many of our tools already run cross-platform. With the latest 2020.2 EAP package, the ReSharper command-line tools also contain 3 shell scripts to run on Linux and macOS:

./inspectCode.sh MySolution.sln
./cleanupCode.sh MySolution.sln
./dupFinder.sh MySolution.sln

Note that as a result of going cross-platform, we’ve also updated the parameters to use double-dashes instead of single slashes.

Usage as Global Tools

A while ago, the .NET Core SDK introduced .NET Global Tools, which can be installed to be globally available like other shell commands. Targeting netcoreapp3.1, we’ve prepared a new jb global tool shipped with the JetBrains.ReSharper.GlobalTools package that lets us easily invoke InspectCode, CleanupCode, or DupFinder without needing to worry about where the tools are located:

dotnet tool install JetBrains.ReSharper.GlobalTools --global --version 2020.2.0-*
jb inspectcode MySolution.sln
jb dupfinder MySolution.sln
jb cleanupcode MySolution.sln

In a build script, we can also install it as a local tool to keep the operating system clean from unnecessary modifications. Using a tool manifest file, we can execute the following locally:

# One-time locally
dotnet new tool-manifest
dotnet tool install JetBrains.ReSharper.GlobalTools --version 2020.2.0-*

# In the build script
dotnet tool restore
dotnet jb inspectcode MySolution.sln

Without a tool manifest, we can use the --tool-path parameter:

dotnet tool install JetBrains.ReSharper.GlobalTools --tool-path ./ --version 2020.2.0-*
./jb inspectcode MySolution.sln

We’d also like to say thanks to John for this suggestion!

Please let us know if you have any questions or feedback, and give ReSharper or Rider a try if you haven’t already done so. They’ll definitely make it easier to fix code smells and generally clean up code!

Data Breakpoints and Pin-to-Frame – Debugger Updates in Rider 2020.2 EAP

$
0
0

Where and when does a value in our program change? And what’s the state of values in each iteration, when debugging recursive functions? Two good questions that Rider 2020.2 EAP helps answer, with Data Breakpoints and Pin-to-Frame! (more…)

Write Object-Oriented TypeScript Well

$
0
0

TypeScript enables you to code using object-oriented principles and techniques, and Rider helps you write TypeScript more efficiently and easily. In this blog post, we’ll look at the object-oriented features provided by the TypeScript language, and how to use Rider to implement them.

(more…)

.NET Annotated Monthly | August 2020

$
0
0

Summer is here, but at present in 2020 many people can’t go anywhere, so a "staycation" will have to do. No problem though, just sit back, relax, and browse the content from our .NET Annotated newsletter.

There have been some key historical events that have happened in August. In 1995, Microsoft shipped Windows 95! Windows 95 was the "moment you’ve all been waiting for". I remember uncovering that Windows 95 Easter Egg with great delight! In 1981, IBM introduced its personal computer, IBM model 5150. When Windows 95 shipped, many folks were using IBM personal computers to run it.

.NET Annotated Monthly newsletter by JetBrains!
(more…)

Generate Reference Assemblies With Refasmer

$
0
0

With each passing day, the .NET ecosystem introduces new target environments. In addition to Windows environments, we can now deploy to Linux, macOS, and all popular mobile operating systems. Having these options is excellent, as it allows us to reach a broader audience, but each new environment comes with its own set of challenges.

.NET Framework has solved the multiple-environments issue by creating the .NET Standard. The .NET Standard exposes a common API we can compile against with the understanding that our target environments have a context-specific implementation. In this post, we’ll see how we can take one of our own common assemblies and build a reference assembly.

What are reference assemblies?

According to the Microsoft documentation

Reference assemblies are a special type of assembly that contains only the minimum amount of metadata required to represent the library’s public API surface. — Microsoft Docs

Reference assemblies allow us to build for a target environment within a different environment. For example, we may want to build our assemblies to target mobile devices from our Windows continuous integration environment. The most common reference assembly being the .NET Standard itself. In general, we can think of reference assemblies as contracts that concrete implementations can support.

Who can benefit?

Who benefits the most from using reference assemblies? That would be folks building APIs that target multiple environments. For example, we may be building a cross-platform microphone API. Our new microphone library shares a standard interface across environments, but because of the target operating systems like Windows, macOS, and Linux, we need unique implementations to make our API work.

Additionally, Reference assemblies allow platform developers to publish only the API surface, holding the implementation back at the time it is needed by developers. Reference assemblies are an ideal solution for products with a plugin system (all JetBrains products for example).

Product developers can publish reference assemblies to help plug-in authors understand the API surface while retaining the implementation details within the product. The product can continue to iterate with enhancements and bugfixes, changing internal implementation details without plug-in authors needing to update any references.

In the case of JetBrains, we required reference assemblies to target .NET Framework 3.5, which we were able to create with our own tooling. The .NET Framework 3.5 reference assemblies are made available on NuGet for anyone still targeting older versions of .NET Framework. This allowed us to support our loyal developer community working on older versions of .NET while still pushing to the future. The .NET Framework 3.5 reference assembly is a rebuild of the public API surface built from scratch and not just a stripped original assembly. 

Enter Refasmer

JetBrains developers Sergey Zabodalov and Mikhail Filippov have developed Refasmer, a command-line tool that can take an assembly and generate a reference assembly. As stated before, our newly created reference assembly is a contract that can help us target new environments.

Currently, the tool is only available on GitHub.

To use Refasmer, we need to invoke RefasmerExe.exe  with specific arguments found under the help menu.

RefasmerExe.exe -v -O ref -c *.dll

The command above will handle all DLLs in the current directory, continue on errors, and try to strip native resources. Refasmer will place output DLLs in the ./ref  directory.

There is a wealth of options, which we can find in the help menu of Refasmer.

RefasmerExe.exe [options] <dll> [<dll> ...]
Options:
  -v                         increase verbosity
  -q, --quiet                be quiet
  -h, --help                 show help
  -c, --continue             continue on errors
  -O, --outputdir=VALUE      set output directory
  -o, --output=VALUE         set output file, for single file only
  -r, --refasm               make reference assembly, default action
  -w, --overwrite            overwrite source files
  -l, --list                 make file list xml
  -a, --attr=VALUE           add FileList tag attribute

Refasmer has the advantage of being a stand-alone executable, making it easy to integrate into continuous integration environments.

Conclusion

Refasmer is available on GitHub for folks looking to make the process of building reference assemblies easier. Sergey and Mikhail have done a great job and released the code for the benefit of the .NET community. Contributions and feedback are welcome.


Debugging Unity Players over network and USB with Rider 2020.2

$
0
0

Rider 2020.2 is a bumper release for Unity. We’ve already seen how “pausepoints” can help you debug your code, by switching the Unity editor into pause mode when your code hits a certain point. Let’s continue looking at how Rider can help with your Unity application.

We’ll stick with debugging for now, and in this post we’ll see how you can use Rider to debug your game on mobile devices and consoles such as iPhone, Android, Xbox and PlayStation.

We’ll follow up with another post looking at how Rider improves the default display of values while debugging, and then we’ll have a couple more posts detailing Rider’s Burst analysis, and then take a dive into, wait for it, shader support!

Rider has always supported debugging players, such as standalone desktop apps, mobile devices and consoles, but this release sees a number of new features, a bit of polish and a couple of bug fixes to make it even better. It also introduces USB debugging for Apple devices.

Attach to Unity Process dialog listing Unity editor, child processes, standalone and remote players and an iPhone attached via USB

Player discovery

It’s nice and easy to start debugging a player, simply use the Attach to Unity Process action, available in the Run menu, or in the drop down menu when you click the Unity logo in the main toolbar.

The Unity logo menu in the main toolbar will open the Attach to Unity Process dialog

This will open the Attach to Unity Process dialog, which lists the available processes to debug. This dialog has had a little polish in this release, and now groups the players by project, with the currently open project at the top of the list.

Looking back at the screenshot of the dialog, you can see that there can be quite a few different processes listed. Let’s take a look at what Rider is going to show you. Rider will list all editor processes, grouped by project when possible, with the current project shown at the top of the list. You can attach the debugger to the editor from this dialog, or you can use the Attach to Unity Editor run configuration and just click the Debug button in the main toolbar.

The Debug button on the main toolbar will attach to the editor and start debugging

Rider will also list any helper processes created by the Unity editor, shown as a child of the main Unity editor process. This is useful for debugging features that Unity runs out of process, such as asset import workers for the new DOTS system.

Attach to Unity Process dialog showing a Unity editor instance plus a child worker process

Rider will then list all other players for the current project. This includes standalone players such as the Windows or OSX player, followed by remote players, such as mobile devices or consoles.

Selecting an item in the list and clicking OK will start the debugger (double-click the item if you’re in a hurry), and that’s it! You’re now debugging your game running on a device. Rider’s debugger features work just the same as if you’re debugging a local process – local variables, watch variables, evaluating expressions and calling methods and so on. And everything works great with cellular devices such as phones that can connect to the internet via WiFi or their own cellular radio.

Debugging a game running on an iPhone

Apple USB debugging

New to Rider 2020.2 is debugging of Apple devices over USB. You can now debug your iPhone or iPad game via network, or over a USB connection. This can be really useful if your device isn’t able to connect to the same network as your desktop, or if your local WiFi is being a little flaky, or simply as a preference.

It all works seamlessly – the connected iPhone or iPad is listed in the “USB Devices” group, and you can simply select or double click and you’ll start debugging, just the same as over the network.

Attach to Unity Process dialog listing iPhone in USB Devices

Rider doesn’t have much information about the connected device, so it’s lised simply as iPhone or iPad. And Rider also doesn’t know what’s running on the device, so you won’t get a project name, and in fact, you’ll see the device in the list even if your Unity game isn’t running!

The obvious question now is “what about Android?”. Rider doesn’t currently support USB debugging for Android, but you can still debug your Android game over the network. We’re planning on adding Android USB debugging in Rider 2020.3.

Manual player discovery

If for some reason the player doesn’t show up in the list, and you can find the device IP and port number from the player logs, you can use the Add player address manually button to enter the custom network details and connect the debugger manually.

Enter a custom player address as IP address and port number

Debugging and profiling standalone players

One other thing that Rider 2020.2 will do is to create a new run configuration when you build a standalone player. Rider’s plugin for the Unity editor will spot that a standalone player, for Windows, Mac or Linux, has been created, and will automatically create a run configuration called simply “Standalone Player”.

Once the run configuration is selected, the Run button will launch the desktop player. The Debug button will launch the process and attach the debugger. And you can even use the Profile button to launch the process and attach the timeline profiler to get a code focused profile of your standalone player.

Standalone player run configuration drop down

You can find out more about profiling Unity executables in this blog post from Rider 2019.1 when we first introduced the feature.

Requirements

Now for the small print!

On the whole, it’s very easy to build and debug players from your Unity project, but there are a couple of required steps to make sure things work smoothly. You can read the details in Unity’s documentation (see the Troubleshooting the debugger section), but the TL;DR is that firstly, the player build must have Script Debugging enabled. If it doesn’t, Rider will highlight this in the dialog, and you’ll be unable to attach to the player.

Attach to Unity process dialog showing a standalone player with script debugging disabled

Secondly, you need to make sure that the remote device is visible to your desktop’s network, and that firewalls aren’t blocking any traffic. The players broadcast their debug details via UDP messages, and if there’s a firewall blocking this, the player won’t appear in the list.

Finally, the version of Unity that you use to build your player makes a difference, too. If your player is built with a Unity version earlier than 2019.3, then you won’t see a project name – only players built with Unity 2019.3 and above broadcast this information. Rider will still happily debug older players, but they will be grouped under “Unknown projects”.

And you’re not limited to the Mono backend either – Unity 2018.2 added support for debugging IL2CPP based players as a normal C# application, so Rider is able to debug Mono or IL2CPP players.

Download Rider 2020.2!

As you can see, Rider makes it easy to debug your Unity game. It’s very easy to attach to the Unity editor from the main toolbar, and the Attach to Unity Process dialog lists Unity editors, helper processes, local standalone players, remote players on devices and consoles and even Apple devices attached by USB. You can even launch, debug and profile standalone players with a single click!

Next time, we’ll take a look how Rider 2020.2 improves the default display of locals and variables in the watch window.

Download Rider 2020.2 EAP today, and try it with your own game. We’d love to hear your feedback!

ReSharper 2020.2: Improved Code Analysis for C# 8, Code Cleanup on Save, and Revamped Unit Test Runner

$
0
0

Hello everyone,

Today we’re excited to give you ReSharper 2020.2! This major release introduces new inspections and quick-fixes for C# 8, most notably for nullable reference types, a much-awaited Code Cleanup on Save, a revamped Unit Test Runner, and various accessibility improvements.


Download ReSharper 2020.2

Since the ReSharper license now covers both ReSharper and ReSharper C++, support for C++/CLI – a bridge between the languages – is getting a lot of updates and improved interoperability between C++/CLI and C#.

Read through the major updates of all the JetBrains .NET tools and extensions:

Also, visit our What’s New page for the full release notes.

ReSharper 2020.2

Code Analysis

C# 8 support has been improved with a number of new inspections and quick-fixes, most notably for nullable reference types. For instance, code analysis now takes into account JetBrains.Annotations attributes (both NotNull and CanBeNull) for API declared in code where nullable reference types are disabled (#nullable disable).

file
Also, nullability code analysis is now aware of more cases and can trace incorrect nullability through deconstruction and the foreach cycle. It also provides a corresponding quick-fix.

Code Cleanup on Save

Finally, you can set up ReSharper to launch Code Cleanup automatically on saving a file! We’ve also added more granular scopes to run Code Cleanup for recently modified or recently opened files.

file

Revamped Unit Test runner

We’ve remade our Unit Test runner from scratch for both .NET Framework and .NET Core, which allows us to use the same runner for both runtimes that run out of the Visual Studio process. This has helped us solve quite a lot of problems with discovering, running, and debugging unit tests, and gives us full control over unit test hierarchies for .NET Core tests. What’s more, the new test runner has built-in MSFakes support for the NUnit, xUnit, and MSTest v2 unit test frameworks.

file

In other news:

  • We have good news for UWP developers – support for compiled bindings with x:Bind is finally here!

  • This release comes with improved support for screen readers like JAWS, NVDA, and Microsoft Narrator.

  • Type and project dependency diagrams have been updated. The yFiles engine, which is used to draw the graph, has been updated to the latest version. This, in addition to our optimizations, means the resulting graph is drawn much faster. Also, you can export the graphs to new file formats, GraphML and XPS.

file

  • Navigating to usages of types from external assemblies in the code is now much easier. ReSharper can navigate directly from Go to Type search results to Find Usages.

  • New Peek actions have been added to show the result of some common ReSharper actions in a Peek Definition view.

file

  • We have updated our offline and online installers to cover all products under the dotUltimate license, which includes ReSharper, ReSharper C++, JetBrains Rider, dotCover, dotTrace, dotMemory, and dotPeek.

ReSharper C++ 2020.2

Improved Unreal Engine features

ReSharper C++ 2020.2 introduces support for the Unreal Engine project model, which brings smarter auto-import for include directives and support for different solution configurations. To match the Unreal Engine coding standard, we’ve also included several updates to inspection severities and code generation actions.

file

Better C++/CLI support

We’ve updated C++/CLI support to improve interoperability with C# code, and we’ve added a set of code inspections for the sealed, gcnew, and safe_cast usages. Upgraded search and navigation features now work on imported CLR entities and allow you to look for derived symbols in C# code.

file

See the ReSharper C++ 2020.2 blog post for more details.

Command Line Tools 2020.2

  • ReSharper command line tools now run .NET Core on Windows, Linux, and macOS, and you can install them as .NET Core Global Tools.

file

  • dotTrace, dotCover, and dotMemory command-line tools for Linux (Debian and Ubuntu) can perform analysis on ARM64 systems.
  • In the dotCover console runner, the --reportype=SummaryXml parameter lets you create a new Summary report type, which includes data on how many classes, methods, and statements are covered in total. Now, the runner can generate reports of several types at once.
  • The dotTrace console profiler lets you control the profiling session (take snapshots, detach from the profiled process, and so on) by sending commands to stdin or to a file.
  • The dotMemory command-line profiler is now also available on Linux and macOS, in addition to Windows.

dotTrace 2020.2

Both standalone dotTrace and dotTrace in Rider can profile the native part of Mono/Unity applications on Windows. Start a session with the ‘Enable native profiling’ option selected, and you’ll see both native and managed call stacks in the performance snapshots.

file

dotPeek 2020.2

  • Improved NuGet support: NuGet v3 package feeds are now supported in Open from NuGet, Open from NuGet packages cache, and Open NuGet packages.config.
  • The new release brings support for the most recent version of C#, including the following language features:
    • Expression-bodied members
    • Throw expressions
    • Default parameters and named arguments
    • NullablePublicOnly attribute

See the full list of fixes completed in the 2020.2 release cycle on YouTrack.

Visit our What’s New in ReSharper page for the full list of improvements. Let us know what you think of this release and please share your feedback here in the comments, in our issue tracker, or on Twitter!

You can use any of these alternative ways to get ReSharper 2020.2:

Rider 2020.2: Localization Manager, Debugger Updates, and Major Updates to Unity Support

$
0
0

file

Rider 2020.2 is now available! To mark this great news we’ve put together a full list of the new features and under the hood improvements that are in store for you. Let’s dive in!


Download Rider 2020.2

Debugger

The new release brings significant changes to the debugger API. They allow us to perform super-lazy value calculations with better interruption and custom value representation. We’ve also added data breakpoints.



Finally, the Pin to Frame feature lets you pin local variables to the frame.

Localization Manager

We’re proud to introduce a new tool for working with resources. With the Localization Manager, you can view the content of any specified set of .resx files in your project, including all of them at once, in a single grid.



The Localization Manager allows you to easily perform the whole set of operations on resources: add, edit, rename, safely delete, find unused, find the resources missing localized values, find usages, export to and import from CSV, and add comments.

Unity

Unity support has received a major boost. Cg and HLSL shaders are now supported in syntax highlighting, code completion, navigation (including macros), refactorings, and more.



Pausepoints, which pause the Unity Editor when the debugger hits them, are now available. Rider now works with the Burst compiler, which means it highlights code that doesn’t match Burst constraints. For the whole list of improvements, check out this list.

VCS support

The main attraction here is the enhanced support for GitHub pull requests, which includes browsing, assigning, and merging pull requests, as well as submitting comments and reviews, accepting changes, and more. For more details, please check out this blog post.



Additionally, Git in WSL 2 is now supported, Compare branches are presented more conveniently, and you can squash commits selected in the Log tab of the Git tool window.

Unit testing

Our unit test runner has been rebuilt from scratch for both .NET Framework and .NET Core. This has helped us solve a lot of known problems with discovering, running, and debugging unit tests. The new runner includes built-in support for MSFakes for NUnit, xUnit and MSTest v2, along with the ability to run MSTest v2 tests without Visual Studio installed. There are also UI improvements for better presentation and filtering.

NuGet

The NuGet tool window has received a considerable feature boost. It now displays a solution’s transitive packages, provides a context menu with all the relevant actions for a single package, and indicates invalid feeds and deprecated packages.


Code analysis

C# 8 support has been enhanced with a number of new inspections and quick-fixes, most notably for nullable reference types. For instance, code analysis now takes into account JetBrains.Annotations attributes (both NotNull and CanBeNull) for API declared in code where nullable reference types are disabled (#nullable disable).



Also, nullability code analysis is now aware of more cases and can trace incorrect nullability through deconstruction and the foreach cycle, and it provides a corresponding quick-fix.

Refactorings

The Introduce Parameter and Introduce Field refactorings now ask which part of the expression you want the refactoring to be applied to.



The Conflicts dialog has received a makeover: we’ve turned the plain list into a tree grouped by file.

Plugins

The Markdown plugin is now bundled in Rider. It recognizes Markdown files in your solution, provides a dedicated editor for them, and shows the rendered HTML in a live preview.



With Azure Toolkit and Azurite, you can now start, stop, and clear the storage emulator in the Azurite node of the Services tool window. Also, code completion and validation is now available when editing NCrontab expressions.



The dotCover plugin offers export of coverage reports, quick search in Unit Tests Coverage window, and navigation from code to the coverage tree.



The dotTrace plugin can profile the native parts of Mono/Unity applications on Windows.



Godot run configurations have been reworked to make it easier to launch run, debug, and run with profiling.


Other updates

  • We have a new installer for all the products covered by the dotUltimate license; to learn more about the updates to the licensing, please refer to the blog post.
  • Support for compiled bindings with x:Bind is available with inspections and quick-fixes.


  • File templates are now available in both Mac and iOS Xamarin projects. Xcode synchronization has been improved. If there is no .Designer.cs file, Rider now generates one instead of displaying an error.


  • Dynamic Program Analysis now has include and exclude filters.


  • New analyzers, highlighters, and quick-fixes have been added to the F# plugin. We’ve also taught Rider to rename the wildcard pattern and to apply the Introduce Variable refactoring to variables.


  • We’ve made some improvements to database support, such as a separate editor for huge cell values, a new UI for boolean values, and a DML preview in the data editor.


  • For web developers, we have new smart intentions in JavaScript code, in-text rendering of documentation comments, support for the Prettier plugin, and more updates to Vue support.


  • We now support attaching the debugger to .NET core runtime hosting configurations and running them with debug.
  • Run configurations are generated for all runnable projects.
  • Project references for website projects are now supported.
  • Search results in Search Everywhere have a new look.

See the full list of fixes completed in the 2020.2 release cycle on YouTrack.

That’s it for today! If you’re interested in learning more about these changes, please refer to the What’s New in Rider page. We appreciate your feedback, so please let us know what you think of Rider 2020.2 in the comments below, in our issue tracker, or on social media.

You can use any of these options to get Rider 2020.2:

  • Download and install it from www.jetbrains.com.
  • Update right inside Rider: Help | Check for updates.
  • Use our Toolbox App.
  • Use this snap package from the SnapCraft store if you are using a compatible Linux distro.

Debugger Extensions for Unity in Rider 2020.2

$
0
0

Rider 2020.2 has a lot of great new features for Unity, and debugging has certainly had its fair share of attention in this release.

We’ve already introduced “pausepoints”, a new kind of breakpoint that puts the Unity editor into pause mode when a condition is met in code, allowing you to use the Unity Inspector to see what’s going on at that point. And in the last post, we saw how Rider can help you debug players, either standalone on the desktop, or on mobile devices and consoles, including USB support for Apple devices. Today, we’re going to look at a set of small features that will make a big difference to how you debug your Unity projects.

One of the problems with debugging a Unity game is understanding your current context – if you’re debugging a MonoBehaviour script, which game object is it attached to? Where is it in the object hierarchy? What other components are attached to the game object? What’s the position of this Transform?

All of these questions and more can be answered through the debugger, but that often requires drilling down into objects, or evaluating expressions and calling methods, making you work to find these answers, rather than having the most useful information quickly and easily accessible.

Rider has made a whole load of little tweaks to how we display Unity values in the debugger, all designed to give you a better view of the current state of your project, and to make it easier to see this much needed context.

Debugger view of stack frames and variables

Rider does this in a number of ways. It will add extra items to the Watches and Variables tab, showing you the currently active scene, for example. It also adds extra child items to expanded values – the "Active Scene" item will show root game objects, and each GameObject shows child game objects and attached components, giving a view of the whole scene hierarchy. Rider has also updated the summary information displayed for some Unity types, pulling useful information up so it’s always visible, such as showing the position, rotation and scale of a Transform without having to expand the value. Let’s take a look at more details, and see some examples.

Active scene and the game object hierarchy

Whenever you hit a breakpoint, Rider will add an “Active Scene” item to the Variables and Watches tab, very much like an automatically created watch variable. This shows the active Scene object, as returned by SceneManager.GetActiveScene. The idea here is to give you the context you need for your Unity game, and the active scene is a great entry point for this. Collapsed, it will show the scene name and file path, and when expanded, you’ll not only see the normal debugger view of fields and properties, but you’ll also see a new group called “Game objects”. Expanding this item will list the root game objects in the scene.

View the scene's object hierarchy of game objects and components

Rider adds new items to GameObject instances, too. The “Children” group shows the child GameObjects of this instance, very much like how the “Game objects” group works for Scene. You can use this to get a debugger view of the entire object hierarchy of your scene. And don’t worry about performance – Rider collects these values on demand, so they’re not calculated unless they’re shown, and Rider will group results larger than one hundred game objects, so it will handle very large hierarchies, too.

You might notice a couple of other new values under GameObject. There’s a new “Components” group that shows all Component instances attached to the GameObject, such as Transform or any attached MonoBehaviour derived scripts. And there’s a new “Scene path” value that shows the location of the GameObject in the object hierarchy, as a path from the root object. This is also shown for Component instances, making it a little easier to see where a GameObject or Component is being used in the object hierarchy.

Scene path item showing the location of the game object in the object hierarchy

Finally, if the current object being debugged – i.e. this – is a Component such as a MonoBehaviour script, then Rider will add another “automatic watch variable”, this.gameObject. This does exactly what the name implies and shows the this.gameObject property. It would be very easy to expand this and find the gameObject value, but this simple addition pulls some useful context up to the top level to make it quicker and easier to find.

Improving summary info

So far, we’ve looked at only one way the debugger has to display values – the Variables and Watches tree view. This can show complex objects such as a class or struct by expanding the value to show fields and properties. But when collapsed, the debugger shows a brief summary, hopefully showing the most relevant information. You can also see this summary info in tooltips, and drawn on the editor surface.

Debugging summary information in tooltips and on the editor

This content comes from the object itself, either as the output of ToString() (which by default is simply the name of the object’s type, but can be overridden in derived objects), or from the [DebuggerDisplay(...)] attribute, which specifies field or property names in a string.

Unity doesn’t make much use of [DebuggerDisplay], but it does override ToString() in a number of places. Unfortunately, the output of ToString() is sometimes more appropriate to user facing output than it is to debugging. For example, the implementation of Vector3.ToString() defaults to showing the float values of x, y and z with the F1 format specifier. This means that each float value is shown to one decimal place. While this makes for a nice looking output, it’s not helpful when the summary and expanded view of an object are so different.

Vector3 showing rounded values for x, y and z in summary information

So Rider provides alternative summary information for a number of Unity types. This includes the Vector types, as well as Rect, Bounds, Plane, Ray and so on. Any Unity type that outputs float values at F1 has been overridden to show the field values at full precision, making it much easier to see, at a glance, what the value actually is.

Vector3 showing full values for x, y and z in summary information

There are other types that Rider overrides like this. Transform is a great example. Transform derives from UnityEngine.Object, which provides an implementation of ToString that shows the name of the object and its type. The name of a component is always the name of the game object it’s attached to, so for a transform, this quite often shows something like "Cube (UnityEngine.Transform)". Wouldn’t it be better to show the local position, rotation and scale without having to expand the object?

Transform showing local position, rotation and scale in summary information

Rider provides overrides for a few other Object based types – the MeshFilter component quickly shows the vertex count and Scene will show the scene name and file path. GameObject shows its name and the activeInHierarchy and layer properties. Objects deriving from Behaviour show the enabled flag, plus the name of the GameObject they’re attached to, surfacing the most important details to tooltips and summary information.

Summary information for GameObject and Component

And don’t forget that you can add debugging information for you own types too – override ToString() or use [DebuggerDisplay(...)] to provide summary information, or use [DebuggerTypeProxy(typeof(...))] to specify an object to provide different fields and properties when you expand an object. And the [DebuggerBrowsable(...)] attribute can be used to hide a type member. See the docs for more information.

Round up

Of course, many of Rider’s other debugger features work just fine with Unity projects, too. Things like Pin to Top and setting the next statement, conditional and dependent breakpoints (these work great with pausepoints, too!), debugging decompiled code, and also the new Pin to Frame (although sadly, not the Data Breakpoints in that blog post, as that requires an API that is only available in .NET Core on Windows).

And finally, the best kind of new feature – we’ve removed something! Both GameObject and Component have a number of obsolete properties that do nothing but throw exceptions. They’re hidden from code completion with the [EditorBrowsable(EditorBrowsableState.Never)] attribute, but not hidden from the debugger with [DebuggerBrowsable(DebuggerBrowsableState.Never)]. You might have seen this in older versions of Rider – the exceptions aren’t causing any problems, but they do add a lot of noise. Rider now filters them out. Much cleaner!

Rider removes obsolete properties that just show exceptions

Before we finish, it’s important to point out that all of these features are available when debugging your game in the editor, but not everything is available when debugging players. This is because the debugger can’t always get the information – some features require APIs that only exist when the application is running in the Unity editor, and others require fields or properties that are stripped from player builds. If it can get the data, the debugger will show it. If not, it will gracefully fall back, and you’ll see the standard ToString representation of the value.

Oh, and if you don’t want to see this extra information, you can disable it in the Preferences | Languages & Frameworks | Unity Engine settings page.

In the next few posts on Unity, we’ll take a look at analysis of Burst enabled code, the long awaited shader support, and perhaps we’ll have a quick round up of other changes. In the mean time, download Rider and try out the updated debugger on your own projects. We’re looking forward to your feedback!

Webinar – Xamarin, MAUI and the reactive MVVM between them

$
0
0

Join us Thursday, September 17, 2020, 16:00 – 17:00 CEST (10:00 AM – 11:00 AM EDT or check other timezones) for our free live webinar, Xamarin, MAUI and the reactive MVVM between them, with Rodney Littles, II.

Register now and get a reminder, or join on YouTube

Xamarin Forms is the .NET cross platform technology that allows you to write an application in C# and target various operating systems, primarily mobile. The recommended architectural approach for .NET applications adhering to SOLID principles is Model-View-ViewModel (MVVM). ReactiveUI is a MVVM framework based on Reactive Extensions, which are a cross language approach to functional programming. During this talk we will take a trip through Xamarin, MVVM, ReactiveUI and show the future state of Xamarin, MAUI.

(more…)

Viewing all 221 articles
Browse latest View live