C# Specifications: Using Visual Studio 2013 to compile a DLL and EXE

Translate This Page

C# Specifications: Using Visual Studio 2013 to compile a DLL and EXE

Rate This
  • Comments 1

To see how to use Raspberry Pi with C#, go to the link at:

Now on to Visual Studio 2013 and compiling

Using Visual Studio 2013 to compile your DLL and EXE is pretty easy when you use C# or Visual Basic, in this case I am using C# and not Visual Basic, but the process is about the same for both languages.  C++ has some other issues.

Open the C# specifications and go to paragraph 1.2 and now we will repeat the same process that I detailed in the blog, but this time we will use Visual Studio 2013.

Open Visual Studio and start a new project, since this is a console app, boring I know, start a console project, this will build a template that requires some changes.  In normal production, these extra files are useful, but for now to make this an apple to apple comparison you will need to scroll to better understand how to implement the project. 

  • Use the automatically named classes in both cases, the console app will have a class named program.cs and the library has a class named class.cs. 
  • From the specification paragraph, just paste the test.cs code into program.cs and the acme.cs code into the library class named class.cs. 
  • Add a source reference to the Acme project in the test project (see below on how to do that).

image

Now add the project to generate the DLL, the file needs to be named acme to match the specification, you will need to scroll down:

image

image

Adding the reference to the Acme library

image

image

Finally you will see:

image

 

What the code will look like when you have created the console project and the library object

image

To run the program

image

Leave a Comment
  • Please add 3 and 2 and type the answer here:
  • Post
  • plz write your notes upwards. so that one can come to know it before read

Page 1 of 1 (1 items)
Generic Content

Legal Note:

  1. The author, Sam Stokes, is an employee of Microsoft
  2. There is no guarantee that anything I write is correct, I do try to make sure that what I write is correct.
  3. Use anything written in this blog at your own risk
  4. Test what I write about before using the information
  • Sometimes posts will disappear because I realized that they really don't fit with the total chaos of what I write about
  • Links are tested and available on date of publication, what others do with their links are out of my control

Restrictions:

  • Whatever I write on this blog is unedited by management or anyone, which should be obvious from the randomness of the blog.  I simply write about things I like.
  • Microsoft does not restrict me in anyway, so I generallyblather about whatever I want to.
  • For personal reasons I will not write about:
    • Company confidential stuff, mainly because Microsoft is more transparent than any company I have ever worked for.
    • Other people unless they give me permission to write about them