"Cannot update project reference" error introduced by Visual Studio 2012 - build

I had a command line build which was working fine with Visual Studio 2010.
I am now trying the same solution with Visual Studio 2012.
When I build it via the command line:
devenv MediaPlayer.sln /build "Release|Any CPU"
I get a pile of errors with the website:
37>------ Build started: Project: C:...\Web\, Configuration: Debug
Any CPU ------
37>Cannot update project reference ''. Source project
not available.Cannot update project reference ''. Source project not
available.Cannot update project reference ''. Source project not
available.Cannot update project reference ''. Source project not
available.Cannot update project reference ''. Source project not
available.Cannot update project reference ''. Source project not
available.Cannot update project reference ''. Source project not
available.Cannot update project reference ''. Source project not
available.Cannot update project reference ''. Source project not
available.Cannot update project reference ''. Source project not
available.Cannot update project reference ''. Source project not
available.Validating Web Site
But then I open the SAME solution in Visual Studio 2012, and build it. It builds.
I then run this same build via the command line, and it builds.
So I check it in, and let the build process fetch it into the build directory, and I get THE SAME ERRORS.
At this point, I'm stumped as to what to do next. Any pointers?

When the Visual Studio 2012 build output says
Cannot update project reference
It's actually saying
Something went wrong, and you know what?
I'm not going to tell you what it is!
BWAHAHAHAHAHAHAHAHAHAHAHAHA
After a full days search, it came down to a third party library (Castle.Windsor.dll) not being in the .bin directory. I don't know why this problem showed up with Visual Studio 2012 and not Visual Studio 2010. My guess is that in Visual Studio 2010, this was automatically copied over because it was a dependency of another project the website was dependent on.
I manually created a .refresh file for Castle.Windsor.dll and Castle.Core.dll, and now it builds.

I also experienced this same error when trying to build a solution in VS 2012.
I had a solution that I upgraded from VS 2010 to VS 2012 and then started removing some long dead projects. VS 2012 became "confused" with this removal and deemed that a website project in the solution needed a reference to '', which was not available.
To resolve this, I undid the above mentioned changes to the solution, opened it up in VS 2010, removed the long dead projects and built successfully and then closed VS 2010. I was then able to open/update the solution in VS 2012 and work without issue.

Related

Visual Studio 2013, error MSB8020: The build tools for Visual Studio 2010 cannot be found

