After clicking rebuild all, I get the message saying "there were build errors etc" and visual studio freezes completely for like 45 seconds, then returns back to normal.
I have tried to solve this by deleting all sorts of temporary files generated by VS as well as disabling graphic acceleration.
I also uninstalled the VS then re-installed. Nothing helped.
I am running Windows 7 x64 with Visual Studio 2013 Express for Web.
Does anyone have any suggestions?
I had the same problem,
part of my assemblies was at another computer location and there was an access trough UNC between the computers.
I found out that the UNC has a huge latency between the computers.
now every time VS is doing compilation it's going to check all assemblies links at project and this is what make it work so slow.
you can move the ref assemblies to your local PC
or fix the latency.
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 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.
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.
When starting Visual Studio 2013 Pro (Update 4 installed) I very often get this error message (several times a day now) for the past about two weeks:
The 'Microsoft.VisualStudio.Editor.Implementation.EditorPackage' package did not load correctly.
I know I can correct this problem by closing Visual Studio and deleting:
%LocalAppData%\Microsoft\VisualStudio\12.0\ComponentModelCache
I have never seen it before that time and as far as I found out in the Internet it was possibly introduced with Update 3.
Well, the problem is that it is annoying to restart Visual Studio several times a day, and I was wondering if anyone else is experiencing this and knows how to solve it for good or what the cause is.
I noticed that it happens extremely often if I work in more than one instance of Visual Studio in parallel. This one is a killer. But still I suspect a third-party component to be involved or it is the size of one of the solutions (about 70 projects). I tried to deactivate some extensions I newly installed and need for the big project, but to no avail.
Just as information: I am working with C#. When working in parallel with projects open in several instances of Visual Studio I never had problems before.
Does anyone have the same problem to this extend or possibly have a better solution than deleting the folder and restarting?
This has become a popular question so I thought I add an explicit answer how to (at least) temporarily fix the problem as already stated in the question:
I stop Visual Studio and delete the following folder (completely, not just contents)
%LocalAppData%\Microsoft\VisualStudio\12.0\ComponentModelCache
If you are using VS2015, then the path should be:
%LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
If you are using VS2017, then the path should be:
%LocalAppData%\Microsoft\VisualStudio\15.0\ComponentModelCache
I don't keep a backup of the folder. It is created automatically again when starting Visual Studio.
I have never found a solution how to permanently fix the problem in that working environment. In my new developing environment (new projects and new workplace) the problem never happens.
This is what helped me... seemed to happen after Windows Server 2012 SP install...
https://connect.microsoft.com/VisualStudio/feedback/details/1123745/setsite-failed-for-package-microsoft-visualstudio-editor-implementation-editorpackage
devenv /clearcache
devenv /updateconfiguration
In that case you can start Visual Studio setup again and choose the option showing two options, Repair and Uninstall. Then click Repair and when repair is done, restart the computer. Then the issue has been resolved.
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.