Thanks for sharing us more information.
Since you didn’t get any error message, I suspect that some settings are not fully compatible.
In default project, I can see that the version of the referenced NuGet packages(like "Microsoft.CodeAnalysis.XXXXX") is 3.X. On your side, did you reference a higher version of these NuGet packages(for example version 4.X)? If so, please try to use a previous 3.X version of the package and test again.
Sincerely,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.