solutions wont build after updating visual studio 2017 - 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,.

Related

MyProject.dll is not a valid win32 application

I have copied a C++ solution folder written with visual studio 2013 to my Pc and tried to run it (I mean VS Debugging) with VS 2022. the solution Contains 5 projects but I just target one of them so unloaded the rest and set the one as Startup project and this error happened.
Error Image
Solution file is working well on first pc and project is not a win32 project its x64 (I don't know much from win32 or x64).
Unable to start program. [VALUE].dll is not a valid Win32 application error in Visual Studio 2017
According to this question I tried selecting project, setting as startup, repairing VS, installing vcredist_x64 but non helped.
After Running, VS make Debug folder in solution Directory not the project "LP_Dll\x64\Debug" (LP_Dll is the solution name) without any .exe file, and the error path is exactly this folder, can it be from that?
Project properties the "Configuration Type" was mistakenly changed to .dll.

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!

Unhandled exception at 0x74E733AB (ucrtbase.dll) in OpenClaw.exe

I wanted to tinker this open source remake of the famous Claw.
Visit https://github.com/pjasicek/OpenClaw
Before I start with how I've cloned this game and tried to build it, I'm new to the open source community. I did the following things.
I cloned the repository.
Opened the project using Visual Studio 2017 Community edition and I changed the Configuration to Release and platform to Win32.
I then built the libwap solution without any errors.
Then I used CMake 3.11.0 to generate the required files for the Box2D solution and then generated it and then the Box2D build was a success.
I built the Midiproc manually and finally, I tried building the entire solution.
It threw a MSVCR120D.dll missing error and I copied all the .dlls from the game's release folder https://github.com/pjasicek/OpenClaw/releases
Now the game runs just fine when I launch it from the File explorer, but when I try to launch it from Visual Studio 2017, it throws the following error.
Check out this image:
How do I run the game from Visual Studio? Have I misconfigured the Visual Studio?
If you need any more details on what I did, please let me know.
[EDIT] I want to configure Visual Studio to be able to run the release and modify the source code so I can tinker it and try to understand how the game works internally.
I cloned the repository again and did a clean compilation of all the solutions. Turns out there was a problem when I copied/overwritten all dlls from the release build. Now, the game builds and executes fine.
Thanks for the help.

Compiling VS2015 project with VS2010 Compiler

Ok so I am using VS2015 and upgraded an old VC++ 2010 project to run and compile just fine with VS2015. The project is a windows form project using CLR.
I recently discovered that the project will now not run on a vista machine which until recently was what I was doing the development on. I'm guessing the main culprit is the lack of .NET 4.5 on the vista machine. So I decided to try and compile it with VS 2010 toolset and compilers to see if it would work on this machine.
I downloaded and installed all the tool chains SDK 7.1 and the 7.1 update so now when I go into the
project properties > platform toolset
I have multiple options to compile for VS 2015 v140, VS 2013 v120, SDK7.1 etc and VS 2010 v100.
The problem I have is that when attempting to compile I get the following errors.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(297,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(62,5): error : Required file "" is missing.
A secondary problem I came across is that I switch between managed String^ and regular std::string. To do this, I am using marshalling. When selecting the VS2010 toolset, the following code generates errors.
#include <windows.h>
#include <msclr/marshal.h>
#include <msclr/marshal_cppstd.h>
using namespace msclr::interop;
This obviously has knock on effects for parts of my code where I wish to marshal strings between managed and std.
Anyone got any suggestions on how to fix either of these problems? Thanks
Ok, so just going to go ahead an post my solution for this. There is no need to use the VS2010 V100 toolset.
First, I updated the target machine to .NET 4.6. I think the latest is 4.6.2.
I then created a Setup Project for my Solution and called it 'Prog Setup'. I included "primary output" and "resource satellite DLLs" within the setup projects' 'Detected Dependencies'. The wizard was helpful in setting this up.
Next, Right Click on the Setup Project, select 'View > Launch Conditions', Right Click on .NET Framework, select 'Properties'
Now check 'version' is set to the same version as main project. In my case 4.5.2.
Finally, right click on the setup project and select 'Properties', Now select 'Configuration dropdown > Release', Click 'Prerequisites' and select .NET 4.6, VC++ 14 Runtime Libraries (x86 / x64), Windows Installer 4.5.
Ok, now from the menu bar 'Build > configuration manager', ensure both the setup project and main project are checked under the 'Build' column to ensure both projects are built.
Run the build / re-build project. Using the standard VS2015 v140 Toolset.
In the project solution folder, locate the following
VS2015 > Projects > Project Name > Prog Setup > Release
this folder contains an application titled 'Setup' and my 'Prog Setup' Windows Installer Package.
Having done all the above, I copied both packages to a USB stick and then on the target machine, ran the Application 'Setup'.
This then went and downloaded and installed the VC++ 14 Runtime Libraries on the target machine. Following this, it then automatically ran Prog Setup which installed the actual program software and voila... it now runs on the target machine.

Missing MFC71.DLL for new empty VC++ Console Project

I am trying to get an slightly older project running again. I used the code last summer just fine. Unfortunately I did not keep the VC++ project files, just the code. As such I created a new VC++ console project and selected the "empty project" option in the process. Upon adding the code and pointing the compiler and linker to the appropriate folder I compile successfully. From there I attempt to debug and receive the message
The program can't start because MFC71.DLL is missing from your
computer. Try reinstalling the program to fix this problem.
From what I see this DLL is in the Visual Studio .NET 2003 which as far as I can tell my project should have no dependency on. I am using a robotics simulation library called callisto which I suppose could depend on it. However that project seems to be gone so I can't confirm as much from the project website. How does one go about using MS development tools to determine as much? In the event that it does not, what other possible reasons would a new project depend on such an old DLL?
Note that if you are using that library in form of DLL (already compiled code that internally depends on redists of VS 2003), you can verify this by using the Dependency Walker (it is a simple .exe file that you can download here: http://www.dependencywalker.com/ and just drag-n-drop this DLL on it).
Also note that you don't need to install whole Visual Studio. Redistributable package for VS 2003 will do.
EDIT: "The Visual C++ 2003 runtime was not available as a seperate download" ~ check Where to download Microsoft Visual c++ 2003 redistributable