You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SLVS v2019 throws an exception gathering compiler configuration.
This might/might not be related to the fact that the project was a VS2017 that was opened in VS2019 (see repro steps below). Either way, SLVS shouldn't throw an exception.
Repro steps
Please provide the steps required to reproduce the problem
In VS2019, open DirectX-Graphics-Samples\Samples\Desktop\D3D12HeterogeneousMultiadapter\src\D3D12HeterogeneousMultiadapter.vcxproj
You should be prompted to upgrade the project. Click Cancel
Open D3D12HeterogeneousMultiadapter.cpp
Expected behavior
The file is analyzed and issues reported.
Actual behavior
No issues. Exception logged in output window:
Unable to collect C/C++ configuration for D:\repos\other\ms\DirectX-Graphics-Samples\Samples\Desktop\D3D12HeterogeneousMultiadapter\src\D3D12HeterogeneousMultiadapter.cpp: System.ArgumentNullException: Value cannot be null.
Parameter name: rule
at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.Rules.ConfigurationCustomBuildTool..ctor(IRule rule, ConfiguredProject configuredProject)
at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCCustomBuildToolShim..ctor(String contextName, IRule rule, VCConfigurationShim configScope, VCFileShim fileContext)
at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCFileConfigurationShim.<<get_Tool>b__20_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.ApartmentMarshaler.<>c__DisplayClass9_0`1.<<Invoke>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()
at Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run[T](Func`1 asyncMethod, JoinableTaskCreationOptions creationOptions)
at Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run[T](Func`1 asyncMethod)
at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.ApartmentMarshaler.Invoke[TResult](Func`1 method)
at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCFileConfigurationShim.get_Tool()
at CallSite.Target(Closure , CallSite , Object )
at SonarLint.VisualStudio.Integration.Vsix.CFamily.CFamilyHelper.FileConfig.TryGet(ProjectItem projectItem, String absoluteFilePath)
at SonarLint.VisualStudio.Integration.Vsix.CFamily.CFamilyHelper.TryGetConfig(ILogger logger, ProjectItem projectItem, String absoluteFilePath)
Known workarounds
Analyse in VS2017, or
click "ok" when asked to upgrade.
Related information
SonarLint for VS Version: v4.20+
The text was updated successfully, but these errors were encountered:
This seems to be related to the PlatformToolset value in the vcxproj file. Without upgrading, the value is v141 (in two places in the file) -> cannot analyse files in the project. Also, the project property window doesn't look right:
Changing the PlatformToolset to v142 fixes the issue. The files can be analysed and the project property window looks as normal:
So this might be a more general problem to do with platform toolsets not being available.
Closing as Won't Fix. This seems to be a general problem with project upgrade, as the Property Pages do not load properly in VS itself. The workaround is to click 'ok' when prompted to upgrade (and can select 'No upgrade' as an option).
Description
SLVS v2019 throws an exception gathering compiler configuration.
This might/might not be related to the fact that the project was a VS2017 that was opened in VS2019 (see repro steps below). Either way, SLVS shouldn't throw an exception.
Repro steps
Please provide the steps required to reproduce the problem
https://github.com/microsoft/DirectX-Graphics-Samples.git
DirectX-Graphics-Samples\Samples\Desktop\D3D12HeterogeneousMultiadapter\src\D3D12HeterogeneousMultiadapter.vcxproj
You should be prompted to upgrade the project. Click
Cancel
D3D12HeterogeneousMultiadapter.cpp
Expected behavior
The file is analyzed and issues reported.
Actual behavior
No issues. Exception logged in output window:
Known workarounds
Related information
The text was updated successfully, but these errors were encountered: