Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

VS 2022 Preview 5 error - SDK Resolver Failure NugetSdkResolver
jschreuder
#1 Posted : Wednesday, October 13, 2021 4:04:45 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/5/2015(UTC)
Posts: 42
Location: Australia

Thanks: 14 times
Was thanked: 23 time(s) in 11 post(s)
I'm guessing this is probably a VS issue, since NCrunch was working for me last week on Preview 4.1, but just in case it's something in your control...

Since updating to Preview 5, I'm getting a build error for all projects:

Quote:

System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Build.Exceptions.InvalidProjectFileException: SDK Resolver Failure: "The SDK resolver "NuGetSdkResolver" failed while attempting to resolve the SDK "Microsoft.NET.Sdk". Exception: "System.ArgumentNullException: Value cannot be null.
Parameter name: path
at System.IO.Directory.GetParent(String path)
at Microsoft.Build.NuGetSdkResolver.GlobalJsonReader.GetMSBuildSdkVersions(SdkResolverContext context)
at Microsoft.Build.NuGetSdkResolver.NuGetSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory)
at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.ResolveSdk(Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio)""
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1](IElementLocation elementLocation, String resourceName, T1 arg0)
at Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImportsFromUnescapedImportExpressionConditioned(String directoryOfImportingFile, ProjectImportElement importElement, List`1& projects, SdkResult& sdkResult, Boolean throwOnFileNotExistsError)
at Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImports(String directoryOfImportingFile, ProjectImportElement importElement, SdkResult& sdkResult)
at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement)
at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
at Microsoft.Build.Evaluation.Evaluator`4.Evaluate()
at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(IEvaluatorData`4 data, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary`1 environmentProperties, ILoggingService loggingService, IItemFactory`2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCacheBase projectRootElementCache, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, Int32 submissionId, EvaluationContext evaluationContext, Boolean interactive)
at Microsoft.Build.Evaluation.Project.ProjectImpl.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
at Microsoft.Build.Evaluation.Project.ProjectImpl.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
at Microsoft.Build.Evaluation.Project..ctor(XmlReader xmlReader, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings)
at Microsoft.Build.Evaluation.Project..ctor(XmlReader xmlReader, IDictionary`2 globalProperties, String toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings)
at nCrunch.VSIntegration2010.MSBuildIntegration.BuildableProject2010.Initialise(BuildXml buildXml, FilePath projectFilePath, IDictionary`2 globalProperties)
at nCrunch.Compiler.RemoteBuildRunner.AnalyseComponentBuild(ComponentLoadParameters parameters)
--- End of inner exception stack trace ---
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 nCrunch.TaskRunner.Ipc.IpcMessageProcessor.(CallMethodMessage )
at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.ProcessMessageReturningResult(Byte[] data)
at nCrunch.TaskRunner.Ipc.RemoteInstance.(Byte[] )
at nCrunch.TaskRunner.Ipc.RemoteInstance.Invoke(IMessage msg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at nCrunch.Compiler.IRemoteBuildRunner.AnalyseComponentBuild(ComponentLoadParameters parameters)
at nCrunch.Core.BuildManagement.BuildProcessLauncher..(IRemoteBuildRunner )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , FilePath , String , ExternalProcess )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , EffectiveProcessorArchitecture , GridClientId , BuildSystemParameters , IList`1 , Nullable`1 , GridAddress )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(ComponentLoadParameters parameters, IList`1 customEnvironmentVariables)
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.(EffectiveProcessorArchitecture , String )
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.CreateComponentFromXml(FilePath projectFilePath, ParsedBuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, VisualStudioVersion vsVersion, ComponentUniqueName componentName, TaskSettings componentTaskSettings, Exception parseException, String targetFrameworkForMsbuild, String visibleTargetFramework)


I've sent through a bug report via the menu also if that helps.
9 users thanked jschreuder for this useful post.
spectresystems on 10/13/2021(UTC), b33rdy on 10/13/2021(UTC), willdean on 10/13/2021(UTC), warappa on 10/13/2021(UTC), jonsequitur on 10/13/2021(UTC), paul1664 on 10/13/2021(UTC), Aeriandi on 10/14/2021(UTC), gbarrs on 10/14/2021(UTC), alastairs on 10/21/2021(UTC)
Remco
#2 Posted : Wednesday, October 13, 2021 4:07:40 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,996

Thanks: 932 times
Was thanked: 1258 time(s) in 1171 post(s)
Hi, thanks for sharing this.

In summary, MS broke the API call we were using to load the project files with the new VS2022 release. It doesn't seem they use the API internally, so we're probably alone with this one. I'll update you when the fix is available in the form of a new NCrunch build.
9 users thanked Remco for this useful post.
jschreuder on 10/13/2021(UTC), Dirk Maegh on 10/13/2021(UTC), spectresystems on 10/13/2021(UTC), b33rdy on 10/13/2021(UTC), willdean on 10/13/2021(UTC), jonsequitur on 10/13/2021(UTC), paul1664 on 10/13/2021(UTC), Aeriandi on 10/14/2021(UTC), rgwood on 10/14/2021(UTC)
b33rdy
#3 Posted : Wednesday, October 13, 2021 7:52:02 AM(UTC)
Rank: Member

Groups: Registered
Joined: 6/28/2016(UTC)
Posts: 20
Location: United Kingdom

Thanks: 17 times
Was thanked: 5 time(s) in 4 post(s)
Confirmed the same issue on VS 2022 RC too. Remco, thanks for the quick response!
Remco
#4 Posted : Thursday, October 14, 2021 4:53:32 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,996

Thanks: 932 times
Was thanked: 1258 time(s) in 1171 post(s)
This should now be resolved in NCrunch v4.10 (just released)
8 users thanked Remco for this useful post.
jschreuder on 10/14/2021(UTC), paul1664 on 10/14/2021(UTC), b33rdy on 10/14/2021(UTC), gbarrs on 10/14/2021(UTC), willdean on 10/14/2021(UTC), rgwood on 10/14/2021(UTC), Aeriandi on 10/15/2021(UTC), alastairs on 10/21/2021(UTC)
jschreuder
#5 Posted : Thursday, October 14, 2021 5:06:58 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/5/2015(UTC)
Posts: 42
Location: Australia

Thanks: 14 times
Was thanked: 23 time(s) in 11 post(s)
Remco;15706 wrote:
This should now be resolved in NCrunch v4.10 (just released)


Working great, thanks as always Remco!
4 users thanked jschreuder for this useful post.
Remco on 10/14/2021(UTC), paul1664 on 10/14/2021(UTC), b33rdy on 10/14/2021(UTC), willdean on 10/14/2021(UTC)
David Arno
#6 Posted : Thursday, October 14, 2021 8:44:37 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/14/2021(UTC)
Posts: 1
Location: United Kingdom

Thanks: 1 times
Was thanked: 2 time(s) in 1 post(s)
I too can confirm that v4.10 fixes this issue for me (using VS 17.0.0 preview 5). Thanks for the speedy fix.
2 users thanked David Arno for this useful post.
willdean on 10/14/2021(UTC), alastairs on 10/21/2021(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.093 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download