CMAKE 3.16 Can't fine Visual Studio Instance - visual-studio

I have a cmake project that uses VC 2017 Pro. I have used this cmake successfully in the past. Now back to working on the project and when I bring up cmake-gui and click Configure I get the following error:
CMake Error at CMakeLists.txt:99 (enable_language):
Generator
Visual Studio 15 2017
could not find specified instance of Visual Studio:
D:/Microsoft Visual Studio/2017/Professional
Configuring incomplete, errors occurred!
See also "D:/OpenCV/OpenCV/build/CMakeFiles/CMakeOutput.log".
See also "D:/OpenCV/OpenCV/build/CMakeFiles/CMakeError.log".
Note that the directory listed above for VS is correct. I have looked at many posts and checked everything I can find that seems to relate to this problem but no joy. I have used procmon to examine the registry and file accesses by cmake when I click configure but no clues have emerged.
Cmake seems to know the path to VS and the cmakelists.txt cmakecache.txt and cmakevars.txt files all have correct paths as best I can determine. I have checked for files that need to be present and directory permissions...everything I can think of but no luck.
Finally, the cmakeerror.log and cmakeoutput.log files are not modified by running the configure which may be normal for this error but seems odd.
I am not a regular user of cmake but when I set up my project about 3 months ago, I was able to generate the project and VS compiled it successfully. I have no clue what changed as no changes to cmake or VS in the time since then.
Pulling my hair out...

So it turns out that my instance of VS 2017 thought it had an update in progress. This may have been left over from an earlier update attempt that did not have enough disk space to complete. I though I had cancelled that update and was out clean but VS installer flagged my instance as "update in progress" and I was unaware of this. Now vswhere worked and VS itself worked just fine but whatever process cmake does to locate the VS instance failed due to this "in progress" state. I restarted the VS update which completed successfully and after that cmake was happy.

Related

Getting error 'IntelliTrace code failed (0x80131509)' when trying to debug Visual Studio 2019 solution

I am getting this issue when I try to debug an application that I tried to convert to SDK style. More information below. I am posting this in the hopes that someone can post a solution here. When I click ok to this error, the solution just disappears from VS like I had opened it without any solution at all.
IntelliTrace code failed (0x80131509)
Managed (.NET 4.x) code succeeded.
I have looked at other SO and forum posts about this issue, and the resolutions seem to be that they rebuilt their machine. Which is not really an option for me at the moment. I can try to re-install Visual Studio, which I might do soon.
How I came to be in this situation:
I tried to use Try-Convert to convert an existing .NET application to SDK style format. I have done this with other projects in the past with success. All I have to do is manually edit the TargetFramework aftewards to point to net472 or the desired version. In this case the conversion went very badly as this is an older code project with some pretty customized project files. As it went badly I decided to try to revert the projects to the old project format, and that is when this occurred.
Things I have tried:
Cleaning out the entire source folder, and re-getting latest
Running devenv /setup
Cleaning out both the %temp%, and asp.net temporary files directory.
Rebooting
All the options listed here by Del Developer Community Forum (Except repair which I am about to attempt)
Turning off IntelliTrace

Error when rebuild the setup project in c#

Im getting below error when im going to rebuild my setup project in visual studio 2015.Please advice to resolve this:
The message means that the install of Visual Studio 2010 Shell (Integrated) is broken, so Windows is attempting to repair it. Also, it looks like it was installed from the internet, which resulted in the setup being performed from a temp folder that has since been deleted. It is always better to download the setup (such as the MSI file) and save it somewhere. It is also possible that the C:\Windows\installer folder has been damaged or has had files deleted because normally the repair would be performed from there, which might have been happening for a long time but you wouldn't have noticed until the cached MSI file was removed from /windows/installer.
The fix is to get hold of the exact same MSI file that was used to install VS 2010 Shell MSI file and save it somewhere, and browse to it when this happens again.
The cause might be a conflict between VS 2010 and VS 2015, or some removed or changed shared files. The application event log will have an MsiInstaller entry that says what is missing.

Visual Studio 2013 New Project .csproj not supported

When I try to create a new Windows Forms project, I get the " ....csproj cannot be opened because its project type (.csproj) is not supported by this version of the application" error. The .csproj file it is referring to is in AppData\Local\temp\randomname\Applicationname.csproj but that file does not actually get created.
I know that when this error crops up with opening projects created in previous versions, it's usually a missing library that is used by that particular project but for the life of me, I cannot figure out what library I could be missing here as it is a new project.
I have VS 2013 Ultimate installed with all components.
Running on Windows 8.1.
First confirm it is not a add-on or a problem with Visual Studio itself.
Try and start Visual Studio from the command line with devenv.exe /resetskippkgs and also try disable any IDE extensions temporarily to see if one of them might be stepping on something. Do these two things first to see if the problem lies with VS IDE. Of course try creating a project after you have done these two things and see if you get the same results.
I never figured out what the actual problem was but I've installed Update 5 which was only released less than two weeks ago and it's working fine now.

Code changes are not included to build- Visual Studio 2013

I have recently moved to Mac and am developing using Visual Studio 2013 from Parallels. I have pulled a project from BitBucket repo using Sourcetree.
Now any code changes I make do not translate to any changes. For example, I can comment out all Start up routines and project works fine (just like before commenting).
In addition, all breakpoints are displayed as empty balls with an exclamation mark on them (The breakpoint will not be hit. The source code is different from the original version).
I tried cleaning, rebuilding, deleting obj / bin directories to no avail.
Usually the remark 'The source code is different from the original version' is true.
The only hint is 'Parallels' however that should not be a problem. A few guesses:
Are you running a web project with ISS development host? It could run your site from another folder, however VSS will attach to this instance.
Do you have build output errors (See the errors tab). If so, check whether the setting 'Run last successful build' is enabled. This could disable running your unexpected binaries.
Is there a overridden entry point for debugging? It could be a precompiled version is included in the sources or from some other location. In this case deleting obj/bin folders won't work.
Just let's make sure this is not related to Parallels. I personally use Fusion with Unity but I expect similar tech. Is it a Bootcamp installation? In that case try to boot native and find out whether the problem still exist.

Visual Studio 2010 projects are never up to date

I've hit an issue with some of the projects in our Visual Studio 2010 solution. When I build they are never up to date and always rebuild.
Using this post
http://blogs.msdn.com/b/vsproject/archive/2009/07/21/enable-c-project-system-logging.aspx
I was able to figure out that some of my projects had headers listed which no longer existed. Removing these references fixed 5 of the projects.
But that leaves 13 which are always being built. The reason I get from the VS2010 log is
devenv.exe Information: 0 : Project 'C:\path\to\project.vcxproj' up to date check disabled because the LastBuildState and/or LastBuildUnsuccessful properties are not set.
When I search google I'm getting hits for this message. But no solutions.
Does anyone know whats going on?
All these projects are NMake based. Kinda suspect that may be the root cause. Do NMake projects set these properties?
A very similar question is answered here
I had to delete all .tlog files from my output.

Resources