0

I've got a solution with several references, but some of them stopped working when I opened Visual Studio today. The build error I get is:

Reference required to assembly 'ReferenceName, Version=X.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXX, Retargetable=Yes' containing the type 'ReferenceType'. Add one to your project.

I checked the properties of the affected references, and the values for descriptions and local filepaths became blank. Furthermore, these were .NET references, but were treated as COM references.

I tried to remove and add the references back, but one of the references gets a visual studio error message saying

a reference "Reference.ocx" can't be added, Please make sure that the file is accessible and that it is a valid assembly or COM component.

Another issue I have is that the re-added references do not get re-added the same way as the original references. They now include the "Interop" in their filenames in their reference names , whereas before the Interop was excluded. The added references can compile, but it still doesn't seem to be working properly.

The thing is, I have several versions of the same solution. When I load earlier and older versions of it into Visual Studio, the exact same reference problems surface. But on other machines with Visual Studio, the loaded projects build and compile just fine. So it seems to be something that happened specifically to my workstation that is causing my issues. And I also have another solution that I can compile, but doesn't work properly in that its reference calls gets exceptions.

I've searched for and tried every suggestion related to my error messages I've come across on forums with no success. Is there a reference cache causing these issues?

user3080777
  • 3
  • 1
  • 6
  • Looks like the Net Library is corrupted or version doesn't match settings in project. Start by going to installed applications and looking for "Microsoft .Net Framework XX". Then check target Framwork in Project properties and set to one of Net Versions installed. – jdweng Jul 09 '16 at 19:41
  • The version does match, and the Target Framework's .Net version is correct. How can I fix a corrupted .Net Library? – user3080777 Jul 09 '16 at 20:26
  • In installed program you can right click on Net and select repair. Probably better to check with msdn forums where there are experts. – jdweng Jul 09 '16 at 20:32

1 Answers1

0

The issue was resolved by re-registering the specific references in Visual Studio.

user3080777
  • 3
  • 1
  • 6