"Can't find package JetBrains.Tests.Platform.NETFrameWork 4.5 Expected: not null But was: null" in highlighting tests

After I upgraded a R# test project to 9.1, I get the following errors in my highlighting tests.
Note that I get the same errors when I compile and execute the R# 9.1 HeapView tests.

  Expected: not null
  But was:  null


TearDown : JetBrains.TestFramework.Utils.TestLoggerListener+TestWrapperException : Can't find package JetBrains.Tests.Platform.NETFrameWork 4.5 Expected: not null But was: null

--- EXCEPTION #1/2 [AssertionException]
Message = “
  Can't find package JetBrains.Tests.Platform.NETFrameWork 4.5
    Expected: not null
    But was:  null

ExceptionPath = Root.InnerException
ClassName = NUnit.Framework.AssertionException
Data.TempDataPath = C:\Users\Ulrich\AppData\Local\Temp\Qyjimuw
Data.Framework = <null>
Data.ReentrancyGuard.ActionName = DoTestSolution
HResult = COR_E_EXCEPTION=80131500
Source = nunit.framework
StackTraceString = “
  at NUnit.Framework.Assert.That(Object actual, IResolveConstraint expression, String message, Object[] args)
     at NUnit.Framework.Assert.IsNotNull(Object anObject, String message, Object[] args)
     at JetBrains.ReSharper.TestFramework.TestPackagesAttribute.ProcessPackagesInternal(ISettings settings, PackageSourceProvider sourceProvider, FileSystemPath tempDataPath, FrameworkName framework, IEnumerable`1 packages, Boolean inTeamCity)
     at JetBrains.ReSharper.TestFramework.TestPackagesAttribute.<>c__DisplayClass35.<ProcessPackages>b__34(FileSystemPath tempPath)
     at JetBrains.TestFramework.Projects.PackagesCache.<>c__DisplayClass1.<GetOrCreatePackageManager>b__0()
     at JetBrains.Util.CollectionUtil.GetOrCreateValue[TKey,TValue](IDictionary`2 dictionary, TKey key, Func`1 funcNew)
     at JetBrains.TestFramework.Projects.PackagesCache.GetOrCreatePackageManager(Hash hash, Func`2 createPackageManager)
     at JetBrains.ReSharper.TestFramework.TestPackagesAttribute.ProcessPackages(PackagesCache packagesCache, FileSystemPath testDataPath, FrameworkName framework, IEnumerable`1 packages)
     at JetBrains.TestFramework.Projects.BaseTestEx.InitDataPackages(BaseTest test, IEnumerable`1 packages)
     at JetBrains.ReSharper.TestFramework.BaseTestWithSolution.InitSolution(Func`2 createSolutionConfiguration, IReuseSolutionInTestsComponent reuseSolutionInTestsComponent)
     at JetBrains.ReSharper.TestFramework.BaseTestWithSolution.InitSolution(Func`2 testSolutionConfiguration)
     at JetBrains.ReSharper.TestFramework.BaseTestWithSolution.<>c__DisplayClass1d.<DoTestSolution>b__14()
     at JetBrains.Application.IShellLocksEx.ExecuteWithReadLock(IShellLocks thіs, Action F)
     at JetBrains.TestFramework.BaseTest.<>c__DisplayClass2e.<RunGuarded>b__2d()
     at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)


