.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

Problem in the code of "Assembly" in Visual studio 2010

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :.NET Framework

Program is

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Myclasslib1;

namespace WindowsFormsApplication5
    public partial class Form1 : Form
        public Form1()
        class c1=new class();
        private void button1_Click(object sender, EventArgs e)
            int x=c1.sum(Convert.ToInt32(TextBox.Text),Convert.ToInt32(TextBox.Text));
 Error is

1.Error    6    'WindowsFormsApplication5.Form1.c1' does not contain a definition for 'sum'   

View Complete Post

More Related Resource Links

Problem in the code of "Assembly" in Visual studio 2010 of C#


The code is as follows

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using myclasslib;

namespace myclasslib


public partial class Form1 : Form


public Form1()




Myclass m1 = new Myclass();

Myclass2 m2 = new Myclass2();

private void button1_Click(object sender, EventArgs e)


int s = m1.Sum(35, 36, 37);



private void button2_Click(object sender, EventArgs e)


string s2=m2.StringFormat("abhishek");



class1 c1 = new class1();

private void button3_Click(object sender, EventArgs e)


int z=c1.MyFun(56,98);

MessageBox.Show(z.ToString()); } } } }

Errors are :

Error    3    The type or namespace name 'class1' could not be found (are you missing a using directive or an assembly reference?)   

Error    6    'myclasslib.Myclass2' does not contain a definition for 'StringFormat' and no extension method 'StringFormat' acceptin

Code spelling checker extension for visual studio 2010

Building a spelling checker for source code as an extension for visual studio 2010.

The Weekly Source Code 56 - Visual Studio 2010 and .NET Framework 4 Training Kit - Code Contracts, P

Do you like a big pile of source code? Well, there is an imperial buttload of source in the Visual Studio 2010 and .NET Framework 4 Training Kit . It's actually a 178 meg download, which is insane. Perhaps start your download now and get it in the morning when you get up. It's extremely well put together and I say Kudos to the folks that did it. They are better people than I. I like to explore it while watching TV myself and found myself looking through tonight. I checked my blog and while I thought I'd shared this with you before, Dear Reader, I hadn't. My bad, because it's pure gold . With C# and VB, natch. Here's an outline of what's inside. I've heard of folks setting up lunch-time study groups and going through...(read more)

Video: SharePoint 2010: Creating .NET Assembly Connectors in Visual Studio 2010 Support

Learn how the inclusion of Business Connectivity Services (BCS) creates opportunities to leverage SharePoint features and APIs against your existing line of business data that is available via direct database access or via Web services. (Length: 5:41)

Visual Studio 2010, MVC2.0, IIS7, .NET4 deployment problem

I have a problem where I can get an MVC2.0 application using .NET3.5 running in IIS, but when I upgrade it to .NET4.0, the browser just reports error 500 Internal Server Error. The problem is easy to replicate as follows.  Firstly, to show it works with .NET3.5: Create a new MVC2.0 application in Visual Studio 2010, using the inbuilt starter template. Run the application using the development server, and the Home & About pages display fine. Publish the application to a directory. Copy the directory to a subdirectory under inetpub/wwwroot on my Vista computer, running IIS7 Create a new application in IIS Manager & select the DefaultAppPool (integrated pipeline) Browse the application and Home & About pages are displayed. Then the problem I have is after upgrading to .NET4.0: Change to .NET4.0 for the project in Visual Studio Build & this runs fine with the development server. Publish the application & set up IIS as before, except choosing the application pool ASP.NET v4.0 (integrated pipeline) Browse the application, and I get the 500 Internal Server Error I'm guessing there is some extra configuration required - can anyone help? I've deliberately used the default MVC installation to eliminate any variables caused by my programming .. Thanks in advance, Steve

Error code -2068578304 When Installing Express SP1 x64 as a Part of Visual Studio 2010 Installation

Howdy! I was installing the VS 2010 on my server running Windows Server 2008 R2 x64 and all of a sudden the setup finished with " Setup completed, however, there were failures reported installing optional components. " The final status is success. The left-hand pane of the finish page reads as: The following component failed to install: Microsoft SQL Server 2008 Express Service Pack 1 (x64).   Leaving alone the fact why setup executed the custom action that tried to install SQL Server Express Edition and Compact Edition when I just asked it to install SQL components (which presumably should be SQL SMO and DMO libraries), I would like to understand what had happed to Express install.   Inspecting the .\Logs\dd_error_vs_vstdcore_100.txt file gives the following record:   [09/16/10,16:06:51] Microsoft SQL Server 2008 Express Service Pack 1 (x64): [2] Error code -2068578304 for this component is not recognized. [09/16/10,16:06:51] Microsoft SQL Server 2008 Express Service Pack 1 (x64): [2] Component Microsoft SQL Server 2008 Express Service Pack 1 (x64) returned an unexpected value. ***EndOfSession***   Further inspection of the dd_install_vs_vstdcore_100.txt provides with the info:   [09/16/10,16:02:51] Microsoft SQL Server 2008 Express Service Pack 1 (x64): GenericComponent Action: CreateProcess launched with cmd line : x:\setup\..\wcu\sse\SQLE


