Form designer view is not available in visual studio 2019 C# CMake project

前端 未结 1 730
说谎
说谎 2021-01-23 02:55

I\'m trying to port my C# Windows Form project from .csproj to CSharp CMake CMakeLists.txt. I successfully made CMakeLists.txt similar to here. The only problem is when the proj

相关标签:
1条回答
  • 2021-01-23 03:38

    Your second image (from your CMake-generated project) is in a different View than the first image. The first image is the Solution View, in which the Form1.cs and Form1.Designer.cs files are grouped to show that the Form Designer is available. The CMake (second) image is showing the Folder View, which does not group the two files together.

    CMake does not control what view you see in Visual Studio, your Visual Studio IDE controls this. The toolbar across the top of Solution Explorer has a button (called "Switch Views") to switch from a solution view to a folder view (and vice versa). You can use this to switch your perspective back to Solution View so the Form Designer is shown.


    Note: This button has a bug in Visual Studio 2019 (see here), so switching back to Solution View may not work as expected. I've worked around this issue by simply closing and re-opening the Solution.

    When you open the solution file (via File > Open > Project/Solution...), your default View should be the Solution View, and the Form Designers for your forms sources should be accessible. If you open the solution by doing File > Open > CMake..., your default View will be Folder View, which is not what you want.

    0 讨论(0)
提交回复
热议问题