Perforce integration breaks after adding MSTest Project

Hello,

I have an existing Solution that includes multiple projects, which have Nuget dependancies.  The entire solution, along with the projects, are in Perforce.  This Solution works fine with Rider's Perforce integration.

However, after creating a brand new MSTest Project and adding it to the Solution, Rider starts complaining, and the Version Control tab no longer functions properly. (The changelist no longer updates and doesn't reflect the files' status).  If I remove the MSTest Project, everything is happy again.

Below is an excerpt of the errors I found in Rider's logs.  I don't understand why adding a MSTest Project why Perforce would want to sync the `.nuget` directories.

Any help would be appreciated!

```Path '/Users/stang/.nuget/packages/mstest.testadapter/1.3.2/build/_common/...' is not under client's root '/Users/stang/Perforce/nettest'.
/Users/stang/Perforce/nettest/g4protosimTests/... - no file(s) resolved.
/Users/stang/Perforce/nettest/g4protosim/... - no file(s) resolved.
/Users/stang/Perforce/nettest/UdpLib/... - no file(s) resolved.
/Users/stang/Perforce/nettest/LiteNetLib/LiteNetLib/... - no file(s) resolved.
Path '/Users/stang/.nuget/packages/mstest.testadapter/1.3.2/build/netcoreapp1.0/...' is not under client's root '/Users/stang/Perforce/nettest'.

com.intellij.openapi.vcs.VcsException: /Users/stang/Perforce/nettest/nettestserver/... - no file(s) resolved.
Path '/Users/stang/.nuget/packages/mstest.testadapter/1.3.2/build/_common/...' is not under client's root '/Users/stang/Perforce/nettest'.
/Users/stang/Perforce/nettest/g4protosimTests/... - no file(s) resolved.
/Users/stang/Perforce/nettest/g4protosim/... - no file(s) resolved.
/Users/stang/Perforce/nettest/UdpLib/... - no file(s) resolved.
/Users/stang/Perforce/nettest/LiteNetLib/LiteNetLib/... - no file(s) resolved.
Path '/Users/stang/.nuget/packages/mstest.testadapter/1.3.2/build/netcoreapp1.0/...' is not under client's root '/Users/stang/Perforce/nettest'.

at org.jetbrains.idea.perforce.perforce.PerforceRunner.createCorrectException(PerforceRunner.java:1777)
at org.jetbrains.idea.perforce.perforce.PerforceRunner.checkError(PerforceRunner.java:1809)
at org.jetbrains.idea.perforce.perforce.PerforceRunner.checkError(PerforceRunner.java:1781)
at org.jetbrains.idea.perforce.perforce.PerforceRunner.getResolvedFiles(PerforceRunner.java:1582)
at org.jetbrains.idea.perforce.application.PerforceChangeProvider.processConnection(PerforceChangeProvider.java:276)
at org.jetbrains.idea.perforce.application.PerforceChangeProvider.doGetChanges(PerforceChangeProvider.java:94)
at org.jetbrains.idea.perforce.application.PerforceChangeProvider.getChanges(PerforceChangeProvider.java:69)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.actualUpdate(ChangeListManagerImpl.java:780)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.iterateScopes(ChangeListManagerImpl.java:693)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.lambda$updateImmediately$14(ChangeListManagerImpl.java:595)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.updateImmediately(ChangeListManagerImpl.java:556)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.lambda$new$0(ChangeListManagerImpl.java:146)
at com.intellij.openapi.vcs.changes.UpdateRequestsQueue$MyRunnable.run(UpdateRequestsQueue.java:225)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:224)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:220)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$100(BoundedTaskExecutor.java:26)
at com.intellij.util.concurrency.BoundedTaskExecutor$2.lambda$run$0(BoundedTaskExecutor.java:198)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:224)
at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:194)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2019-05-09 15:42:35,776 | DEBUG | ContentModelStore | 15:42:35:776 Finish updating state for 1 ms, details:
ContentModelStore.CalculateState for 1 ms 100%```

3 comments
Comment actions Permalink

I forgot to mention, this issue was found on Rider 2019.1.1.

0
Comment actions Permalink

Seeing the same issue in 2020.3.3, we narrowed down the reproduction steps to upgrading a PackageReference of Microsoft.NET.Test.Sdk from 15.9.0 to 16.0.9. 

WIth the upgrade Rider adds the following content directory to riderModule.iml

<content url="file://$USER_HOME$/.nuget/packages/microsoft.net.test.sdk/16.1.0/build/netcoreapp1.0" />

This content directory is then interpreted as part of the project by the perforce integration and it gets stuck if your USER_HOME/.nuget isn't apart of your p4 workspace (which it usually won't be).

This appears to be a problem with content directories, as we had an existing content file that did not have this problem.

<content url="file://$USER_HOME$/.nuget/packages/nunit3testadapter/3.11.0/build/netcoreapp1.0/NUnit3.TestAdapter.dll" />

I'm not sure if either of these directories or files should be added to riderModule.iml, or if we've setup our project reference wrong (missing an ExcludeAssets?), but our upgrade is non-critical so we've solved this by leaving the test package alone. 

 

0
Comment actions Permalink

Hello,

Thanks a lot for the steps to reproduce. I have created a YouTrack issue, where you can track our progress with this problem: https://youtrack.jetbrains.com/issue/RIDER-60725.

Meanwhile, please check what mapping is selected for your project at Preferences | Version Control. If it's  <Project>, try change it manually to your project directory: click on <Project> and then pencil picture and save Rider settings. Does it help? 

0

Please sign in to leave a comment.