Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vs 2015 cannot go to metadata definition and it shows one or more errors occurred

Tags:

It works when I click go to definition on the code that exists but it doesn't work if I click one in the metadata such as String, List.
Pressing ALT+F12, a blank page appears.
Pressing F12 shows:

one or more errors occurred

enter image description here

like image 332
fish_tree Avatar asked Aug 07 '15 08:08

fish_tree


People also ask

How do I fix Visual Studio 2010 metadata problems?

Visual studio often suffer from a problem of going to metadata rather than your project if you shift location where you are building the project, ie you may have several versions to test things out. Simply delete the reference and immediately add it back and everything will be sorted out. The marked solution does not always work.

What is the directory for metadata in Visual Studio 2019?

As noted in comments elsewhere, the directory is v16 if you're running VS2019. Visual studio often suffer from a problem of going to metadata rather than your project if you shift location where you are building the project, ie you may have several versions to test things out.

Why does F12 take Me to metadata after a project reference?

At that point the errors disappeared but F12 took me to metadata. The issue was a dependency in the project being referenced that conflicted with a dependency in the referencing project. I manually removed dependencies from the project being referenced until one of them resolved the errors in the referencing project.

Why is my project not loading to the actual code?

The issue was a dependency in the project being referenced that conflicted with a dependency in the referencing project. I manually removed dependencies from the project being referenced until one of them resolved the errors in the referencing project. After that I was able to F12 to the actual code, and the project would load without errors.


1 Answers

This is a bug being tracked at Microsoft's bug tracker as well as on the Roslyn issue tracker. It is caused by Microsoft only testing C# with space-based indentation.

The so-called "Workaround" is miserable, but still, it is to change your settings from using tabs to spaces.

There are a plethora of other issues (Namely with the C# Auto Formatter that cause tab-based work to be terrible in VS2015 until a patch comes out.

Edit:

There is now an extension available on VS Gallery, GoToDefinition Fix, which will serve well as a temporary fix for this issue.

Edit:

Visual Studio 2015 Update 1 CTP and RC variants both fix this issue, but the RC is the latest and should be installed instead of CTP if you are running it. Many formatting issues are addressed by these updates, and tabs are, basically, usable again.

like image 190
Zoey Avatar answered Oct 11 '22 18:10

Zoey