Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Building Assembly

Building Assembly

Scheduled Pinned Locked Moved C#
helptutorial
10 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DISP Jol
    wrote on last edited by
    #1

    Hi All, I am trying to create a Assembly(DLL)from .cs file that references other DLL's .. In my .cs file I include references by using USING .. eg.. using CrystalDecisions.Shared; However when I try to build it into an assembly using CSC I get an error stating "Type or namespace could not be found" Can anyone tell me how to resolve this.. Thanks JOel

    JO

    L P S 3 Replies Last reply
    0
    • D DISP Jol

      Hi All, I am trying to create a Assembly(DLL)from .cs file that references other DLL's .. In my .cs file I include references by using USING .. eg.. using CrystalDecisions.Shared; However when I try to build it into an assembly using CSC I get an error stating "Type or namespace could not be found" Can anyone tell me how to resolve this.. Thanks JOel

      JO

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      What development environment are you using? In Visual Studio C# project you need to "Add a Reference" to the other DLL's you are "using".

      led mike

      D 1 Reply Last reply
      0
      • L led mike

        What development environment are you using? In Visual Studio C# project you need to "Add a Reference" to the other DLL's you are "using".

        led mike

        D Offline
        D Offline
        DISP Jol
        wrote on last edited by
        #3

        I am using Visual Studio C# (Empty Project Template) and added reference to other DLL,s....However when trying to build assembly using CSC from command prompt I get the error.. Thanks Joel

        JO

        L 1 Reply Last reply
        0
        • D DISP Jol

          Hi All, I am trying to create a Assembly(DLL)from .cs file that references other DLL's .. In my .cs file I include references by using USING .. eg.. using CrystalDecisions.Shared; However when I try to build it into an assembly using CSC I get an error stating "Type or namespace could not be found" Can anyone tell me how to resolve this.. Thanks JOel

          JO

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          The using statement here is a shortcut only. It saves you having to type in System.IO.Path... It does not automatically add the references to the DLLs into the build process. Even though you have added the references into your csproj file, if you are building from the command line using the csc option, you need to add the references into the csc command manually. Alternatively, have you considered using a makefile to build from?

          the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
          Deja View - the feeling that you've seen this post before.

          C D 3 Replies Last reply
          0
          • D DISP Jol

            I am using Visual Studio C# (Empty Project Template) and added reference to other DLL,s....However when trying to build assembly using CSC from command prompt I get the error.. Thanks Joel

            JO

            L Offline
            L Offline
            led mike
            wrote on last edited by
            #5

            Do as Pete says below.

            led mike

            1 Reply Last reply
            0
            • P Pete OHanlon

              The using statement here is a shortcut only. It saves you having to type in System.IO.Path... It does not automatically add the references to the DLLs into the build process. Even though you have added the references into your csproj file, if you are building from the command line using the csc option, you need to add the references into the csc command manually. Alternatively, have you considered using a makefile to build from?

              the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
              Deja View - the feeling that you've seen this post before.

              C Offline
              C Offline
              Colin Angus Mackay
              wrote on last edited by
              #6

              Pete O`Hanlon wrote:

              Alternatively, have you considered using a makefile to build from?

              Can't you just point MSBUILD at a visual studio project file?


              Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

              D 1 Reply Last reply
              0
              • C Colin Angus Mackay

                Pete O`Hanlon wrote:

                Alternatively, have you considered using a makefile to build from?

                Can't you just point MSBUILD at a visual studio project file?


                Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

                D Offline
                D Offline
                DISP Jol
                wrote on last edited by
                #7

                I dont know much about the assemblies...But I ll try csc /r option.. Will let u know the results.. Joel

                JO

                1 Reply Last reply
                0
                • D DISP Jol

                  Hi All, I am trying to create a Assembly(DLL)from .cs file that references other DLL's .. In my .cs file I include references by using USING .. eg.. using CrystalDecisions.Shared; However when I try to build it into an assembly using CSC I get an error stating "Type or namespace could not be found" Can anyone tell me how to resolve this.. Thanks JOel

                  JO

                  S Offline
                  S Offline
                  sysmaniax
                  wrote on last edited by
                  #8

                  :) I use C# EE. I do it the following: having a Solution called "Application" I inserted two projects. 1. WindowsForm (Executable) 1. Class1 Class (as DLL) The Assemblies must be referenced to the DLL you use. My WindowsForm Application gets the Ref to Class1.DLL. Then my Application has to include: **using** Class1; The same works if I would handle another DLL instead of my executable WindowsForm. If you use more DLLs make sure they are "cross"-referenced, but don't overdrive... ;)

                  Andyancona andysm00@aim.com andy@biomedsrl.com

                  1 Reply Last reply
                  0
                  • P Pete OHanlon

                    The using statement here is a shortcut only. It saves you having to type in System.IO.Path... It does not automatically add the references to the DLLs into the build process. Even though you have added the references into your csproj file, if you are building from the command line using the csc option, you need to add the references into the csc command manually. Alternatively, have you considered using a makefile to build from?

                    the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
                    Deja View - the feeling that you've seen this post before.

                    D Offline
                    D Offline
                    DISP Jol
                    wrote on last edited by
                    #9

                    I use the following command.. csc /t:module Report.cs /r: C:\Crystal\CrystalDecisions.CrystalReports.Design.dll;C:\Crystal\CrystalDecisions.CrystalReports.Engine.dll;C:\Crystal\CrystalDecisions.Shared.dll;C:\Crystal\CrystalDecisions.Web.dll But I get an error saying these files could not be found.. I verified the path of these files and its right... Cant understand what m i doin wrong here Joel

                    JO

                    1 Reply Last reply
                    0
                    • P Pete OHanlon

                      The using statement here is a shortcut only. It saves you having to type in System.IO.Path... It does not automatically add the references to the DLLs into the build process. Even though you have added the references into your csproj file, if you are building from the command line using the csc option, you need to add the references into the csc command manually. Alternatively, have you considered using a makefile to build from?

                      the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
                      Deja View - the feeling that you've seen this post before.

                      D Offline
                      D Offline
                      DISP Jol
                      wrote on last edited by
                      #10

                      Pete, I was able to create a DLL using the /r option...I added reference to the dll in my web project and also used USING statement on my web form...However the Intellisense doesnt work with the classes in this assembly... Joel

                      JO

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups