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

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

Test Run: Determining .NET Assembly and Method References

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

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

View Complete Post

More Related Resource Links

HOWTO add a C#.NET library to SQL Server as an assembly that uses such references as system.web.

HOWTO add a C#.NET library to SQL Server as an assembly that uses such references as system.web. I have a C# library (dll) I want to add to SQL Server via "CREATE ASSEMBLY", but the DLL uses these references: Microsoft.VisualBasic System System.Core System.Data System.Data.DataSetExtensions System.Drawing System.Management System.Web System.Web.Extensions System.Web.Mobile System.Web.Services System.Xml System.Xml.Linq And just to be clear, the DLL is a .NET 3.5 app, with the SQL Server being SQL Server 2008. Right off the bat, the "CREATE ASSEMBLY" call fails due to System.Web, which strangely, is The CREATE ASSEMBLE says this error: Msg 10301, Level 16, State 1, Line 1 Assembly 'MyLibrary' references assembly 'system.web, version=, culture=neutral, publickeytoken=b03f5f7f11d50a3a.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request. I have tried to use VS 2010, to create a SQL Server DB project, and it point blank does not let one add references to things like System.Web. When trying to use "Add Ref", VS 2010 literally lo

"The list of workflow actions on the server references an assembly that does not exist."

hi,I have a query. I tried creating a workflow using the Microsoft Sharepoint Designer. But when i click on New - Workflows, its showing the following error "The list of workflow actions on the server references an assembly that does not exist. Some actions will not be available. the assembly strong name is Microsoft.sharepoint.workflowactions"Does any one came accross these sort of issues?Plz help me..... Thx in advanceRegardsAbul

Problem with updating assembly references in IIS server

I have a website which is in a Projects directory. The IIS server is set up to point to that website (i.e. any changes in the /Projects version are visible in the wwwroot version), so I can run the website locally on IIS server.One of the libararies that there is an assembly reference to in the website has been updated. If I run the /Projects website using the local ASP development server (localhost), I can open up the files in the library that have been changed and put a breakpoint in them, which will be triggered whenever that section of code is executed.However, when I run the IIS server version in webroot, if I put breakpoints in the same files, the breakpoint icons disappear, and it says that the symbols have not been loaded for the current page (presumably because the file is new, but the old code is being compiled in the assembly?). I have checked, and the library reference is set to auto update, and has the correct path to the dll in the project's .refresh file.I'm confused about this, since I thought the IIS server version was pointing to the same website as the one in /Projects, which works. If anybody has any advice on things that I can check or how I can fix this, I'd be grateful.

References parameter in $create() method



Could someone please explain what exactly the references parameter of the $create() method does? my understading from reading the docs is you can pass in a reference to an already created (javascript ?)object that can then be referenced by the object being created. Is this correct? If so, how do I reference the objects passed in using this parameter in the class in question.

This page http://www.asp.net/ajax/documentation/live/clientreference/Sys/ComponentClass/ComponentCreateMethod.aspx mentions it, but does not expand on usage

Cheers Si

SSAS security safe method assembly



        Any one pls tel me im using Permission as unrestricted in SSAS assembly. The following query is executing but when i use Permission as Safe in SSAS assembly it is not working.

Please tell me about Safe Permission in SSAS assembly.

How to use Safe permission in SSAS assembly.



Write Unit Test for method with parameter


I'm trying to build my first MVC site and also write unit test for the first time.  I can't figure how to write unit test for methods that take parameters.  How do I write a test method for this controller action?

public class CustomerController : Controller

        public ActionResult Details(int id)
            var customerDetails = (from c in _entities.Customers
                                  where c.PK == id
                                  select c).FirstOrDefault();

            return View(customerDetails);


Method 'X' in type 'Y' from assembly 'Z...' does not have an implementation.


Please note that I posted this previously:


