JetBrains Rider unable to detect UnitTests - jetbrains-ide

I am using JetBrains Rider to run unit tests for a .net Core project. And for some reason, it is failing to recognize any of the test cases in the solution.
These test cases were being detected before and now suddenly they are not. I restarted the Rider and rebuilt the solution and it seems that the problem does not go away.
Any suggestions on how to debug this?

I had exactly this problem with Rider a while ago. My teammates could still run our NUnit tests (both in Rider and Visual Studio) but I couldn't. The Run Unit Tests menu items were all disabled and the run icons that usually appear in the left margin alongside the test fixture class and test methods didn't appear.
It turned out to be a bug in Rider causing an incompatibility between versions of .NET Core and the Microsoft.NET.Test.Sdk library. I'd run the Visual Studio Updater and my teammates hadn't, so I was on the latest version of .NET Core and they weren't.
Here's the bug I filed with JetBrains. As you can see, they migrated it to ReSharper but the bug affected Rider too. Although it was fixed at the time I think I've seen it again since.
To find out if you've got the same problem, try the following:
Make sure .NET (Core) and the Microsoft.NET.Test.Sdk library are both up-to-date.
If this doesn't work, downgrade Microsoft.NET.Test.Sdk to an older version (anything before 16.3.0 worked for me).

We had that problem and we use MSTest. We tried rebuilding, cleaning, etc. and none of that worked. But the following did work.
Comment out '[TestClass]'
Rebuild
All the menus were back to functioning as expected. I hope that helps future me when I come back into this question in a couple of months.

Related

Error related to resources_ap after upgrading to Android Studio 3.4

I upgraded Android Studio 3.4 today. I am no longer able to run the the app. I have cleaned the project, restarted Android studio many times. I have also invalidated cache to no avail.
I am getting the following error when installing the app:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexWithInstantRunSlicesApkForDebug'.
> java.lang.RuntimeException: java.io.FileNotFoundException: E:\...\app\build\intermediates\instant_run_split_apk_resources\debug\instantRunSplitApkResourcesDebug\out\slice_1\resources_ap
Could anyone offer a tip on how to remedy this?
Edit:
I have two projects with different behaviors related to this issue:
Project A initially had this issue. I disabled Instant Run per the answer, the problem was solved. I enabled Instant Run later, and Project A is still working fine.
Project B also had this problem that has been remedied by turning of Instant Run. However, its problem will occur as soon as Instant Run is turned on. I do not what difference between these two projects results in this. One suspect is library C project. Library C is a part of Project A (i.e. its source code, resources are in Project A). However, Project B uses the aar of Library C as a module.
Issue should be fixed in Android Studio 3.4.2.
EDIT: Here is my old answer on how to fix it in Android Studio 3.4.0 and 3.4.1:
Using Gradle 5.4 instead of 5.1.1 helped me with this error.
Update gradle-wrapper.properties file with:
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip
Please note I haven't tested older Gradle versions, so it's possible even (for example) 5.2 version will work. You can see all Gradle releases here - https://gradle.org/releases/
Switching off Instant Run as a workaround (File/Settings/Instant Run) seems to eliminate the problem.
According to OP it is possible to turn Instant Run back on without the problem recurring for some projects.
There is no need to turn off Instant Run.
Just delete the '.gradle' directory in the project and build directory inside the 'app' module.
Perform Clean Project and Rebuild Project.
This will solve the issue.
This is caused by "instant run" feature in android studio 3.4 , you can disable it by:
Open the Settings or Preferences dialog. Navigate to Build, Execution, Deployment > Instant Run. Uncheck the box next to Enable Instant Run
Enjoy...!
Go to your project folder and move everything from ...\app\build\ to some other folder outside project. (to clear build folder with back up)
In my case clearing the build folder solved the probem, till then i was disableing the instant Run option for every new install.
I tried both "Gradle 5.4" and "Switching off Instant Run" solutions but they didnt work until I turned on "Wait for Debugger" option until "Developer Options" in my phone (Huawei Mate 10). I have confirmed that this is only working with "Instant Run" off as well.
This problem happened to me on Windows. I solved it by disabling instant run.
I also have the same Android Studio version on Linux and it works fine with instant run enabled.
This is fixed in 3.4.2. Just update to the latest version of Studio. https://androidstudio.googleblog.com/2019/07/android-studio-342-available.html
This same error happened when I updated to Android Studio 3.4.2, I updated the tools-build-gradle to 3.4.2 and the problem disappear.
Switching off Instant Run as a workaround (File/Settings/Instant Run) seems to eliminate the problem.

errors using Subversion in Android Studio 2.2

I recently upgraded to Android Studio 2.2 and attempted to use it on an existing project that had been checked out of a Subversion 1.9.3 repository. After the upgrade, multiple different Subversion-related operations that used to work fine are failing with various errors. Some things still work, others are met with a variety of errors. For details on some of the errors, see this link:android studio 2.2 issue 223358
Is anyone else seeing errors with Subversion operations (commits, etc) after upgrading to Android Studio 2.2? Has anyone upgraded and can still successfully use Subversion functions from within Studio 2.2? Even better, has anyone else seen problems and found a fix :-) ?
Thanks in advance for any info.
I have all this problems too. How i solved it:
In Android Studio Settings - Subversion setting - tab General I have switch off checkbox "use command line client" (Also switch off "Enable interactive mode" checkbox). After that svn browsing begin to work fine. Than I import Project to Studio from svn server and in new imported project all svn features works fine.

