I have this build Machine at a remote location. The process of building a full install is that first I update my code via SVN update and then open Visual Studio 2015 Enterprise and build the solution in Release Mode, once that is done I would then open Advanced Installer to build the package to an executable.
But from Friday I am unable to build my code with visual studio 2015, it would seem that build is happening but I am not seeing Build Successful, its been an hour and I had to kill the process(devenv) to Cancel the build.
The only delta which happened from last time is that SVN in my organization is running into some issues in which writes are failing, but logically it doesn't make any sense that visual studio wouldn't build a solution because there is an issue with SVN. I mean, one can argue saying that maybe there is a read error too but I am positive that I have all the necessary code files to build the solution, and for the sake of argument if we say I hadn't, shouldn't I have run into build errors rather than a hung build?
Note 1: Output window is of no use, as I do not see any meaningful error.
Note 2: I checked the solution out in another directory but same result.
Note 3: Build Machine has Windows 7 Professional SP1 in it.
Any insight to this weird behavior is appreciated.
I was able to build the solution after restarting the Build Machine. I looked into the system log to see when was the last time the computer was restarted and to my surprise, I found that it was never restarted even once. I had been using this Machine at least from 2 years.
As I wrote, restarting the PC solved the issue but I do not know the reason which helped the case here. I am guessing there were memory leaks?
Any person reading this post to solve similar issue may want to start by restarting the Build Machine.
Related
I am trying to develop a UWP app for Windows desktop machines. Everything has been going well, but within the last few days I've lost the ability to build a release version (building a debug version still works fine).
I get the following error messages:
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppXPackage.Targets(2810,5): error APPX0002: Task 'ValidateAppxManifest' failed. Unspecified error
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppXPackage.Targets(2810,5): error APPX0002: [My App] violates pattern constraint of '\bms-resource:.{1,256}'.
I've tried a number of "fixes" that worked for people over the last few years. Some people report the problem fixed itself in the latest version of Visual Studio. Unfortunately, the versions they mention are older than the version I'm using, which is
Microsoft Visual Studio Community 2019
Version 16.6.3
Many fixes from the net are similar to the ones below, from the URL
https://social.msdn.microsoft.com/Forums/en-US/4cc2cbfb-fa0d-4f12-a0a1-9072d78e26d6/vs2019-error-task-validateappxmanifest-failed-unspecified-error-again-and-again?forum=msbuild
One fix was:
Clear nuget packages,
Clean solution
Close VS
Delete bin & obj folders of the main (startup) project
Open VS - solution
Restore solution nuget packages
Rebuild 'n go
Another fix was:
uninstalling vs & sdks,
removing every nuget folder,
clean the registry and restart the system,
the last step once more,
reinstall vs.
I have tried all of these (several times) except for "clean registry." I'm not sure what part of the registry we're talking about.
So, has anyone overcome this problem in a different way, or know what the registry idea is?
Oh, some other data is
Maybe my machine is too old (about 6 years old). I’m speculating that even if my machine seems to have the latest version of Windows an Visual Studio, maybe it doesn’t have exactly the latest code.
Things went bad while I was adding two new features. The first was to ask the user for a rating, via _storeContext.RequestRateAndReviewAppAsync(); The second was allowing the user to share some data via DataTransferManager.ShowShareUI();
I was thinking maybe these APIs might require some declarations in the manifest that I don't have, but I don't see from the documentation that they do.
Any ideas would be greatly appreciated. I’m out of ideas at the moment.
Dan
Here is the answer, for me. I’m not confident that this as the answer for all cases, but all is good now.
You may remember that I said I had the latest version of Windows, and I did. However, when I checked with Windows Update last night, it confirmed I was “up to date” but it offered me a “Feature update” to Windows 10, version 2004. I decided to go for it.
The update took hours to complete, and this morning it was still only 94% complete when Nico Zhu suggested to try using Visual Studio 2017. I figured I’d install VS 2017 after the update, but when it was finally complete, I decided to try VS 2019 one more time with my fresh new version of Windows. Amazingly, it worked the first time.
I should mention that my new procedure for making an app package now includes
close VS 2019
delete the project’s obj folder
delete the project’s bin folder (I used to just delete the obj folder, but after seeing others suggestions I’ve added this step)
launch VS 2019
create the App Package
I wanted to do another build/package so I fixed a couple of cosmetic bugs and tried again. On the second try I fell back into my old pattern and I did NOT delete the bin folder. Immediately VS 2019 popped up with an error message something like “Cannot complete build. Fix problem with your app manifest.” Rather than pouring over the manifest file as I’ve been doing for the last couple of days, I deleted both the obj and bin folders and tried again. The build/package process then worked perfectly.
So, I want to say that the app manifest file was not the culprit (in this case anyway) and I’m now a fan of deleting both the obj and bin folders, and having Win 10 version 2014, before attempting a release build with VS 2019.
Dan
I have Visual Studio 2015 Community Edition Update 3 running on Windows 7 SP1 64 bit, which I use to develop C# applications.
I love the diagnostic tools during debugging to spot performance problems early on. However, they stopped working for me sometime in the last month or so (possibly related to installing Update 3, although I have no information to back that up). I see the error message "CPU Profiling while debugging is not available on this version of Windows. To see CPU usage details, run the CPU Usage tool without the debugger (Debug -> Performance Profiler...)."
Things I have tried without success:
Completely uninstalling and reinstalling VS.
Performing a repair on my VS installation
Ensuring "Use {Managed,Native} compatability mode" is disabled in debug options.
Enabling the Diagnostics Hub logging info as described in this question. No error messages that I can see appear in the logs.
This still happens even if I create a new WPF project, so I don't believe it has any project-specific cause.
Are there any other things I can try? Obviously they were working before, so I don't believe the error message about my version of Windows being unsupported.
Deleting my solution's .suo (solution options) file fixed the issue. My initial statement of this bug affecting even new projects seems to be wrong. Although, I did do a complete reinstall of VS after doing that test, so it's possible that impacted the outcome.
Full disclosure: I work at Microsoft, specifically on the Diagnostic Tools team.
There are parts of the Diagnostic Tools that won't work on Windows 7, specifically taking a CPU profiling trace while debugging. This is a limitation of the operating system and ETW. If you are just interested in the graphs and debugging events, those should work. You can turn on logging for our tools which might give you some insight into why they are not working:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\DiagnosticsHub\LogLevel
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\DiagnosticsHub\LogDirectory
For LogLevel you can use one of the following strings "All", "Info", "Debug", "Warning", "Error" (In your case I would use All to better see what is happening). As for LogDirectory it is a directory of your choice "C:\Logs". When your done reproing the scenario, close VS to flush the logs and don't forget to delete these keys as the diagnostic tools logging is pretty system intensive.
You should be able to search for "Error ---" in the logs to get an idea of what is happening. We have seen problems with certain VS extensions and custom projects.
Also, feel free to also post the issue at: https://connect.microsoft.com/ Each issue that is received there gets turned into a bug and assigned to the corresponding team.
I had som issues with that a while ago.
1) Check Tools>Options>Debugging>General>Enable Diagnostic Tools while debugging
2) Check Tools>Options>Intellitrace>Enable intellitrace
I had the same issue, although deleting the .suo file did not help, I also repaired Visual Studio 2015 Professional and then it worked. So for future readers, if deleting the .suo does not help, try to also repair Visual Studio and vice versa.
None of the others worked for me. What I had to do was close all Visual Studios and re-opened it and the diagnostic tool worked.
(I deleted the .suo file, made sure all the correct options were enabled, but because I had another Visual Studios session running, none of it worked until I closed all)
I had already another visual studio instance running with diagnostic one. That was the issue for me.
I faced this problem today and it was not easy to find working solution.
This helped to me:
Reinstall Cumulative Servicing Release for Microsoft Visual Studio 2015 Update 3 (KB3165756)
Direct link to download: http://go.microsoft.com/fwlink/?linkid=816878.
After Repair action (I had it installed before, otherwise install) prompted to restart computer, did it and Diagnostic tools worked again.
I had a similar problem with Visual Studio 2015 Pro Update 3 running on Windows 10 Home. The runtime display of memory and cpu usage stopped working. Deleting the .suo file fixed the problem, as indicated by proc-self-map's answer. The .suo file was buried in the .vs hidden directory so I removed the whole .vs subdirectory. Now the runtime display of memory and cpu usage works like a charm again. No reinstall required.
Scenario: I hadn't been coding at home in a while and wanted to kick off my first server client application in C++ using the Visual Studio 2012 Express. But when I clicked the run button, VS froze. There was nothing wrong with the code, so I think the problem lies in some VS settings I'm unaware of, or I accidently downloaded an update which made things worse.
Issue: Hitting the play button (Debug Win32 selected) freezes the VS. Also the taskmanager gets 3 processes of the running program (none which I can interact with). Those processes cannot be terminated unless I reboot the computer.
Specs: Visual Studio 2012 Express, Windows 7, 64 bit. Avast Premier 2015.
#include <iostream>
int main() {
printf("tilt");
return 0;
}
Self-Debugging: I tried making new Hello World programs in new projects, but the issue was still there. If I opened an old project I knew worked before, it also had the same issue without me modifying anything. I changed to C# but still I couldn't run a simple program. I repaired my VS. I installed Visual Studio 2015 Community, but still cannot run any programs.
Error messages:
the process cannot access the file because it is being used by another process
visual studio could not copy exceeded retry count of 10. failed
Microsoft.Common.targets(3390,5)
Linker Tools Error LNK4098
error LNK1168: cannot open tiltTest.exe for writing
error LNK1181: cannot open input file 'kernel32.lib' //after repairing VS
Related links:
Visual Studio Hangs in debug?
Visual Studio 2015 freezes when debugging a cpp code
Windows Forms application remains alive in task manager after hitting "stop debugging" button
Visual Studio "Could not copy" .... during build
Resolving LNK4098: defaultlib 'MSVCRT' conflicts with
visual studio linker warning LNK4098
http://www.bytemedev.com/how-to-fix-visual-studio-error-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process/
Final Words: I'm really bad at linking, settings, libs and anything that isn't code. So if you know how to solve it using those, please expect me to be really beginner as all that is totally confusing and illogical to me. Help would be really appreciated ! If the solution is found, I will modify this post so others will find the solution as well.
Solution: I reinstalled the Visual Studio and turned off Avast, which solved my problems! Thanks for suggestions!
Given the error message about another process using the file it could be down to the antivirus software trying to scan the files at the same time that Visual Studio is trying to access them.
I'd try turning off Avast (or any other anti virus) first. (If you're paranoid about viruses disconnect the computer from the internet).
If everything now works add an exclusion to the AV of your source folders so that it doesn't scan your code - after all you know that there are not going to be any viruses in the executables you create (right?). This will also have the added benefit of speeding up your compiles/links as the AV isn't checking the (potentially) 100's of files you could be modifying each time you build.
I am having great problems running the application in the debugger from Visual Studio 2008.
When I'm using vshost.exe, it says:
And when vshost.exe is turned of, it simply states:
Interesting thing about it is that when i do use vshost, debugger is actually started and breakpoint is hit on the first line of the Main().
I tried:
rebuilding the project(s)
removing .ncb, .suo, .user for the projects
repairing Visual Studio 2008
changing the build architecture for the project
... no help there...
Any experience in (trouble)shooting that?
More info: some projects DO work, and one that I have to work on, does not.
I have some ideas such as:
trying to create NEW project, add thing by thing to it and see at what point it will start to miss behave
work it other way around, delete project by item by item to see when it will (if it will) be working OK again.
EDIT (for google, as I see that there are many similar questions on the web):
Errors:
Error while trying to run project: Unable to start debugging.
and
Error while trying to run project: Unable to start program '....\PlayKontrol.exe'
Try upgrading your Visual Studio to Service pack 1, if you haven't already.
Did you restarted your computer? You never know how windows will react to that :).
Also be sure there aren't any keys stuck, like the ctrl or windows key.
Note that the key does not have to be visually stuck, it can be stuck for visual studio and not for the explorer.
The most common source of sudden problems like this is corruption of one of the data files that vs uses to cache information between builds.
You've tried a clean build, but this won't delete everything. A real clean build is: quit vs, delete bin, obj, debug, release folders, delete all generated files in the root - primarily ncb. Do the same for any locally built libraries that you're project references.
The easiest way to do this is if you have the code in source control, as you can rename away your entire code folder and then force a get of all the source.
You often need to do all of these things in one hit to clear the problem.
Less frequently, a reinstall of vs will sort things out (although this sounds unlikely in your case if it is only one project that breaks)
Also think carefully about anything you might have installed just prior to it failing... And remember that some install effects may not occur until the next reboot so it could be days ago. A particular cause of this are automatic windows updates and trial versions of things like the vs 11 beta.
You might try running the application from outside of VS, but have a line of code that looks like this: Debugger.Launch(); where you want your first breakpoint.
My Visual Studio seems to be freezing/lagging when I open a existing project. I have added NHibernate framework into my code and it seems to lag my computer (at least that's what I think). When I open other projects, I do not lag or freeze at all. The freeze is about 3- seconds to a minute, then it will open my project and it will just act very slowly, it might take 20+ seconds just to switch classes an 20+ more seconds just to type a single character into visual studios.
I was wondering if anyone has had this problem before. If so how did you fix it?
I can't really work on my code until this is fixed. Oh also, when is save the code, it freezes for a good minute or two also.
You can see exactly what VS is doing at any given moment, if you attach a debugger to the devenv.exe process and hit Break when it hangs. Then load the symbols from Microsoft Symbols server and show the call stack for the VS main thread.
I wrote a very detailed article about how to debug crashes and hangs here:
http://blogs.msdn.com/kirillosenkov/archive/2008/12/07/how-to-debug-crashes-and-hangs.aspx
From the call stack it should be obvious what is causing the delay.
For me, removing the suo file (from the v14 sub directory) solved the problem...
Had the same problem. Closed Visual Studio 2010, opened again Running as Administrator, went to Extension Manager, uninstalled Nuget Package Manager, restarted Visual Studio 2010 running as regular user, opened problem solution, solution opened fine.
Nuget Package Manager seems to be the cause. My problem solution is using EF 4.3 Code First which interacts heavily with the Package Manager Console, but that may just be a coincidence.
As answer by Visual Studio 2015 Freezing White Loading Solution delete the .vs hidden directory solved the issue for me.
I am using Visual Studio 2017 Community Edition.
I had a hunch that something had been corrupted with one of my NuGet packages, and completely deleted the \packages subfolder and its contents. When I reopened the solution, all projects loaded successfully without hanging.
From there, I restored the previously deleted packages from the NuGet Package Manager Console and I was back up and running.
What, if any Add-ins do you have installed?
Edit:
One suggestion I would have then is to systematically disable each of your add-ins and see if performance changes and if it does research the culprit and see if there any updates available.
Uninstall any MS Enterprise Framework addin's you may have.
Delete the VS temp directory (and the Windows one).
Do you use TFS? Perhaps the server is a bit sleepy, that will make it freeze for a few minutes, but is ok afterwards.
For me, a chkdsk /F /R (which will prompt you to restart) and about 30 minutes of company time fixed this issue.
I think a few improperly closed instances of Visual Studio may have attributed to the issue.
I had same problem. Delete following folder.
C:\Users\UserName\AppData\Local\Microsoft\VisualStudio
My local files somehow became corrupted for one project, fortunately I didn't have any pending changes so rather than run chkdsk I just deleted the folder and checked out the solution from source control again.