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

Top 5 Contributors of the Month
Post New Web Links

Locating the referenced dlls

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :.NET Framework


I developed an excel addin and a windows installer to install the same in other machines. This excel add-in refers to third party dlls which are installed in C:\ProgramFiles in development machine. These third party dlls are also present in GAC. Now when I install the excel add-in in a machine where the third party dlls are installed in E drive, it is not working. Is there any solution for this issue.




View Complete Post

More Related Resource Links

sqlserver clr with referenced dlls

where can i find a good step by step introduction for creating a sqlserver clr sp which is referencing dlls like mappoint. I understand and can follow up the helloworld example which works well. Then i modified the class calculating the distance between 2 hardcoded addresses in US and adding the using directive for interop.mappoint.dll and interop.mappointutilities.dll I compiled my class: C:\windows\microsoft.net\framework\v3.5\csc /target:library c:\helloworld\helloworld.cs /r:c:\helloworld\obj\debug\interop.mappoint.dll /r:c:\helloworld\helloworld\obj\debug\interop.mappointutilities.dll The comilation runs without an error. but when i try to register the assembly in sqlconsole create assembly helloworld from c:\helloworld.dll with permission set safe (also tried unsafe) I get the error: Meldung 10301, Ebene 16, Status 1, Zeile 1 Die HelloWorld-Assembly verweist auf die interop.mappoint, version=, culture=neutral, publickeytoken=null.-Assembly, die in der aktuellen Datenbank nicht vorhanden ist. SQL Server hat versucht, die Assembly, auf die verwiesen wird, am gleichen Pfad wie die verweisende Assembly zu suchen und automatisch zu laden. Dieser Vorgang ist jedoch fehlgeschlagen (Ursache: 2(Das System kann die angegebene Datei nicht finden.)). Laden Sie die Assembly, auf die verwiesen wird, in die aktuelle Datenbank, und wiederholen Sie die Anforderung. meaning thast

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?


C++ at Work: Create Dynamic Dialogs, Satellite DLLs, and More


This month Paul DiLascia teaches readers the right way to create dynamic dialogs, explains satellite DLLs and discusses language resource DLLs.

Paul DiLascia

MSDN Magazine September 2006

Resource Leaks: Detecting, Locating, and Repairing Your Leaky GDI Code


Leaks are possible, even in robust Windows-based applications. As bugs go, leaks are some of the most difficult to find, especially when they occur in graphics device interface (GDI) objects and menus. While free and third-party tools exist to detect such leaks, it is usually difficult to make the connection between the numeric handle value returned by the tool, and a bitmap or menu in your program. This can limit the usefulness of these tools. Custom tools can be built that detect, track down, and eradicate GDI and menu leaks. Here, three such tools are built using well-known and documented APIs.

Christophe Nasarre

MSDN Magazine March 2001

.net DLLs not secure


.net DLLs are not secure, this is such a disappointment. 

What can one do to secure DLL apart from obfucation (which is nothing about making DLL secure)

I know that I can build a DLL in vb6 or Delphi (thats secure) and then COM (tlbimp.exe) it for .net using interlop tools for .net


BUT I dont want to that, I want to stay with .net (vb) , so can anything be done to truely secure a .net DLL ??

This is very important

MSVS 2005 ASP.net 2.0 vb.net 2

DllImport of 32-Bit dlls

Hi guys, I am a real newbie on 64-Bit progr. so my question might sound a little stupid. I have a VB.NET project which refered to a 32-Bit dll via COM-Interop. I migrated the project and the COM invocation does not work anymore. I tried several compiler settings (anyCPU, x86) but nothing helped. Then I found in my old C# book a method called DllImport (System.Runtime.InteropServices) I declared the dll as follows: <DllImport("fcvb.dll", CharSet:=CharSet.Auto)> _ Function dllBIN2_iv(ByVal price_u As Double, ByVal ex As Double, ByVal d_exp As Double, ByVal d_v As Double, ByVal price As Double, ByVal rate_ann As Double, ByVal acc_rate As Integer, ByVal cost_hldg As Double, ByVal acc_cost_hldg As Integer, ByVal option_type As Integer, ByVal iter As Integer, ByRef return_vlty_imp As Double) As Integer End Function When calling the Dll I got f... in the middle of the process saying: errMsg = "System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)   at Wcr_.NET_2005.Module1.dllBIN2_iv(Double price_u, Double ex, Double d_exp, Double d_v, Double price, Double rate_ann,... I am running an AMD64-Bit Opteron with 2GIG of Mem on Windows Server 2003 (64-Bit) Standard. Visual Studio 2005 Team Edition for SW Developers and .NET Framework 2.0   Any comments welcome I am open for both a COM wrapper .NET dll or n

AppDomain to Load and Manage DLLs

