Cannot add new files from template in VS2022

I'm using ReSharper 2022.3, just updated Visual Studio 2022 to the version 17.4.3.

I used to be able to use ReSharper's template capability but after updating, it seems like I can't add any new files using the templates I defined in ReSharper anymore. Anybody has any idea what's causing this?

Ctrl+Alt+Ins doesn't work too, "ReSharper Is Thinking" message appears and nothing happens after it disappears.

Going through Extensions > ReSharper > Edit > Create New File also yield the same results.

 

I tried with Visual Studio 2019, works just fine.

0
7 comments
Hello,
thank you for contacting us.
Does it happen in all solutions or only in specific ones?
Thank you!
0

Thanks for the reply. I didn't check if it's solution specific when I posted.

But this morning (GMT+8) it seems to be that it resolved on its own. The menu is available again. I wonder what happens.

0
Hello Adam,
thank you for letting me know.
Please feel free to contact us in case of any problems or questions.
Thank you!
0

I am experiencing this problem also. But mine has not fixed itself. I recently upgrade Visual Studio 2022 to v17.9.5, and ReSharper to version 2023.3.4. It is not happening in all solutions/repos.

0

Hello Doug Belkofer, thank you for your question. Does the issue happen for a newly created solution?

Does the Alt+Ctrl+Insert shortcut work for you? If it doesn't work, then please try to collect a log file using the steps below and send it to us using the “Submit a request” button above.

  1. Select ReSharper | Navigate | Go to Action;
  2. Type logger /all;
  3. Enable Verbose logging level;
  4. Reproduce the issue using “Alt+Ctrl+Insert”;
  5. Provide the log file (its location is specified at the top of Logger Configuration tool window);
  6. Don't forget to disable the logging.
0

Maria Pleskunina 

The issue (in my case) stems from having Show All Files selected, rather than the standard filter view, and when there are no files in the directory

Here you can see in my case, I do not have any files in the directory where I want to use the New from Template function.

If I add a file to that directory, it is still not enough to enable the option

However, If I include that file in the project

It is now enabled so I believe the logic behind the enablement of the option has to do with if the folder is specified in the <project_name>.filters file.

I hope this helps guide any fix for this issue because I prefer using this over Visual Studio add file because it tends to add files with A CRLF line ending which I prefer not to have, and to be honest, Microsoft should ditch the CRLF for new files (or at least have an option)

 

0

Hello U4056495, thank you so much for the detailed steps! I found an issue that describes the same problem and updated its description. Please comment or vote for it to get notifications about status updates: RSCPP-15305 C++ file templates do not work on empty filters/empty folders. Please let me know if you have any question. Thank you!

0

Please sign in to leave a comment.