At the start I'd like to note that I've spent some time researching this issue and suggested solutions for similar questions like this one didn't help me.
Problem background
I need to migrate a Firebreath plugin project (which I haven't worked on previously) from PC_1 to PC_2.
As far as I'm aware the project was started on PC_1 on Visual Studio 2010 and later moved to Visual Studio 2013 Pro. There's one solution consisting of 19 projects. I have an instruction which says that in order to get the plugin installer I should first Build project_x and after that Build project_y_WiXInstall. Both steps work without any issues on this machine.
Then there's PC_2 which had Visual Studio 2015 Community installed before I started working on it. I've removed it, installed Visual Studio 2013 Pro (version 12.0.21005.1 REL - exactly the same as on PC_1), moved all of the needed files and I'm trying to get rid of all of the compilation errors. So far I figured out I had to install Cmake 2.8, Windows Driver Toolkit 7.1 and manually override an incorrect VCTargetsPath MSBuild variable
Problem description
Currently when I try to compile the project on the new machine I get these two errors (this is an image link since I can't embed images yet on this account). I'm not sure what's going on with the first error message since it looks incomplete and the file CUSTOMBUILD doesn't exist, but I'm not bothered by it too much since the previous compilation error I fixed also had a similar "artifact" as the first error and it disappeared after fixing the second one.
The covered part of the second error message is the project path. The error origin (Microsoft.Cpp.Platform.targets file, line 64) looks like this:
<!-- Error out if toolset does not exists in Visual Studio 2010 or 2012 -->
<VCMessage Code="MSB8020" Type="Error" Arguments="$(_CurrentPlatformToolsetShortName);$(PlatformToolset)" Condition="'$(ToolsetTargetsFound)' != 'true'" />
What didn't help
The error description suggests using an Upgrade Solution... option, but there's no such thing when I right-click the solution
As an accepted answer for the question I've posted at the start of my post suggests, I've checked the Properties of all 19 of my projects (including the project ZERO_CHECK) but their Platform Toolset is already set to Visual Studio 2013 (v120).
I've also tried changing the Platform Toolset to inherit from parent or project defaults for all of the projects. This resulted in it switching to Visual Studio 2010 (v100) (not installed) and after that I've right-clicked on the projects and chose Upgrade VC++ compiler and libraries. After this the Platform Toolset was back to the Visual Studio 2013 (v120) but it didn't help with the compilation error.
As a NON-accepted answer for the question I've posted at the start of my post suggests, I've tried searching for all of the occurrences of 10.0 and V100 in all of my .vcxproj files to replace them but I haven't found any occurrences of them.
[EDIT]
I just got an idea to try building the project with MSBuild from the command line. There's a bit more info compared to errors inside Visual Studio, so maybe it will help with resolving the issue: https://pastebin.com/JhN3dXM3
So the thing you're missing here is that FireBreath projects are built using CMake -- the actual contents of the build directory should always be completely temporary and never stored in source control. To build the project on a new computer you need to run the prep command again from scratch.
If the previous maintainer changed the build files manually and/or migrated it to a newer version of visual studio without using cmake to do it then they did some very ugly things and all bets are off... good luck.
This is why all the firebreath documentation (I wrote most of it) strongly urges that the build directory be transient and you always do project file updates in cmake.
Hope that helps!

solutions wont build after updating visual studio 2017

My project was working fine before I updated to the new release of VS 2017. After updating, my solutions opens but wont build and when I try to build, it says that the version of visual studio are not compatible.
what can I do? Or does anyone know how to uninstall the update so i can get my solution working again
Error message
A Project with an output type of class library cannot be started directly. In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project,.

Using UE4 with Visual Studio 2017

I recently did some cleaning of my drives. I decided to install visual studio 2017 after cleaning the drives up. I have been trying to continue work on my old UE4 project using the engine pulled from GitHub. I tried rebuilding the project with VS2017 which I know is not fully supported yet. I did run into quite a few problems, including the missing corecrt.h files. I reinstalled the Windows SDK to fix this.
The current problem is a new missing file called windows.h, and I believe it is missing due to the build tools looking for the wrong version of the SDK. I was wondering, has anyone else successfully integrated Visual Studio 2017 with their UE4 project after running into similar problems?
-- Edited due to poor grammar.
As I know Version 4.15 supports both Visual Studio 2015 (default) and Visual Studio 2017. If you are building the Engine from source code, you would want to open a command prompt after running Setup.bat and run the command GenerateProjectFiles.bat -2017. This will give you a Visual Studio 2017 solution for the Engine.
To use Visual Studio 2017 for projects, you can set your preference for which version projects use by going to Edit -> Editor Preferences -> General -> Source Code and choosing Visual Studio 2017 in the Source Code Editor setting.
If regenerating the Engine's VS project files doesn't help. Try regenerating your own UE4 project's VS project files.
With Visual Studio and UE4 closed, find the .uproject file, right click and select Generate Visual Studio project files.
Open the solution, make sure your UE4 game (e.g. MyProject) under the Games folder is set as the StartUp project (right click, Set as StartUp project), then try a compile.

How to solve: The "Microsoft.VisualStudio.ProjectSystem.References.UnresolvedBuildDependencyProjectReference" reference could not be resolved?

In the Solution Explorer, the vcxproj projects that have references, show a warning symbol on each of the references associated with the project. When the reference is highlighted, the properties panel indicates that the Full Path is:
The Microsoft.VisualStudio.ProjectSystem.References.UnresolvedBuildDependencyProject Reference" reference could not be resolved.
If the "..." box is pressed, the same error messagebox is shown and I am unable to select a new reference. I have tried deleting the reference and adding it again, but the result is the same. When new projects references are added, the result is the same.
All this happens when I compile using the Visual Studio 2008 (v90) toolset. If I compile using the Visual Studio 2015 (v140) toolset, the Full Path to the referenced library is shown correctly.
Some Background:
I upgraded my project from Visual Studio 2008 to Visual Studio 2015. This project contains a mix of managed and unmanaged with type .vcxproj. On this machine, the Visual Studio 2008 redistributable has been installed. This enabled me to compile using the Visual Studio 2008 (v90) toolset. My intention is to first compile my project with my VS2008 settings within VS2015 (For restrictive reasons, I have to use the v90 toolset). Thus, I configured the VC++ directories accordingly. There is no Linker option in the Configuration properties of the linking project. In the properties of the reference, the following configurations are enabled:
Copy Local - True
Copy Local Satellite Assemblies - False
Reference Assembly Output - True
Link Library Dependencies - False
Use Library Dependency Inputs - False
Full Path - The "Microsoft.VisualStudio.ProjectSystem.References.UnresolvedBuildDependencyProjectReference" reference could not be resolved
I ran into the similar issue. In my case just closing the solution and opening it again fixed the issue.

How to include a project to another project in visual studio 2012

In my visual c++ project i include some codes of other projects.I got confused about how to do next step.Should i add projects or reference project.
You can directly add another project to current solution.
From Visual studio -----> File->Add->Existing Project..