.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Way to determine if Assembly is COM or .NET by .net program?

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :.NET Framework
i have a dll and now i have to determine programmatically whether its a COM or .NET dll?

View Complete Post

More Related Resource Links

How would runtime determine which assembly to load?

Hi , How would runtime behave, if I have an assembly with same version number in two different folders on my machine? How to restrict the runtime to read from bin folder only for my specific assembly?        

How do that .Net project runtime determine load which assembly

I have a .Net 2.0 prject , and need call .Net3.5 assembly. If the machine set up .net3.5, it can work;  otherwise it will throw exception. Now I want to prepair two aseembly, .net2.0 and .net3.5. They are same source and IO, but .net2.0 disable some .net3.5 functions. When I found the machine doesn't support .net3.5, I call the .net2.0 aseembly. How do it? 

Determine whether Forms Server is installed on a server

Check whether the Microsoft.Office.InfoPath.Server.dll and FormServer.aspx files are installed on the server.

Program for Format Conversion of An Image

.NET provides extensive support for image conversion. Any image can be processed from one format to another. Most common formats to which .NET have support for are .BMP, .EMF, .GIF, .ICO, .JPG, .PNG, .TIF and .WMF.

Can't get an Icon to show for Desktop shortcut and Program Menu



I've created a SetupWizard, but can't get it to show the Icon for the shortcut on desktop and program menu. The installation goes fine without any errors, the only problem is the icon.

I've made a shortcut of my exe file in the Application Folder and dragged the shortcut to the Desktop folder, then on the shortcut properties, I assigned it an icon picture located in Application Folder.

Any suggestions will be very much appreciated.


Error: Encountered multiple versions of the same assembly with GUID...try pre-importing...TlbImp


Hi!  Can someone tell me how I can troubleshoot the following error: "Encountered multiple versions of the same assembly with GUID...try pre-importing one of these assemblies".

The website developed in VS 2010 (.Net 3.5). This error is only received on my workstation.  Another person developing the site does not experience this issue at all.  Also, not sure if this matters, but on my workstation the 'Assembly Information...' dialog contains no values even though the 'AssemblyInfo.vb' file does specify values for the title, desc, etc.  The GUID being referenced in the error is the main project of the three projects within the solution.

I tried looking through the GAC, but do not see any references to the projects or DLLs in the VS solution and am not sure what else/where to look.

If I delete the copy of the solution on my local machine and pull down a copy from source control (AnkhSVN) the solution will build with no error.  Once I make any changes, such as adding a new aspx file, then the error is received.

I can provide any additional information needed.

The type 'System.Data.Linq.DataContext' is defined in an assembly that is not referenced. You must



This is frustrating, and I don't know how to solve it.

I have a strange problem. I am adding a LinqDatasource object, and set the context:

        protected void LinqDataSource_ContextCreating(object sender, LinqDataSourceContextEventArgs e)
            e.ObjectInstance = new KaruselaDataContext(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);

Then I get this error:
The type 'System.Data.Linq.DataContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Linq, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.


On web.config I already have this:
<add assembly="System.Data.Linq, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

NOTE: The datacontext is in a different project (DLL proect) where I added a refernce to System.Data.Linq.

is there another way adding a refernce to a web project? or only though teh web.config?


MySql.Data assembly problem



I added refernece MySql.Data to my project. My web.config looks like that:

<?xml version="1.0"?>
                <add assembly="MySql.Data, Version=, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>

But when in ServerExplorer I try "Add Connection..." I can't find "MySql Database" in the "Choose Data Source" dialog box?

What the problem can be?

Registering controls of current assembly object reference NOT set error


Hi There,

I have created a simple ASP.net Web Application (2.0) and have added a web user control.

Now in my page I have added this control but I have registered like this,

<%@ Register Assembly="WebApplication1" Namespace="WebApplication1" TagPrefix="Custom" %>

Which means I want to access all the controls in my current Web Application project

Then I have added my user control like this,

<Custom:MyUserControl ID="MyUserControl1" runat="server" PublicProperty="Hello" />

Every thing is fine but when I execute the project, NO control on my user control gets "instantiated" and thus I receive error "Object Reference Not Set"

Note that My Control has,

1) Public property PublicProperty as String