I received an answer and marked it as resolved, but the fix only worked for a very short time, and now it's back to the same problem and never works. I have a WCF 3.5 service hosted in IIS that works fine on Windows 2003 but always breaks in Windows 7 (IIS 7.5) with this message: "Method 'X' in type 'Y' from assembly 'Z...' does not have an implementation." This error message is wrong, because the implementation is there. If I comment out the referenced method, the error simply moves on to the next method. But everything is correct and it works fine in 3 win03 environments.

This is driving me crazy, so it would be heroic of somebody to give me a permanent fix for this. Everything suggested in the previous post (see link above) has been tried, tweaked, retried, restarted, rebooted, etc. Nothing seems to work, not even sporadically anymore.

Thanks in advance for your help.


Thinking about new C# method prototypes: object as dictionary

I recently had to write a small Flickr API. I know many .Net API for Flickr already exist but I needed one for a Silverlight application. Whatever, it's only about building some querystrings so I did it by myself. It's been an opportunity to think again about a classical question: how to pass parameters to a method ?

Imagine you have a generic method to call some Flickr functions.

Rendering ASP.NET Script References into the Html Header

One thing that I've come to appreciate in control development in ASP.NET that use JavaScript is the ability to have more control over script and script include placement than ASP.NET provides natively. Specifically in ASP.NET you can use either the ClientScriptManager or ScriptManager to embed scripts and script references into pages via code.

Test your skill in SQL Server

You will be given a series of 10 SQL Server related questions that are randomly selected. Since the questions are randomly selected, you will receive a different set of questions each time you start a test. At the end of the last question, you will be given your score. You can then start a new test session if you like.

*.axd script references not being rendered to browser


I'm running VS2010 with .net 4.0, and am running into issues with the .net ajax script tags mysteriously not being rendered to the browser.

So far I've reduced it to a scenario where I set the DataSourceID property of a databound control.  More specifically, I've only tested it on a Gridview and a DropDownList.

This can be reproduced fairly easily on my machine by following these steps:

1. Create a new empty Web Application Project

2. Create a new Web Form

3. Add a ScriptManager inside the form

4. Add a DropDownList and a DataSource (I used an ObjectDataSource)

5. Set the DataSourceID property of the DropDownList to the ID of the DataSource.  This can be done either declaratively on the .aspx page, or in the code behind in the aspx.cs page, and both produce the same results.

6. Open the page in a browser and watch as you get a javascript error stating "Sys is not defined" and notice that the page source contains no script tags referencing *.axd scripts.

Here's my source code showing my set up:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ScriptResourceFAIL.Default" %>


Sys.Net.WebServiceFailedException: The server method '' failed with the following error:



Let's say we have 2 time consuming functions, aaa and aaa1 inside a aspx page.

        public static string aaa(int i)
            return i.ToString();

        public static string aaa1(int i)
            return i.ToString();



        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        <span id="displayspan"></span>
        <br />
        <input type="button" value=

Jscript error: Object does not support property or method


 Hi, i have little knowledge on javascript but i need to use this code get from somewhere for a jquery to work.

I face this "Jscript runtime error: Object does not support property or method" whenever im trying to run this page.

In my experience, im get this error msg 9 out of 10 times i use javascript in my system.

Im using Microsoft Visual web developer 2008, i wonder if this is related to my problem, i not sure there is anything i need to add as reference or update anything.

But anyway, in short, i just couldn't use javascript code when using this development tool because of this sort of error.

Anyway, it happen that last time i tried use the same type of jquery code in another project and it seems to work well without an error.

But now when im try to use it again in this recent project i created, it come out with this error and i have no idea how to solve it even look through google and this forum.

It doesn't really seems like its the code problem itself although im not sure, because any javascript code just couldn't work.

So below is my code that i need to use.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src=&quo

Using CreateNewUserWizard SendingMail method to email me, not applicatnt.


I have staff area of my site I am protecting with forms authentication using c# and .Net 4.0. What I want to do is let the staff members register on the site but instead of the confermation email being sent to them I want it sent to me so I can go in and approve it. I have been trying to use the SendingMail method  but can not figure out how to get it to email me instead of the person that registered. I have searched around this site and find many topics on the SendingMail method but none seem to properly address my issue. Can anyone help me out?

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?

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