Why Does Visual Studio think This Directory Is A Shortcut?

a_unique_name 401 Reputation points
2022-10-01T08:20:52.833+00:00

Hello Folks

Developing on Windows 10 Pro, Visual Studio 2022 Community updated a day or two ago, Win32 no MFC.

Here's a weird one.

Today I attempted to make Visual Studio do what It's done countless times for me over the last two decades.

I wanted to create a new item, a header file, and place it in a directory for the project's header files.

When I attempted to identify the location in the Add New Item window the header file showed up as a shortcut!

Clicking on the item that shows up in that window does nothing, beyond highlighting the item to show it's selected.

Ok, what does File Explorer tell us

It looks like any other folder, there are the header files, listed exactly as expected.

It's the same directory, I copied and pasted the location from the Add New Item to the File Explorer.

246559-screenshot-1.png

Here you can see the Add New Item screen where I selected to add a new header file and the Location window with the destination identified as a Shortcut.

Below that is the File Explorer window where the same folder is just a folder.

Ok, I'm used to working around Windows and Visual Studio's limitations.

Let's just rename the application's entire directory and bring in the backup I made yesterday.

That should get me back to work.

Surprise! Look at this"

246645-screenshot-2.png

The problem persists with with the recovered project, that was working yesterday.

One more thing to try. Let's try to and a new item to the project that failed. Will it still think a destination folder is a shortcut if it's in a different directory?

Looks like I'm not going to be able to add a third screenshot, even though the size of this post's three images is a meg. The limit is supposed to be 3 meg.

Stay tuned for the reply to see how that worked out.

Any idea what's happening?

Thanks
Larry

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,637 questions
{count} votes

1 answer

Sort by: Most helpful
  1. a_unique_name 401 Reputation points
    2022-10-02T11:07:10.697+00:00

    Hello again folks:

    I find this forum difficult to use compared to the MSDN we had, and I believe I accidentally deleted an answer which I'll repeat here:

    IgorTandetnik-1300 · 13 hours ago

    Your directory just happens to contain a shortcut to itself; probably a drag-and-drop accident. If it bothers you, just delete it. Anyway, on your first screenshot - just click Select Folder, it'll do what you apparently want it to do.

    My response, which I apparently also fumbled away:

    Thank You Igor:

    That did it!

    This shortcut was buried in the contents of the destination folder, which is also named "net_results_includes".

    246724-the-answer.png

    I didn't notice this, but I had no idea what I needed to be looking for.

    I've never created shortcuts.

    Thanks
    Larry

    P.S.

    Does anybody else find this forum difficult?

    It refused to allow me to insert my 3rd image, even though the total size of all three images would be about one megabyte.

    I was unable to find a button that would allow me to promote Igor's original comment to the status of Answer.

    I can't get the font feature to work when I try to add bold or italic text.

    Or is it just me?

    0 comments No comments