.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

How to invoke c# function from another project without adding reference?

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :ASP.Net


There is a C#.net libraray project whose dll name is customer.dll. It has a class name customer with a function name show(). I want to call this function from another project but dont want to add reference to the caller project. Can this be done? Is there any C#.net class that can acheive this?

View Complete Post

More Related Resource Links

Problem adding it to my project.


I tried to add Modal Popup to my project. I tried the Sample Site, it worked there, when I added it to my toolbar, and followed the tutorial, I couldn't use it. Then, I tried something simplier just to test, I added a Confirm Button, when I try to execute the page it goes back to Visual Studio and show me this:

Locating source for 'd:\hg\act\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs'. Checksum: MD5 {56 64 14 a8 4c 29 25 94 27 e0 35 10 f1 b4 60 f2}
The file 'd:\hg\act\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs' does not exist.
Looking in script documents for 'd:\hg\act\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs'...
Looking in the projects for 'd:\hg\act\Server\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs'.
The file was not found in a project.
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the deb

Video: Adding SharePoint 2010 Project Items to a C# or VB.NET Project

Each project is either a C# or VB.NET project that contains particular initial project items. In addition Visual Studio 2010 includes SharePoint project items that you can add to any of your projects. (Length: 18:53)

Adding web reference

Hi All,I have VS 2008 professional. I have created a web service. In one of my websites I want to add this web service. When i clicked on add web reference > web service on local machine, it is giving the error The Web services and Discovery Documents available on your VS.NET developer machine are listed below. Click the service link to browse that service. There was an error while enumerating services on local machine: Active Directory Services cannot find the web server. A possible cause for this is an incompatibility between versions of Internet Information Server (IIS) on the client and the server. Another possible cause is that IIS is not installed on the local machine, or the user identity under which you are running may not have permissions to view websites on this machine. To view websites on this machine, make sure that you run Visual Studio as administrator. On Windows Vista computers with IIS installed, make sure that IIS Metabase and IIS 6 configuration compatibility feature is enabled. If i run the VS as administrator and try to do the same thing, it will show The Web services and Discovery Documents available on your VS.NET developer machine are listed below. Click the service link to browse that service. None - No Web services were found on the local computer. Plz help to solve this.Smitha

Getting GridSplitters to function after dynamically adding WorkflowDesigner views

I am new to WPF and an writing a program which re-hosts an instance of the WF4 System.Activities.Presentation.WorkflowDesigner.   The program itself works fine, but I am unable to get either of two vertical GridSplitters within a nested Grid to work properly once the WorkflowDesigner's view is assigned into that grid at runtime.   (The GridSplitters work until the WorkflowDesigner and PropertyInspector are created and its views set as children of the nested grid). The window has an overall layout grid (OverallLayoutGrid) and nests the original layout grid (LayoutGrid) as the middle of the three row OverallLayoutGrid.   The outermost main OverallLayoutGrid as three rows and one column.   The Main Menu is in the first row, the nested LayoutGrid is in the middle, and a StackPanel with an error displaylistbox and status bar is in the last row. The nested LayoutGrid has 5 columns and one row layed out with: Col0 - Vacant in static XAML, System.Activities.Presentation.ToolboxControl added during Window load Col1 - "LeftGridSplitter" Col2 - Vacant in static XAML, System.Activities.Presentation.WorkflowDesigner.View added during "File | New" creation of new workflow COl3 - "RightGridSplitter" Col4 - Vacant in static XAML, System.Activities.Presentation.WorkflowDesigner.PropertyInspectorView added dur

adding sqlserver database files in the time of project deployeement

hi all,        how can i add sql server 2005 database files in the time of a windows application project deployment i have designed a project in Visual Studio 2005 using vb.net language and i want add sql server 2005 database file to it. i am connecting to sql server database by the connection string not using any any dataset or anything else. so how can i add database file ... please replay... 

Project dependency / reference and 3rd party dlls missing

hi,i'm having the same problem in multiple solutions and i asked for help in a couple of "forums" already.... here is an easy explaination about my problem.we have 3 projects:Project "A" - a web applicationproject "B" - class libraryproject "C" - class libraryProject C holds a reference to a 3rd party dll. let's say thirdparty.dll. the 3rd party dll is referenced in the C.csproj file with a relative path and private = true (copy local = true): <Reference Include="ThirdPartysNameSpace.BlaBla, Version=, Culture=neutral, PublicKeyToken=0912345678910123, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\_tools\thirdparty.dll</HintPath> <Private>True</Private> </Reference> Project B holds a project to project reference to Project C.Project A holds a project to project reference to Project B.when i compile project C the thirdparty.dll is copied to its bin directory. C's bin directory contains C.dll and thirdparty.dll - correct so far.however when i then compile project B the thirdparty.dll isn't copied to project B's bin directory! B's bin only contains C.dll and B.dll. why isn't project C's bin content copied to B's bin?(sure thirdparty.dll is also missing in project A's bin directory.

Adding a reference insanity

So I have a solution that is somewhat designed like this|Solution|-project DAL|-project commons|-project ServerSideStartUp       -public class startUp (public constructor startUp)|-project windowsService      -service service1Now I can reference commons from the windowsService with no problems. I can also reference serverSideStartup. When I add the reference and start typing code I even get the correct intellisence. At this point there I would have no reason for being here. Unfortunately after I build I get Error    3    The type or namespace name 'ServerSideStartUp' could not be found (are you missing a using directive or an assembly reference?)    Which to me would say I forgot to reference it. But 2 minutes before I added the reference and was even using the intellisence to help write the code.Have any of you ever run into this problem? Also if I add or remove another reference the project knows about the reference.Any ideas or advice?

