How to debug Roslyn source generator in VS 2022? - visual-studio

Context
I was able to debug my source generator in VS 2019 by setting the project properties/debug Launch to Roslyn Component, then the target project combo to one of my consuming project:
Now this feature seems to be missing in VS 2022, I can not create a launch profile using the Launch Profile UI with similar settings.
Question
How can I debug Roslyn source generator in Visual Studio 2022?

I got it working in VS 2022 17.1.0. Follow this instructions:
https://github.com/JoanComasFdz/dotnet-how-to-debug-source-generator-vs2022
Also make sure in the Visual Studio Installer that you have installed the .NET Compiler Platform SDK.

Related

How can I introduce my VS 2019 to Unreal Engine?

I have installed VS 2019 and UE4 v.4.11.0 but when I want to open a C++ project in UE4 I see that it can not recognize my VS2019 compiler.
How can I fix it?
Support for Visual Studio 2019 has been added to Unreal Engine 4.22: Release Notes.
After updating to Unreal Engine 4.22 or newer, ensure that you have set the Source Code Editor to Visual Studio 2019 in the Editor Preferences.
Additionally, if you have created your project with an earlier version of Visual Studio, you have to regenerate your project files: right click your .uproject file and click Generate Visual Studio project files.

Load CPS project in integrated shell

I have a custom language and debug editor extension for Visual studio, that I'd like to be able to distribute using the visual studio integrated shell.
However, I am unable to open the custom project files using the integrated shell application:
Unsupported
This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.
For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK.
- scripts, "F:\path\to\example.myproj"
No changes required
These projects can be opened in Visual Studio 2015, Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1 without changing them.
- scripts, "F:\path\to\example.Example_sln"
Everything works fine when the extension is loaded as part of visual studio 2015 directly.
The custom project type was created using The Visual Studio Common Project System
Thanks to user rodya0 on Github, I have an answer:
Add the following:
$ShellFolder$\Common7\IDE\CommonExtensions\Microsoft\Project; \
to the PkgDefSearchPath section of the .pkgdef file in your isolated shell project

Visual Studio 2017 Build Tools - Architecture and analysis tools

I'm encountering an issue when trying to build .modelproj projects using msbuild via Visual Studio 2017 Build Tools.
This is the error I see:
...[ProjectName].modelproj error MSB4057: The target "Rebuild" does
not exist in the project.
I have found this thread relating to some issues opening .modelproj files via the IDE in VS2017 - Visual Studio 2017 not opening .modelproj - however is there a way to get this fix onto just Build Tools rather than the full IDE? Ideally we'd like to avoid having to install the full IDE when all we require are the Build Tools on the server.
however is there a way to get this fix onto just Build Tools rather than the full IDE? Ideally we'd like to avoid having to install the full IDE when all we require are the Build Tools on the server.
You can not build Modeling projects using msbuild via Visual Studio 2017 Build Tools. Because starting with Visual Studio 2017, the UML Designers have been removed from Visual Studio, If you are a significant user of the UML designers, you can continue to use Visual Studio 2015 or earlier versions.
You can get the detail information from Port, Migrate, and Upgrade Visual Studio Projects and Microsoft Application Lifecycle Management:

Debugging information does not match, when using v60 platform toolset inside Visual Studio 2013

I am using Visual Studio 2013, but I'm in need to develop an old project using the Visual C++ 6.0 compiler.
For this purpose, I have been using Daffodil with no problem on Windows 8.1 for a while.
(You can read more how to use the VC++ 6 compiler in newer Visual Studio versions in this StackOverflow question: Is it possible to use the VC++ 6 compiler in Visual Studio 2012?)
Now I got a new Windows 10 machine, where I reinstalled Visual Studio 6, 2010, 2013 and Daffodil.
Using v60 build tools (Visual C++ 6.0 compiler), project gets compiled fine.
However, when I try to debug, VS says that "debugging information does not match", and I am unable to set breakpoints etc., but:
PDB file is there, same folder and name of debug executable;
Application built in Debug mode, with debug information enabled;
Debugger works fine when using Visual Studio 2010 or 2013 build tools;
Debugger works fine if opening the project inside Visual C++ 6 IDE.
I tried reinstalling all Visual Studio versions as well as Daffodil, but didn't solve.
Any clue what could the problem be?
Finally I actually found a working solution!
for VS 2013:
Enable "Native Edit and Continue"
under Tools->Options->Debugging->Edit and Continue
for VS 2015:
Enable "Use Native Compatibility Mode"
under Tools->Options->Debugging->General

Set QMake Parameters in Visual Studio 2010

I installed Visual Studio 2010 Professional and Qt 4.8.0 for VS2010 plus Qt VS Add-in 1.1.10 yesterday and still can't figure out how to:
Edit project (.pro) files from within Visual Studio.
Specify/modify QMake parameters for Debug and Release builds from within Visual Studio.
Can anyone please tell me how to do the above tasks?
It's always a good idea to try the documentation first. Here is a link to the documentation of the Visual Studio add-in for managing Qt projects.

Resources