PC Review


Reply
Thread Tools Rate Thread

Common Language Runtime detected an invalid program

 
 
=?Utf-8?B?QW5kcmV3IFB1ZW50ZQ==?=
Guest
Posts: n/a
 
      13th Jan 2005
I am developing an ASP.NET application on Visual Studio .NET 2003 (VB.NET
code). There are numerous forms, and a few user controls. Each form does
not have any more than 40 controls on it. It had been running fine in Debug
and Release modes (uploading to a test server every week) until this week
when...

....I was adding a new user control which is very simple, it uses a DataList
to show a list of items for a menu. There are a few public properties which
I set on each user control when placed on a webform. I managed to get this
up and running, and each page works beautifully.

I checked everything in to SourceSafe and was about to exit VS.NET when I
received the error "Common Language Runtime detected an invalid program".
After reading a bit on the Internet, I can say that I don't believe I have
too many controls on any one form. I attempted to run the application in
Release mode (remember, Debug worked just fine). When in Release mode, I get
"There were build errors. Continue?", and I select "No". The Tasks pane pops
up, but it is empty. I check the Output pane, and it says: "Error: Common
Language Runtime detected an invalid program." If I were to tell it "Yes"
when I get the build errors message, the application runs normally.

What can I do? I cannot find any errors in my new code.

Thanks in advance,
Andrew Puente
 
Reply With Quote
 
 
 
 
=?Utf-8?B?QW5kcmV3IFB1ZW50ZQ==?=
Guest
Posts: n/a
 
      13th Jan 2005
Also, I just ran PEVerify on the DLL file in the BIN directory of the ASP.NET
web application. It came back with "All Classes and Methods in <myfile>.dll
Verified".

I am not sure what more to do...

Thanks,
Andrew Puente


"Andrew Puente" wrote:

> I am developing an ASP.NET application on Visual Studio .NET 2003 (VB.NET
> code). There are numerous forms, and a few user controls. Each form does
> not have any more than 40 controls on it. It had been running fine in Debug
> and Release modes (uploading to a test server every week) until this week
> when...
>
> ...I was adding a new user control which is very simple, it uses a DataList
> to show a list of items for a menu. There are a few public properties which
> I set on each user control when placed on a webform. I managed to get this
> up and running, and each page works beautifully.
>
> I checked everything in to SourceSafe and was about to exit VS.NET when I
> received the error "Common Language Runtime detected an invalid program".
> After reading a bit on the Internet, I can say that I don't believe I have
> too many controls on any one form. I attempted to run the application in
> Release mode (remember, Debug worked just fine). When in Release mode, I get
> "There were build errors. Continue?", and I select "No". The Tasks pane pops
> up, but it is empty. I check the Output pane, and it says: "Error: Common
> Language Runtime detected an invalid program." If I were to tell it "Yes"
> when I get the build errors message, the application runs normally.
>
> What can I do? I cannot find any errors in my new code.
>
> Thanks in advance,
> Andrew Puente

 
Reply With Quote
 
=?Utf-8?B?QW5kcmV3IFB1ZW50ZQ==?=
Guest
Posts: n/a
 
      13th Jan 2005
I found the solution to the problem on my own. I have been the only
developer working on the project this week (we work in a semi-isolated
development environment). I didn't want any other developers refreshing
their solution from the Source server, so I tried refreshing on a PC not
being used by any developer.

I then ran the project on this unused machine in Release mode, and it
compiled, but stopped because it did not know where to publish reports in the
SQL Reporting Services project that was also in the solution. [The solution
contains a Web project, a Database project, and a SQL Reporting Services
project]

I went back to my machine, which had the "CLR detected an invalid program"
problem, and attempted to get the TargetServer for the Reporting Services
project. When I right-clicked on the Reporting Services project, I got the
CLR error.

So, I end-tasked my Visual Studio .NET, fired it back up, went into the
solution, was able to set the TargetServer on the Reporting Services project,
and then compiled without any errors in Release mode.

Thank goodness... hope this helps someone someday. Anyone have a technical
explanation for what could have happened on my machine?

-Andrew Puente
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Common runtime language? JPFL Microsoft Outlook BCM 1 18th Jan 2010 11:52 PM
issue with: "common language runtime detected an invalid program" Richy Microsoft VB .NET 2 27th Sep 2008 12:22 AM
Common Language Runtime detected an invalid program Sahil Malik [MVP] Microsoft C# .NET 5 25th Oct 2005 09:51 AM
Common Runtime Language JIT Debugger =?Utf-8?B?U2hpcmxleQ==?= Windows XP General 1 8th May 2004 07:14 AM
Common Language runtime Den Windows XP General 1 11th Dec 2003 09:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:45 PM.