Error on VS 2008 Class Library project: are you missing an assembly reference?)

http://msdn.microsoft.com/en-us/library/bb153523(office.12).aspx Working with ASP.NET 2.0 Web Parts and Windows SharePoint Services 3.0 Based on the above MSDN Walkthrough, I created a Class Library VS 2008 project. When clicking the Build menu, 11 errors on System.Web.Security etc popped up.  What's wrong? *********************************************** using   System; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; Error 1 The type or namespace name 'Security' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) Error 2 The type or namespace name 'UI' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

Adding Oracle table into SSIS project --Oracle error occurred, but error message could not be retrie

Hi all I am new to design SSIS packages,to day I stated creating package SSIS package and adding the Tables,while adding tables,one of the table giving an below error . I verified the table structure it has one "CLOB" datatype. can some body help how to add this table( whole idea of the package is I have Dump those tables with structure and Data to SQL Server 2008 Database)  =================================== Oracle error occurred, but error message could not be retrieved from Oracle. Data type is not supported. (Microsoft Visual Studio) ------------------------------ Program Location: at System.Data.OleDb.OleDbCommand.ProcessResults(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.PrepareCommandText(Int32 expectedExecutionCount) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.OleDb.OleDbCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.DataWarehouse.Design.DataSourceConnection.FillDataSet(DataSet dataSet, String schemaName, String tableName, String tableType) at Microsoft.AnalysisServices.Design.DataSourceDesigner.AddRemoveObjectsFromDSV() Thanks in Advance.   SNIVAS

Adding new page to WPF project causes key error.

I'm adding a second page to my project in a sub folder and I get the following compile time error: Error    1    Unknown build error, 'An item with the same key has already been added.'     WinTools  

What's the difference between a dynamic data project and adding a gridview to a "normal" project?

Hi,I'm having difficulty understanding what dynamic data actually is.There is an option to specifically create a dynamic data project, but I don't understand the difference between this, and just adding some kind of data control, like a gridview or detailsview for example.If someone can help me understand this better I'd really appreciate it.

How to add Sharepoint dll reference to Windows Forms application project in Visual Studio 2010?

Hi,I am using Windows Forms application template in Visual Studio 2010 Beta. I created this for some R & D work. Now I am using Sharepoint object model in application. When I am trying to add Sharepoint dll reference from .NET tab, I can not see Windows Sharepoint Services there Which was available in Visual Studio 2005.Also If I am add this sharepoint dll from ISAPI folder (14 Hive), it is added succesfully, but it is not taking actually in project and showing me an error during running mode that theError 12 The type or namespace name 'SharePoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) Please suggest me how to add Sharepoint dll reference in Windows forms application in Visual Studio 2010?

Problem adding a Service Reference


Hello all.

I am developing a Web Application using Visual Studio 2010 in witch I have to add a Service Reference to http://dev.virtualearth.net/webservices/v1/geocodeservice/geocodeservice.svc?wsdl.

The problem is that my company's network requires a proxy authentication. So when I enter the "Add Service Reference" dialog, paste the url and click "go" I get a "(407) Proxy Authentication Required" error and cannot add the service.

I also tried using svcutil but the result, obviously, was the same.

How can I work around this? Is there somewhere I can specify the required proxy? Googling around, I found some comments that it can be specified in the Web.config, but I can't find more details on how to do this.

Thanks in advance.

Error while adding reference to latest version of AjaxControlToolkit


HI All,

I am a bit new to ASP.Net Ajax and as such new to Ajax itself. I have a site which uses ASP.Net Ajax.  It used the version AjaxControlToolkit version 3.0.30512.0. I have now changed it to version 3.5.40412.2 by deleting the old reference and adding a reference to the latest one . I build the soultion and everything appears fine witjhout any errors. But the site fails to load showing a yellow page with the message AjaxControlToolkit Version="3.5.40412.2" missing reference to 'AjaxControlToolkit.ExtenderBase.Base Scripts.js.BaseScripts.js'. What does this mean ?

Adding a reference to Microsoft excel object library


Its my first website with Visual studio 2005 and one of the things I used t do in VS2003 was to add the reference to Microsoft excel object library.

but the reference will not add, it does not give any error just goes back to the ide with no reference in the bin folder.

has anyone seen this or know what it is?

could not get dependencies for project reference



I had my solution all good before I tidy up my class library projects.

Since then I keep getting "could not get dependencies for project reference 'project.dll' " everytime i compiled my website.

I read on the web, that it could be a namespace problem. I've fixed all my namespaces and the problem still exists.


Does anyone has any suggestio how to solve this issue ?

Thank you for your help,

when adding web reference, I get "Operation is not valid due to the current state of the object."



I am trying to add a Web reference to a project.  So, I do the standard: right clicking on the project and select "Add Web Reference". The Add Web Reference appears and I navigate to the desired URL "http://ws.melissadata.com/dqws/Address.asmx" and click "Go".   This works in IE.  I see the results and two methods in the window.  However,  the "Add Reference" button and " Web Reference Name" texbox is disabled. And, I see the Operation is not valid due to the current state of the object." I think this is a proxy and or firewall issue?


I know the System.Net.WebProxy("corp-xxx-proxy.xxx", 8080);  and System.Net.NetworkCredential("xxxx", "xxxx"); [x replaces real values]

 Any ideas where I can set this info so I will be able to use the "Add Web Reference" wizard?  - OR - Is there a workaround?




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