--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “
  Can't find package JetBrains.Tests.Platform.NETFrameWork 4.5
    Expected: not null
    But was:  null

ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
  at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
     at JetBrains.TestFramework.BaseTest.RunGuarded(Action action)
     at JetBrains.ReSharper.TestFramework.BaseTestWithSolution.DoTestSolution(Func`2 testSolutionConfiguration, Action`2 test)
     at JetBrains.ReSharper.TestFramework.BaseTestWithSolution.DoTestSolution(Func`2 testSolutionConfiguration, Action test)
     at JetBrains.ReSharper.TestFramework.BaseTestWithSolution.DoTestSolution(Func`2 testSolutionConfiguration, Func`2 wrapper)
     at JetBrains.ReSharper.TestFramework.BaseTestWithSingleProject.DoTestSolution(String[] fileSet)
     at JetBrains.ReSharper.FeaturesTestFramework.Daemon.HighlightingTestBase.DoNamedTest2(String[] auxFiles)
     at XmlDocInspections.Plugin.Tests.IntegrationTests.MissingXmlDocHighlightingTestsBase.<>n__FabricatedMethod6(String[] )
     at XmlDocInspections.Plugin.Tests.IntegrationTests.MissingXmlDocHighlightingTestsBase.<>c__DisplayClass2.<DoNamedTest2>b__0(IContextBoundSettingsStore settingsStore) in c:\Users\Ulrich\U\ulrichb-XmlDocInspections\Src\XmlDocInspections.Plugin.Tests\IntegrationTests\MissingXmlDocHighlightingTestsBase.cs:line 53
     at JetBrains.TestFramework.BaseTest.ExecuteWithinSettingsTransaction(Action`1 action)
     at XmlDocInspections.Plugin.Tests.IntegrationTests.MissingXmlDocHighlightingTestsBase.DoNamedTest2(String[] auxFiles) in c:\Users\Ulrich\U\ulrichb-XmlDocInspections\Src\XmlDocInspections.Plugin.Tests\IntegrationTests\MissingXmlDocHighlightingTestsBase.cs:line 50
     at XmlDocInspections.Plugin.Tests.IntegrationTests.DefaultSettingsTests.TestClassesAndMembersWithoutDocs() in c:\Users\Ulrich\U\ulrichb-XmlDocInspections\Src\XmlDocInspections.Plugin.Tests\IntegrationTests\DefaultSettingsTests.cs:line 16
     at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
     at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
     at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
     at NUnit.Core.Reflect.InvokeMethod(MethodInfo method, Object fixture, Object[] args)
     at NUnit.Core.TestMethod.RunTestMethod()
     at NUnit.Core.TestMethod.RunTestCase(TestResult testResult)
     at NUnit.Core.TestMethod.RunTest()
     at NUnit.Core.NUnitTestMethod.RunTest()
     at NUnit.Core.TestMethod.RunRepeatedTest()
     at NUnit.Core.TestMethod.RunTestInContext()
     at NUnit.Core.TestMethod.Run(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunAllTests(TestResult suiteResult, EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunSuite(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunSuiteInContext(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.Run(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestFixture.Run(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunAllTests(TestResult suiteResult, EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunSuite(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunSuiteInContext(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.Run(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunAllTests(TestResult suiteResult, EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunSuite(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunSuiteInContext(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.Run(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunAllTests(TestResult suiteResult, EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunSuite(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunSuiteInContext(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.Run(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunAllTests(TestResult suiteResult, EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunSuite(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunSuiteInContext(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.Run(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunAllTests(TestResult suiteResult, EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunSuite(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunSuiteInContext(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.Run(EventListener listener, ITestFilter filter)
     at NUnit.Core.SetUpFixture.Run(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunAllTests(TestResult suiteResult, EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunSuite(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.RunSuiteInContext(EventListener listener, ITestFilter filter)
     at NUnit.Core.TestSuite.Run(EventListener listener, ITestFilter filter)
     at NUnit.Core.SimpleTestRunner.Run(EventListener listener, ITestFilter filter, Boolean tracing, LoggingThreshold logLevel)
     at JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTestRunner.Run(EventListener listener, ITestFilter filter)
     at JetBrains.ReSharper.UnitTestRunner.nUnit.BuiltInNUnitRunner.RunTests(IRemoteTaskServer server, Dictionary`2 tests, Dictionary`2 fixtures, List`1 explicitly, Boolean useAddins, List`1 assemblies)
     at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
     at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
     at System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink.SyncProcessMessage(IMessage reqMsg)
     at System.Runtime.Remoting.Lifetime.LeaseSink.SyncProcessMessage(IMessage msg)
     at System.Runtime.Remoting.Messaging.ServerContextTerminatorSink.SyncProcessMessage(IMessage reqMsg)
     at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessageCallback(Object[] args)
     at System.Threading.Thread.CompleteCrossContextCallback(InternalCrossContextDelegate ftnToCall, Object[] args)
     at System.Threading.Thread.InternalCrossContextCallback(Context ctx, IntPtr ctxID, Int32 appDomainID, InternalCrossContextDelegate ftnToCall, Object[] args)
     at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessage(IMessage reqMsg)
     at System.Runtime.Remoting.Channels.ChannelServices.SyncDispatchMessage(IMessage msg)
     at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(Byte[] reqStmBuff, SmuggledMethodCallMessage smuggledMcm, SmuggledMethodReturnMessage& smuggledMrm)
     at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatchCallback(Object[] args)
     at System.Threading.Thread.CompleteCrossContextCallback(InternalCrossContextDelegate ftnToCall, Object[] args)

1 comment
Comment actions Permalink

You need to add a nuget.config file, as detailed here: https://devnet.jetbrains.com/message/5539431#5539480. This tells the test framework where to download a set of packages that represent different versions of .net.

0

Please sign in to leave a comment.