Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
3.2.0
-
Windows 10 22H2, Visual Studio 2022
Description
Code
CMakeLists.txt
cmake_minimum_required(VERSION 3.16) project(HelloWorld LANGUAGES CXX) add_executable(HelloWorld main.cpp )
Steps to reproduce
- Use CMake to convert the attached project to a Visual Studio Solution. For example : cmake -G "Visual Studio 17 2022" -B sln .
- Open HelloWorld.sln with Visual Studio 2022 (which has Qt VS Tools installed)
- Try to convert the project to a Qt/MSBuild project
Outcomes
Conversion fails with the following exception:
An exception (NullReferenceException) occurred. Message: Object reference not set to an instance of an object. Stack Trace: at QtVsTools.Core.MsBuild.MsBuildProjectReaderWriter.<>c.<get_Globals>b__23_0(XElement x) at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate) at QtVsTools.Core.MsBuild.MsBuildProjectReaderWriter.get_Globals() at QtVsTools.Core.MsBuild.MsBuildProjectReaderWriter.V3FormatVersion() at QtVsTools.Core.MsBuild.MsBuildProjectReaderWriter.ConvertToV3()