Visual Studio 2012 Express is suddenly "incompatible with this version of Windows"?

I'm running Visual Studio Express 2012 on Windows 7. I've been running it with no problems for several months now.
Last Friday, when I shut down my PC, a lot of Windows updates were installed. This morning, when I started up and opened a VS2012 solution, I got this error message:
This program has known compatibility issues
...
Visual Studio 2012 Express for Windows Desktop is incompatible with this version of Windows.
There's a button for Run Program, and when I click it, the solution opens normally. I haven't changed anything about my Windows configuration. This happens every time I open a solution. Did MS release a flawed patch in the batch of updates that got applied last Friday?
EDIT: I'm not sure why people are voting to close this question. The answer that's been linked to isn't related to my issue; that answer seems to pertain to trying to open a VS2012 project in VS2010. I'm trying to open a VS2012 project in VS2012. If you really think that the question needs to be closed, please let me know why in the comments, so that I can change it appropriately.
The .NET updates installed on Friday were:
KB2805226
KB2805221
KB2804582
UPDATE: I gave up, more or less, and clicked the "Don't show this window again" checkbox on the error window. Visual Studio seems to be running ok.
I received the same message on Visual Studio 2012 Premium (on PC where Windows 7 re-installed in last month) - the suggested fix was "Update for Microsoft Visual Studio 2012 (KB2781514)" which seems to have fixed it
www.microsoft.com/en-us/download/details.aspx?id=36020
Install Visual Studio 2012 Update 2 solved my problem. No previous update needed for this one. Here's the descriptions of the update.
(I'm using Windows 8, installed all important updates for Windows, then tried repair Visual Studio in Programs and Features, problem still here until installed Update 2.)
I've been running VS2012 for about 2 weeks now since I clicked the "Don't show this window again" button. I haven't encountered any problems. For now I'm going to consider this an adequate solution.
I've just installed VS2012 at home and came across the same problem. The 1st solution I found is that webdeploy doesn't work after Oct 2013 and I should install Web deploy V3.0.
Done that, no joy. I let Win7 search for compatibility solution on-line and it found an update patch (KB2781514) which did work.
This is the same solution as mentioned before by #John M.
Should've looked here first, just posting this again if someone comes across this again these days..
Thanks to all other users who helped with this thread.
I had a similar problem with VS2012 awhile ago it was along the lines of:
"this solution has no errors and could potentially be damaged"
*yet still opened fine.
as far as fixing it went I performed a clean install of VS2012 and the error has not bugged me since in saying that I am probably out of date at this time and may find if I updated I would have the same issue.
Food for thought.
Even i had the same problem on Windows 7 with Visual studio 2012.
Installed Update for Microsoft Visual Studio 2012 -KB2781514 and it fixed the issue.
Note: "Just clicking on Run program was also opening up the solution file without any issues in my case."

Project dependencies not loading in Visual Studio 2012

I'm not sure if this is a add-on/extension issue but I'm having a heck of a time with Visual Studio 2012 on two computers. I believe it is DevExpress CodeRush causing the problems as it seems to work fine when I uninstall it but I'm not 100% sure.
I startup VS 2012, answer YES to the Get Latest from TFS 2012 and the solution right-click the solution node in the Solution Explorer and choose Project Dependencies... - it shows nothing checked. Of course the build will fail. I close and restart VS 2012 and then it shows. I typically do this through the course of the DevExpress option to clear the solution cache which causes the solution to reload.
Does anyone have any suggestions as to what may cause the project dependencies to get lost yet after a restart they are fine again? Is there something I need to delete and rebuild to try and resolve this?
The fix (so it seems) is to not check the option in VS source control settings to do a Get Latest when opening the solution. It seems to prevent the solution from initializing properly. I will consider reporting this to Microsoft Connect.
As I know CodeRush does not change anything in the Project Dependencies dialog. However you can write to DevExpress Support Center (http://www.devexpress.com/Support/Center) for a more detailed answer and research.
I also recommend you include a project and a video that illustrates the problem (if possible).
I was facing same issue. However got fixed after deleting .suo file from solution folder

Visual Studio 2012 disassembly error dialog

This is a general error with Visual Studio 2012 that has come up recently. While debugging any C++ application and after hitting a break-point, clicking "Go To Disassembly" will produce the following error dialog:
Disassembly cannot be displayed for the source location. Uncaught
exception thrown by method called through Reflection.
I've tried reinstalling and repairing VS2012 with no effect. Even the simplest console application will show the same error, so it's not specific to a project and has to be a problem with the system configuration. At this point I'm just clueless what module Visual Studio is failing to load - google hasn't provided any solutions either.
The only possible link could be my recent removal of older .NET Framework redistributable packages (since I've got .NET 4.5 SDK and multi-target pack, I figured the older ones weren't necessary).
I really need the disassembly view working (it worked quite well before) and I was hoping someone has come across this problem.
Solved: After downloading Visual Studio 2012 Update 2, the problem solved itself. I guess it was a bug with the vanilla release.

Resources