Relative Content

Tag Archive for visual-studio-2022

ASP.NET How to change default data directory

I have a project using an Access database. I go to data connections in VS and create a connection, I select the db which has a path of [my project folder]app_datastats.accdb and test the connection and it works fine, so I save it. VS then doesn’t allow me to access the DB, it puts a red X on it under data connections in server explorer. When I go to modify the connection, the path has been changed to |DataDirectory|stats.accdb.

Visual studio Project folder default name is always “New Folder1”, why?

I am new to Visual Studio and C.
Recently I discovered on the Internet a new way to organize my Projects in
Folders and kind of ignoring the filters.
This made my program folder structure much better.
Now I know where .exe, .obj etc. files reside in my hard disk directories and how to rearrange them.
From what I can recall my problem started after I corrected a Solution or Project file structure.
Since then when I have selected “Show all files” and I am creating a New Folder for my Project, the New Folder default name is “New Folder1” instead of “New Folder”.
I do the following:
Project Name Right click on it, Add -> New Folder a new folder is created with the
default name “New Folder1”.
See below the screenshots for clearer representation :

How to stop Visual Studio 2022 from not just overwriting the highlighted text

I’d often highlight the text I want to replace so that the moment I begin typing, it gets replaced. However, Visual Studio 2022 has introduced some messed-up, undesired behaviour whereby if the first character I happen to type over the highlighted text is a double quote, curly brace, bracket or square bracket, instead of replacing the text with that, it wrongly wraps the highlighted text in that! How do I turn this annoyance off?

VS2022 losing code changes after closing solution

Recently any changes I make to a solution vanish after closing Visual Studio. I’m using Git as the repo.
For example, I add 3 new files, write code, save, build, run, debug. All my files are saved locally as expected. But if I close Visual Studio and re-open it, All my changes are lost and the files are missing.
I’ve been using Visual Studio for 23 years and I have never had this happen before.

VS 2022 (17.10.0) crashes on opening solution

VS 2022 is crashing on opening solutions. Loading VS without opening anything and getting the “recent projects” screen is fine. The moment I open a solution file or select to continue without code it freezes and then crashes.

Visual Studio Errors bugging out

Visual Studio 2022 is bugging out when it comes to errors.
The error squiggles are no longer showing under ANY of the errors.
Also, when I click an error item in the Error list, it no longer takes me directly to the error.