resharper

Error encountered when running dotcover console runner using xunit as the target executable

我与影子孤独终老i 提交于 2019-12-11 14:49:57
问题 I am using the DotCover console runner to check out the code coverage. Here is the command line I used - C:.\dotcover.exe cover /TargetExecutable="C:\packages\xunit.1.9.2\ lib\net20\xunit.runner.msbuild.dll" /TargetArguments="C:\bin\myConfigFolder\My.Tests.dll" /Output="c:\temp\CoverageReport.html" /ReportType="HTML" But I am getting the message below - JetBrains dotCover Console Runner v2.7.4.24. Copyright (c) 2009-2015 JetBrains s.r.o. All rights reserved. [JetBrains dotCover] Coverage

Resharper: Ambiguous Invocation

妖精的绣舞 提交于 2019-12-11 13:25:45
问题 Using Resharper I get the following message: Ambiguous InvocationSolution ITicket.sln Project ITicket ITicket\frmMainTicket.cs:530 Ambiguous invocation: void DisableAllFields() (in class frmMainTicket) void DisableAllFields() (in class frmMainTicket) match I am new to coding and could use a little help. If I understand this correctly it is basically saying that I am calling a method and it is unsure what method I should use? I have never used Resharper before. Maybe I am confused on what

What does “access to disposed closure” mean here?

*爱你&永不变心* 提交于 2019-12-11 12:07:11
问题 Why does Resharper warn me about "access to disposed closure" in the following code sample: using (SqlCommand command = new SqlCommand()) { command.Parameters.Add("@temp", SqlDbType.VarChar); Action<string> action = str => { command.Parameters["@temp"].Value = string.Empty; }; } I don't use delegate outside using statement... How to fix this? 回答1: You are referencing command in action , you can use action in somewhere else then in using and reference to disposed command . Resharper is telling

Avoiding “Target type 'type name' is not convertible to base type System.String”

纵饮孤独 提交于 2019-12-11 11:58:41
问题 I am using ReSharper 6.1.1 and having the solution wide analysis enabled in my project shows up with an error: Target type 'CustomControls.XSButton' is not convertible to base type System.String The code compiles and runs fine since a built in TypeConverter in WPF takes care of this, shortly described in a ReSharper bug report. Note that the XSButton is declared in an assembly in my solution - It's not a WPF built in type. This is the xaml code that causes this error at the <Style> tag.

Is it possible to change the way Resharper 4.5 formats code in aspx/ascx files?

╄→гoц情女王★ 提交于 2019-12-11 11:23:36
问题 I find myself constantly pressing ctrl-z to undo the automatic formatting that happens in templates. For example Resharper would like to format a foreach loop like this: <% foreach (var product in Model.Items) { %> <li><%= product.Name %></li> <% } %> This is fine in c# code files but it just seems messy in templates. I would prefer to format it like this <% foreach (var product in Model.Items) { %> <li><%= product.Name %></li> <% } %> 回答1: Open Visual Studio Goto Resharper > Options... >

resharper test runner - how to execute by category?

人走茶凉 提交于 2019-12-11 10:56:00
问题 Resharper version 7.1 Visual Studio 2012 Ultimate Two part question: Q1: When I select "run unit tests" in the solution explorer resharper automatically opens a test fixture runner and executes ALL test fixtures. However, I have categorized tests in to two categories: 1) "long running" and 2) "short running". Is there a way that after performing these steps that I can have the test runner execute "short running", only? Q2: With the test fixture runner open, I select Group By "Categories". I

Resharper or CodeRush - global rename

筅森魡賤 提交于 2019-12-11 10:13:22
问题 Is there a way to rename all methods, properties etc. suggested by R#. I have code that I converted from java and all methods and properties are in the format like this "onBeforeInsertExpression" and I want them to follow camel casing that is common in .NET. This question is also for CodeRush. 回答1: No, unfortunately there isn't a way. Resharper's Code Cleanup / Reformat Code options work nicely for formatting, namepaces, etc, but will not do any automatic member renaming. You're kinda stuck

How to reset foreach autocomplete behavior in ReSharper

久未见 提交于 2019-12-11 09:49:41
问题 How to reset the behavior back to original in ReSharper? I have no idea how it got broken (maybe a bug since the ReSharper update) but normally after typing foreach hitting the TAB and typing in list and hitting TAB again I would expect foreach(var VARIABLE in list) { } but instead this happens foreach (var VARIABLE in list { } This doesn't happen with ReSharper disabled. My current version is 2017.2 Ultimate. If I could get away without resetting all the ReSharper settings that would have

How to tell Resharper to pick up CSV files for Unit Tests from the correct subfolders?

萝らか妹 提交于 2019-12-11 08:24:26
问题 I have written a unit test that uses a CSV file to read in data using the "DataSource" and "DeploymentItem" Attributes pointing to a CSV file in a subfolder. However, when initially building the project the files are deployed to two different locations, one in the root and the other in the subfolder (Which I now figured is because of Resharper apparently doing it's own copy into root). When I then later change the CSV file with different data and save and re-build the project (having the CSV

Visual Studio shows errors in external files

℡╲_俬逩灬. 提交于 2019-12-11 08:05:20
问题 This is driving me nuts for some time now. I use Resharper a lot to dig into library code. The downside to this killer feature is that my Error List gets populated with errors in the source code from those libraries. So if my own solution fails to compile, the Error List windows first shows a pleiade of errors from those external files, only to put the actual compilation errors at the bottom. It's really annoying, because after such a fail, I always have to scroll down through that window to