My question/situation is with regard to AppDomain.CreateInstanceFrom or AppDomain.CreateInstanceFromAndUnwrap or AppDomain capabilities.My customer wants a service (or application) that can invoke Public methods from any .NET Managed DLL and be able to add, change, rename, delete those DLLs out of their storage location while the service is running.  DLLs will mostly likely not be marked Serializable and will most likely not inherit from MarshalByRefObject.  Presently, I am providing this functionality without the ability to change, rename, or delete DLLs while the service is running by loading the DLLs at service start (not very memory friendly).Could I create a manager class that supports this functionality, load that class into a separate AppDomain, invoke methods as needed, and unload the AppDomain as needed when DLLs change?  I would manage execution with a Queue object to ensure that requests for invocation don't get lost and don't try to access the manager when it is no longer in scope.  A FileSystemWatcher would handle unloading the AppDomain when changes occurred.Does this sound correct, normal, abnormal, or not possible?Software Developer, Augusta Systems

DTA doesn't find referenced table form stored procedure with SP_executesql

Using the SQL2008R2 profiler and DTA connected to a SQL2000 server. I created a tuning tracefile with profiler for a certain db on the sql2000 server because I need to tune 1 table in the database referenced by 3 parameterized stored procedures which built a query depending on the parameters and is executed with an sp_executesql statement. When I run the DTA loading the tracefile I see the exec stored procedure events with it's parameters and the message Event does not reference any tables. And that's it. The DTA generates no Recommendatioin at all. How can I get the exact sql statements in the tracefile so the DTA can do what he needs to do? Regards

Error Message: The referenced table must have a primary or candidate key. [ FK Name = FK_tblA_tblB ]

An Entity Data Model is used to generate the script to create  a SQL CE database.  It creates all of the 10+ tables and their primary keys without any problem. A lot of foreign key creations generate errors like the following: SQL Execution Error. Executed SQL statement ALTER TABLE [tblA] ADD CONSTRAINT [FK_tblA_tblB] FOREIGN KEY([A], [B], [C]) REFERENCES [tblB]([A], [BBB], [C]) Error Source: SQL Server Compact ADO.NET Data Provider Error Message: The referenced table must have a primary or candidate key. [ FK Name = FK_tblA_tblB ] The primary keys are there and correct. Could anyone offer some tips on how to figure out what is wrong?hz

Locating a XUL pop up dialog window

What type of command should I be using in Javascript to reference a XUL pop up window? The pop up is not a browsing window, but a strict dialog window. Document.getBrowser.??? or something??? I need a reference like this to do some kind of innerHTML to the window?hours and hours in google really wears me out!!! ---> Anybody have a few lines of code handy I can either try or use as reference in a google search?

error: 26 - Error Locating Server/Instance Specified

Today I installed a named instance on a SQL 2005 Standard X64 SP3 server running on Windows 2008 R2. From a remote server with SQL Server Management Studio I can connect to the default instance, but when I try to connect to the named instance it returns Cannot connect to <server>\<instance> A network-related or instance-specific error occurred while established a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server). Locally I can connect to both instances. Below is the output of portqry.exe. C:\Temp\PortQryV2>PortQry.exe -n <server> -p tcp -e 1433 Querying target system called:  <server> Attempting to resolve name to IP address... Name resolved to <ip> querying... TCP port 1433 (ms-sql-s service): LISTENING C:\Temp\PortQryV2>PortQry.exe -n <server> -p udp -e 1434 Querying target system called:  <server> Attempting to resolve name to IP address... Name resolved to <ip> querying... UDP port 1434 (ms-sql-m service): LISTENING or FILTERED Sending SQL Server query to UDP port 1434... UDP port 1434 (ms-sql-m service): FILTERED The SQL server, agent, and browser services are running.

Referenced WebService, class constructor with parameters

Hi, I have WebService which is referenced in C# ClassLibrary project. In WebService project I have a class named User, which has two constructors - one without parameters and one whith parameters. When I try to create instance of User class from WS in ClassLibrary, I can use only constructor with parameters. My question is, how can I use in constructor with parameters like User u = new User("some@email.com", ...);. Any idea? Thansk

Error while trying to register DLLs for Microsoft Jet on Windows Server 2008 R2 64bit

Hello! I'm having issues with importing Excel spreadsheets into Microsoft SQL Server 2005 on a Windows Server 2008 R2 64bit server.  After browsing the web, it appears that the problem is with the DLL's used by Microsoft Jet.  I've thus attempted to re-register these DLL's.  However, I am receiving the following results. c:\Windows\SysWOW64> regsvr32 c:\Windows\SysWOW64\msjetoledb40.dllSuccessful c:\Windows\SysWOW64> regsvr32 c:\Windows\SysWOW64\msjet40.dllSuccessful c:\Windows\SysWOW64> regsvr32 c:\Windows\SysWOW64\msjint40.dllThe module "msjint40.dll" was loaded but the entry-point DLLRegisterServer was not found c:\Windows\SysWOW64> regsvr32 c:\Windows\SysWOW64\msjter40.dllThe module "msjter40.dll" was loaded but the entry-point DLLRegisterServer was not found c:\Windows\SysWOW64> regsvr32 c:\Windows\SysWOW64\msjtes40.dllSuccessful c:\Windows\SysWOW64> regsvr32 c:\Windows\SysWOW64\mswstr10.dllThe module "mswstr10.dll" was loaded but the entry-point DLLRegisterServer was not found I've set the application pool for this site to use 32bit.  Please note that due to my role on the team, other options such as using ACE are not available to me, unless I can prove that I've exhausted all other options. Thoughts? Thanks,Mike
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