2) 1 Label control

In Load Event Handler I am setting Text property of Label Control to PublicProperty. Here object reference NOT set error occurs (which means Label control is NOT initialized).

I don't want to register my control using Src, TagPrefix etc. Any ideas?


Image processing, determine white space and crop



I have created a image upload for our ID card system to allow users to upload new images, edit them and submit for approval.  This is all working well with a combination of asp.net (c#) and jquery to give a seemless editor etc.

We have had a few users who I cannot believe have scanned a photo of themself and then just submitted it with the A4 page of white and little photo.

I am wondering if anyone can help with a suggestion on how I could possibly reduce the load of these coming through (I can't believe they can be this stupid), it stipulates UK passport standards.

Would my only option be to check for a single continues colour that occurs and if it reaches a certain percentage point say 60% then to just send back an error stating they need to crop the image.

Can anyone help with providing sample or that I can use to move this one on.

I am still in disbelief on this one.  the other one is they take a photo of whole body and other in it and cut straight down middle chopping the people out but supplying a photo that no use for an id photo card....but that I can't imagine being solved programatically as I need to determine where their face dimensions are and what percentage of the actual photo is taken up by it and if it below a threshold reject it.

Could not load file or assembly - Web Deployment Project



I have the following projects in a solution :

- A Web Application

- A Class Library

- A Web Deployment project

The Web Application compiles and run fine when I don't go through the Web Deployment Project. However when I try to use that, I get the following error:

Error 1 An error occurred creating the configuration section handler for hibernate-configuration: Could not load file or assembly 'NHibernate' or one of its dependencies. The system cannot find the file specified. (F:\Folke\Folke.csproj_deploy\Release\web.config line 4) 1 1 Folke.csproj_deploy

"An error occurred creating the configuration section handler for hibernate-configuration: Could not load file or assembly 'NHibernate' or one of its dependencies. The system cannot find the file specified. (F:\Folke\Folke.csproj_deploy\Release\web.config line 4)"

This is the beginning of my Web.config:


Access to report file denied. Another program may be using it.


Migrated from Windows 2000 ASP.NET 1.1 to Windows 2003, ASP.NET 2.0 and had this error. All the forums/MSDN/Blogs says to give Read/Write Access to C:\Windows\Temp folder. Why should we give Full Access to some folder in Production server?? In windows 2000, ASP.NET 2.0 development machine, no files are created when we run crystal reports from aspx pages. Then why in Windows 2003 servers, we need to give rights to temp folder?? It is a simple code


And the code is not storing anything on the disk. Then why should it store the GUID.rpt file in Temp file in Windows 2003 server?? Any alternative is there not to store anything on the disk when Crystal Reports are opened in aspx page??


Editor's Note: Does Your Program Smell Like Bacon?


When building your program, are you content with "good enough"? If so, your expectations are fatally low.

Keith Ward

MSDN Magazine August 2010

CLR Inside Out: Migrating an APTCA Assembly to the .NET Framework 4


The CLR security model in the Microsoft .NET Framework 4 has undergone some substantial changes, including the adoption of "Level2" transparency, similar to the Silverlight security model. Mike Rousos provides an in-depth explanation of how that will likely impact authors of AllowPartiallyTrustedCallers (APTCA) libraries.

Mike Rousos

MSDN Magazine March 2010

CLR Inside Out: Program Silverlight with the CoreCLR


The CoreCLR provides the perfect set of CLR classes and functionality for the Web.

Andrew Pardoe

MSDN Magazine August 2008

Test Run: Determining .NET Assembly and Method References


Before you can test any software system effectively, you must understand the system under test. If the system includes the Microsoft® . NET Framework, understanding the system under test includes understanding its assembly and method dependencies.

James McCaffrey

MSDN Magazine March 2006

Virtual Server 2005: Program Customized Testing Environments Without Trashing Your Machine


Efficient testing can require many different machine and server configurations but the effort needed to manage these test environments can take a toll. Microsoft Virtual Server 2005 simplifies the provisioning and management of testing environments. This article demonstrates how the extensive Virtual Server COM API can be used to create an automated application testing environment to make your testing chores a whole lot easier.

Ben Waldron

MSDN Magazine August 2004

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend