I noticed when Visual Studio 2012 RTM was closed, that many instances of MsBuild.exe are still in memory.
Why ?
The MSBuild processes are kept running for a period of time (fifteen minutes, I believe) after Visual Studio is closed. This is an attempt to improve performance, the idea being that idle MSBuild processes could be reused if another build is kicked off soon and the overhead of spawning a new process can be eliminated.
You can disable this by setting an environment variable MSBUILDDISABLENODEREUSE=1 (before starting VS) or specifying /nodeReuse:false (or /nr:false) if building from the command line.
Related issues filed on MSConnect:
MSbuild proliferate
Ghost MSBuild.exe in VS11
You can turn off the parallel build feature in visual studio. How to: Set the Number of Concurrent Builds for Multiprocessor Builds
Related
I have a home grown project (https://github.com/andybantly/MFC-Fractal) that I have been working on since the Visual Studio 2005/2008 days. I just recently put it in Git. Its home is on CodeProject.
I am not sure when this started (maybe 10 years ago...) but when I migrated my application to the latest version of Visual Studio, new/odd behavior injected itself into the code generation step. The IDE has somehow decided that when I build the source that I really wanted to build and run the source. This is somewhat annoying, especially during a batch rebuild all.
I am looking for helpful suggestions on configuring the IDE to prevent this behavior. It never used to do this out of the box.
Is it a show stopper? Absolutely not. Is it annoying? Depends on the side of bed I woke up on.
To use SQLite in Windows Phone 8 app, I need to build for specific platforms - x86 or ARM, depending on where the package will be used (emulator or device, respectively)
However, as soon as I switch from building from Any CPU to ARM/x86, I get wild error(s) in Visual Studio.
Error 15 The "CompileXaml" task failed unexpectedly.
System.IO.IOException: The process cannot access the file
'...SomePageName.g.cs' because it is being used by another process.
Things I've tried and other relevant info:
I have only one Visual Studio instance running
Blend is closed
I don't have any specific SQLite related changes, just project/solution configuration changes
I have installed Visual Studio Update 4
I have tried restarting Visual Studio
I have tried cleaning the solution/projects
I have tried deleting the .suo file
I have reinstalled the emulators update mentioned in this question
I have tried building with msbuild outside of Visual Studio (and it works, but I want to build from Visual Studio)
msbuild "myProjectNameAndPath.csproj" /t:Rebuild /p:Platform=x86 /p:Configuration=Release
Any other reasonable explanation why Visual Studio 2013 is failing with these errors?
Error 14 The process cannot access the file '...SomePage.g.cs' because
it is being used by another process.
Are there any tools which i can use to diagnose performance issues with VisualStudio 2013 Premium edition?
I'm currently running the Update2 RC (however speed has been the same prior also). and have a few extensions running
Web Essentials for Update 2 RC
Rename Visual Studio Window Title
Productivity power tools
nunit test adapter
ReadyRoll.
On an Intel Xeon E3-1220 V2 3.10GHz, machine with 8G of RAM i frequently experience performance issues which seem out of character to the resource available to Visual Studio.
The example scenario is a webforms project in a solution which references 19 other library projects, which is controlled by an in house TFS2012. Browser link is disabled, and the solution is built and deployed against the local IIS rather than IISexpress etc.
having two instances of visual studio open which have versions of the solution from different branches appears to have a large impact on performance.
switching between two instances of Visual studio can often cause a hanging state for a minute.
pasting code(even a small paragraph) ontop of code in an existing file (aspx,.vb) can cause a minute or so hang.
You did check out this page? it contains some tips from microsoft for troubleshooting performance.
You could also use i.e. process monitor from sysinternals to check what VS is actually doing in regards to file and registry access.
Another tip could be to delete this C:\Users\\AppData\Local\Temp\Temporary ASP.NET Files\
Our final build server does not have Visual Studio 2010 installed. It uses the MSBuild.exe from the .NET 4 SDK. As part of our code delivery process to our customer we need to allow him to build the projects from the command line on a Visual Studio 'agnostic' server and also to run Code Analysis rules on that machine.
On the visual studio side we started out with AllRules.rules and created exceptions going foreward so naturally we'd like the exceptions to carry over to the code analysis on the build server.
Is this possible ?
Thanks in advance.
Using standalone FxCop you can customize your CI process as you wish. Open this link and go to "Setting up continuous FxCop code analysis" chapter.
Link above seems to be dead now. You can try to look here on this SO question
How do I disable the background compiler for Visual Basic in Visual Studio 2008?
For my sins, I have to work on a large VB.NET project and it often locks up for 20 seconds at a time whilst doing the very helpful background compilation which is extremely frustrating.
I'd rather work blind between compiles and be able to do some work.
No there is no way to disable the background compiler.
Have you installed Visual Studio 2008 SP1. There were several bugs we fixed in the RTM version of VS 2008 which can cause the IDE to hang under certain circumstances.
We take issues with the background compiler very seriously. If you can give us a repro of the problem it will definitely be investigated. If you can produce such a repro or even send us a memory dump when the IDE is locked please file a bug on Connect: https://connect.microsoft.com/VisualStudio
A couple of other steps you can take. Do you have any Add-ins installed in VS? If so try uninstalling them 1 at a time. I've seen several cases where 3rd party add-ins caused lock ups in the IDE which were completely unrelated to the C#/VB framework.