Rider keeps removing the "partial" modifier from my classes
How do I prevent this? I've looked through options, but I see no formatting option regarding this. Rider is wrong that it isn't needed..my app won't compile without these and I'm tired of readding them over and over. Ideas? I'm a C# newbie and already fighting the IDE. 😢
One example (in namespace ui.Views):
```xml <UserControl xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:vm="clr-namespace:ui.ViewModels" xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" xmlns:system="clr-namespace:System;assembly=System.Runtime" xmlns:fluent="clr-namespace:FluentIcons.Avalonia.Fluent;assembly=FluentIcons.Avalonia.Fluent" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="ui.Views.MainView" x:DataType="vm:MainViewModel"> <Design.DataContext> <vm:MainViewModel /> </Design.DataContext>
<!-- snipped for brevity --> </UserControl> ```
Keeps removing partial from below. Also note that it cannot locate InitializeComponent()
for some reason (the IDE that is), however, it compiles just fine.
```c# using Avalonia.Controls;
namespace ui.Views;
// ReSharper disable once PartialTypeWithSinglePart public partial class MainView : UserControl { public MainView() { InitializeComponent(); } } ```
UPDATE: That special comment above fixes it!
UPDATE 2: Changing my .csproj file fixed it...as in any change to it at all. Apparently Rider got "buggy" and needed a project refresh. Any number of restarts didn't do it, but just touching that file and now it is perfectly happy with all my files with zero warning/errors.