How to create assembly in c# ? [Resolved]

Posted by Raj.Net under C# on 4/16/2012 | Points: 10 | Views : 1532 | Status : [Member] | Replies : 8
hi

Creating a Private Assembly
1. in the class library add a method called TestMethod that will show a message box saying "Hello World!". In this example I have changed the default namespace and class name to better reflect the purpose of the assembly.
using System;
using System.Text;
using System.Windows.Forms;

namespace TestClassLibrary
{
public static class TestClass
{
public static void TestMethod()
{
MessageBox.Show("Hello World");
}
}
}
2.Add a console application project to the current solution and set it as the default start-up project. This will cause the console application to run when we click on play or launch the project. Let's try and use the method we just created:
using System;
using System.Collections.Generic;
using System.Text;
using TestClassLibrary;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
TestClass.TestMethod();
}
}
}
how to create strong key pair
how to launch Visual Stuadio Command Prompt in public Assembly

If it helps/directs you towards the solution,Mark This Response as Answer link
--
Rajesh



Responses

Posted by: Kk86kiran on: 4/16/2012 [Member] Starter | Points: 50

Up
0
Down

Resolved
if my answer is correct then plz mark it as an answer

k.m.j.kiran

Raj.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kk86kiran on: 4/16/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

You can not create a strong key pair for private assembly you should create a shared assembly only for creating strong key pair and you should use gac util for storing shared assembly. you have to use sn.exe to create strong key pair.

k.m.j.kiran

Raj.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 4/16/2012 [Member] Silver | Points: 25

Up
0
Down
@kiran

u r correct

Regards,
Singaravel M

Raj.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/16/2012 [Member] Bronze | Points: 25

Up
0
Down

Raj.Net

See this Video
http://www.youtube.com/watch?v=OYPq-kBQ3hQ

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Raj.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raj.Net on: 4/17/2012 [Member] Starter | Points: 25

Up
0
Down
How to create private assembly in c# ?

If it helps/directs you towards the solution,Mark This Response as Answer link
--
Rajesh

Raj.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raj.Net on: 4/17/2012 [Member] Starter | Points: 25

Up
0
Down
How to create private assembly in c# ?

If it helps/directs you towards the solution,Mark This Response as Answer link
--
Rajesh

Raj.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kk86kiran on: 4/17/2012 [Member] Starter | Points: 25

Up
0
Down
In .net by default every assembly is a private assembly only

k.m.j.kiran

Raj.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/17/2012 [Member] Bronze | Points: 25

Up
0
Down
Raj.Net

Have you Checked The That Video

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Raj.Net, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response