I'm getting an error when i connect the form(which has a chart object in it) to a database... I've another project where it is already to the database. There i couldn't find the chart object in the toolbox... please help me... PS: i'm using VISUAL STUDIO 2010

visual studio 2010 pro web site running problem


hi friends.

i seted up visual studio 2010 to my pc before 2 mounts and i did not have any problem. after i formated my pc vs2010 not running web site projects. sortly when i run it on internet explorer open but its cant open project. its like there is no any websites, what is problem.

thanks all. 

Can not add assembly reference and using .dll file from Visual studio 2008 and 2010 Type 'LibraryN


Hi all,

Please tell me the way to solved my problem to looking for a long time.

My System Info:

OS: Windows 7 - Ultimate - 64bit

VS: Visual Studio 2008 - Professional (and problem with my VS2010 installed)


I have a small project and build it to library .dll file with some function util.

From an other website (with diffirence solution). I added reference the .dll before to website.

In website, I declaration to using the function in library (dll file before). But I found error:  Error 1 Type 'LibraryName' is not defined.

And in VS2010 the problem is same.

But, run website on an other computer, it work normally.

Thanks and Best regards.

How to add notes in source code(Visual studio 2010)?


Hi can anyone pls tell me how to add notes in source code in Visual Studio 2010? I only want the notes to be viewed in source code view, not design view! 

I tried

//notes here

'notes here

but they all ended up showing in the design view, HELP PLS!

Authentication/Firewall problem and Visual studio 2010


i have windows server 2008 running on my pc. i have been able to setup client/server network with a domain. i login on th e client pc and tried to create a website project with VS2010. but each time i choose iis7 of the server i get the following error : the web server does not appear to have any authentication methods enabled. It asked for user authentication, but did not send a WWW-Authenticate header. although i have enable form authentication on the web server and i can access from the client pc the default page of IIS7.Does anyone have any explanation on that? thanks

Visual Studio 2010 Report Wizard error could not load file or assembly


Hello frnds

i am developing a website using visual studio 2010

i want to develop reports for which i am using reportviewer control

I am having a seperate project (MyControl.Model.dll) which is referenced in my website

now when i try to create a report.rdlc file using Report wizard, i gives me error "Could not load assembly MyControl.Model.dll version= publickeytoken = null or one of its dependencies. The system cannot find the file specified". 

I dont understand what this model project has to do with report.rdlc?

can anybody give me solution for this. its urgent

Thanks in advance


Visual Studio 2010 Gives Problem when I have Multiple Web Application and one refer other



I am developping the ERP Web Application. My solution structure is as given  below.

Main Web Application -  Having reference to All Module Web Application.

Common Web Application - Has Master Page, User Control, Login page, Defualt Error and etc

Module Web Application -  Having Module wise Aspx and code behind. It refer Common Web Application to reduce redundacy.

In this Context we are facing the following problem.

1) while running web application in the debug mode it gives error as 'the target assembly contains no service types.
 You may need to adjust the Code Access Security policy of this assembly'

2) Could not Debug both Module and Common Web Application.

3) In Design Time both Master or user control not renders in refered Aspx Page.

4) While I debug in visual studio 2010, it gets restart after some time.


Kindly Advice on the same.

Thanks in Advance










Creating a .NET Connectivity Assembly for Business Connectivity Services by Using Visual Studio 2010

Learn to create a BDC model that uses BCS entities in Visual Studio to access a "Training" matrix in SQL Server. The solution includes adding, updating, and deleting entities that comprise several database tables.

Cutting Edge: Code Contracts Settings in Visual Studio 2010


Code contracts in the Microsoft .NET Framework 4 rely on a few features in Visual Studio 2010. We'll review the project options for code contracts, how they affect the rewriter tool and some best practices for argument validation.

Dino Esposito

MSDN Magazine May 2011

ASP.NET 4 and Visual Studio 2010 Web Development Beta 2 Overview

Many exciting changes for ASP.NET are coming in the .NET Framework version 4. This document gives an overview of many of the new features that are included in the Beta 2 release of the .NET Framework 4 and of Visual Studio 2010.

Visual Studio 2010 Beta 2

This is a big deal. This isn't ".NET 3.6" - there are a lot of improvements of .NET 4, and it's not just "pile on a bunch of features so you get overwhelmed." I've been working with and talking to many of the teams involved and even though it's a cheesy thing to say, this is a really customer-focused release.
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