This is a migrated thread and some comments may be shown as answers.

Getting OutOfMemoryException when I try to build

4 Answers 110 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris May
Top achievements
Rank 1
Chris May asked on 01 Feb 2010, 12:55 AM

I have a relatively small asp.net web site project that I recently started using Telerik with.

It seems that since I introduced telerik into the project, every hour or so my VS 2008 will fail to build the website part of the solution, with the error:

Validating Web Site

(0): Build (web): Exception of type 'System.OutOfMemoryException' was thrown.

Closing and restarting VS fixes this issue.

Does anyone have any idea why this would be happening?

4 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 02 Feb 2010, 05:14 PM
Hi Chris,

Please, take a look at the following blog post that clarifies the issue:

http://stevenharman.net/blog/archive/2008/04/29/hacking-visual-studio-to-use-more-than-2gigabytes-of-memory.aspx

Greetings,
Tsvetoslav
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Chris May
Top achievements
Rank 1
answered on 03 Feb 2010, 02:06 AM
Thanks for the reply.

However, I don't think this addresses my situation.  My solution is quite small, only 4 projects, and right now I'm getting the error:
    Error 33 Exception of type 'System.OutOfMemoryException' was thrown.  
when I try to build, but devenv is only using 540MB of RAM.

I don't think allowing dev env to use over 2GB of RAM will help my situation as I have never seen devenv over 800 MB of ram.

On this same laptop I work with some much much largers solutions: 40 projects (and much larger projects at that) but the project that is breaking on build is the only one using telerik controls. 

I have also noticed that before I start getting the build errors, I will start to have telerik controls stop working in the designer.  All the other regular asp.net controls continue to work.

This is a web *site* project that is failing to build, which is also something different from most of my other projects, which use web *application* projets.

Here is an example of my build output when I try to rebuild the web site:

------ Build started: Project: DataAccess, Configuration: Debug Any CPU ------

DataAccess -> C:\data\MSI\DataAccess\bin\Debug\DataAccess.dll

------ Build started: Project: Csla, Configuration: Debug Any CPU ------

Csla -> C:\apps\CSLA\CSLA 3.7\cslacs-3.7.1-090928\cslacs\Csla\bin\Debug\Csla.dll

------ Build started: Project: MsiBOL, Configuration: Debug Any CPU ------

MsiBOL -> C:\data\MSI\MsiBOL\bin\Debug\MsiBOL.dll

------ Build started: Project: C:\...\NewWebApp\, Configuration: Debug Any CPU ------

Validating Web Site

Building directory '/NewWebApp/App_Code/'.

(0): Build (web): Exception of type 'System.OutOfMemoryException' was thrown.

Validation Complete

========== Build: 3 succeeded or up-to-date, 1 failed, 0 skipped ==========



Any ideas?
0
Tsvetoslav
Telerik team
answered on 03 Feb 2010, 08:50 AM
Hi Chris,

I understand that you are getting the error with our controls only, however, this is a Visual Studio related issue and depends on many factors such as refactoring tools installed (Resharper, JustCode) and other add-ons, etc.

All the best,
Tsvetoslav
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Aravinda
Top achievements
Rank 1
answered on 03 Aug 2010, 09:21 PM
Try cleaning out  folders under  C:\WINnt\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files. It may prevent you from doing you so. Note that file name and search in the folder. You will notice that one of the dll was loaded tens of times which is the reason why you will get this error. Shut down IIS, close VS 2008 and try cleaning out temporary folder again. This method has worked for me. I realized that the dll which was responsible for this error was present in more than one folder(multiple versions) where the other references were present. I think removing the duplicates would solve the problem permanently. But I have not tried this yet.
Tags
General Discussions
Asked by
Chris May
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Chris May
Top achievements
Rank 1
Aravinda
Top achievements
Rank 1
Share this question
or