Reference error

I was working on a project using a static library created by me (I'm using Visual Studio 2019 version 16.4.3)

It always worked on other projects, but since I've added it to my new one I'm getting problems with references.

The main project references to a library which references to another one, and both are included in the solution.

The problem is that the second reference (from a library to another one) show an error (a yellow triangle) and when I click on it it says

 
The Microsoft.VisualStudio.ProjectSystem.References.UnresolvedBuildDependencyProject Reference" reference could not be resolved 


How to solve it?
I'm getting crazy...

I also tried to fix it directly from the library but nothing changed
Hello Foxel,

I ran across this and have some questions:

I was working on a project using a static library created by me
What version of VS is this static library created with?

It always worked on other projects
Again what version of VS are the other projects and static library created wit?

Just think out loud here. I first started with VS2015 even created a static library and everything worked fine. When I upgraded to VS2017 I found that I had to create a new solution and project in VS2017 because the 2015 version would not transfer to 2027. I also had to create and recompile the static library under 2017 before it would work.

I am not familiar with VS2019, but am wondering is it has the same problems as going from VS2015 to VS2017.

Just a thought. And also this moves this to the top of the que where someone else may see it and have some better advice.

Andy
I don't remember the exact version but for sure it was created with VS2019 because I started using that.

I tried to rebuild it too but nothing...

So should I rewrite my library afresh?
Hello Foxel,

My bad, I apologize. When I said version I was being more general meaning 2015, 2017 or 2019 not the specific version number of the program. I do not believe that different versions of VS2019 should be a problem, but I have stranger things happen.

Now I am as stumped as you are, so as a thought I have copied text from a message and pasted it into a text file, using Notepad, only to find that when the program read the file it crashed because of something unseen in the file.

For a small file I solved the problem just by typing the information into a new file. And once or twice I was able to type at the end of the file and delete the original information and that worked.

For larger files I use a Hex editor to look at the individual bytes to see if there is anything that should not be there.

If you do not have a Hex editor I use HxD https://mh-nexus.de/en/ It is free and simple to use. Worth getting if you do not have anything.

I have code files for , (.cpp) and (.hpp), and found a line of code that looks fine, but the IDE and compiler have a problem with it. I have commented out the offending line and written the exact same thing underneath it and problem solved. And then a time or two I have found that deleting the commented line of code ended up causing a problem with the new line, so I had to put back the deleted line for it to work.

Just had another thought. If one library calls a function in another library the header files for the libraries may need to be reversed or one of the header files may have to include the other to make it work.

Not knowing how big the libraries are I would I would consider rewriting and creating a whole new solution and library files as the last resort.

You could try creating a new solution and library, with a new name, and copy the code need into it compile it and see what happens.

I feel bad because I do not have the experience of some of the others with something like this and I am not sure what to suggest. Most times I do better having something to work with to figure out what is wrong.

Andy
Topic archived. No new replies allowed.