Questions tagged [jetbrains-rider]
131 questions
0
votes
1 answer
MediatR - IRequestPreProcessor - Incorrect type is used for contextual logging
I'm using MediatR's IRequestPreProcessor to log the requests. However, I'm getting the following warning at ILogger logger:
Incorrect type is used for contextual logging
How do I fix it?
public sealed class LoggingBehaviour :…

nop
- 4,711
- 6
- 32
- 93
0
votes
1 answer
JetBrains Rider Environment Variable not being set launchsettings
I am using JetBrains Rider and attempting to set environment variables for an integration test project I have. In my launchsettings.json I have it set but in code when I use Environment.GetEnvironmentVariable("COSMOSDB_KEY") it returns null.
{
…

Dr Schizo
- 4,045
- 7
- 38
- 77
0
votes
1 answer
Unity Default.ruleset Doesnt Work As Expected / Roslyn Analyzer
Roslyn analyzers and source generators
Expected
Actual
Unity 2021.3.11f1 / Rider 2022.2.3
Analyzers: ErrorProne.NET.CoreAnalyzers
Only logging Assets\Subfolder\RethrowError's error. When I remove the subfolders code then logs the Assets\Rethrow's …

Enescan BEKTAŞ
- 1
- 3
0
votes
0 answers
Rider automatically places attributes on the same line as the property
When I write following code in Rider:
[JsonProperty("errors")]
public IDictionary> Errors { get; } = new Dictionary>();
and I format the code, Rider places atrribute and property on one…

Patrik Mihalčin
- 3,341
- 7
- 33
- 68
0
votes
0 answers
Assign header value to variable
I am trying to assign a header value to a variable from Rider HTTP Client but bet an exception. How to assign value to a variable?
The line that gives exception
let s = response.headers.valueOf("content-disposition");
Actual exception
Test…

Tomas
- 17,551
- 43
- 152
- 257
0
votes
1 answer
Rider automatically formats List initializer to not contain spaces causing compilation errors
When I write following code in Rider:
new List { Guid.NewGuid() } and I type ; at the end, Rider automatically formats this into new List {Guid.NewGuid()};
Note that spaces were removed before and after both braces.
Compiler doesn't like…

Patrik Mihalčin
- 3,341
- 7
- 33
- 68
0
votes
0 answers
How do you use .editorconfig in a team environment with a diverse team?
Question
Do you use .editorconfig rules as informational warnings or linting rules? In a diverse team with developers of different levels of experience, we found undesirable results with both options.
Background
After adding .editorconfig from…

flipdoubt
- 13,897
- 15
- 64
- 96
0
votes
0 answers
JetBrains Rider IDE shortcut for printing
In JetBrains IntelliJ, one can write just sout and the IDE write System.out.println();
I know that C# can be used in different types of projects.
Some projects require printing things in console and thus we need to print things like…

ibda
- 376
- 3
- 15
0
votes
0 answers
JetBrains Rider equivalent to Visual Studio 'New Solutions Explorer View'
I have just recently switch to JetBrains Rider from Visual Studio. In visual studio (I believe it's from version 2022), I am able to open a new solution explorer window for each project in a solution (right click the project and select 'New solution…

Anthony
- 39
- 6
0
votes
0 answers
How to run a remote container in JetBrains IDE
Please forgive me as this is my first time working with docker and containers so I may mess up some terminology.
So I am trying to take on a project that is found in a remote docker container, and as far as I know, working remotely in a container is…
0
votes
0 answers
rider fail to hotreload asp.net core project
i'm using rider 2022 to develop my asp.net core 6 webapi project, when i modify mo code while debugging:
public Users Query(string key)
{
int i = 1; // add this line
var res = _dal.Where(it=>it.UserName==key).First();
return res;
}
and…

zhenghao li
- 79
- 6
0
votes
2 answers
How to undo 'Exclude from Coverage Results'?
I've excluded some functions from the coverage result by right-clicking them in the unit test coverage tree and picking "Exclude from Coverage Results".
Now I want them back. The documentation suggests clicking the "Show all nodes link on top of the…

DarthGizka
- 4,347
- 1
- 24
- 36
0
votes
1 answer
Go to C# project file from Solution view in Rider
I have a solution which contains many C# projects.
When I open it in Rider and I switch to Solution view, how can I easily go to particular project file (*.csproj) or solution file (*.sln)?
JetBrains Rider 2022.2.1

Patrik Mihalčin
- 3,341
- 7
- 33
- 68
0
votes
1 answer
Where to find "InOut\\" path in csharp?
I have a charp file and have created in JetBrainsRider -> Console Project.
In main method, there is code as below
static void Main(string[] args)
{
string FileNamePrefix = string.Empty;
string InfoFileName =…

Aakash Patel
- 549
- 5
- 19
0
votes
3 answers
How can use Ef Core Migration for JetBrains Rider
I'm using JetBrains Rider IDE. I want use code first but I can't find Package Manager Console in JetBrains Rider. I want to work on EF Core.

Escanor
- 1
- 4