Home All Groups Group Topic Archive Search About

How to reference in c# script?

Author
16 Dec 2008 12:09 AM
Bruno Neves Pires Silva
Hello, Programmers.

  I'm making some scripts in c#, but how can I reference a class
library created in visual studio ?

Thanks in advance

Bruno Neves Pires Silva

Author
16 Dec 2008 3:57 PM
Nicholas Paldino [.NET/C# MVP]
Bruno,

    What do you mean that you are making some scripts?  C# is not a
scripting language.

    Do you mean you want to reference another library in your solution, or
you want to reference a library that is not in your solution?


--
          - Nicholas Paldino [.NET/C# MVP]
          - mvp@spam.guard.caspershouse.com

Show quoteHide quote
"Bruno Neves Pires Silva" <brunonpsi***@gmail.com> wrote in message
news:aa6a72c3-3dab-40e4-95c6-c51c203da0b7@r37g2000prr.googlegroups.com...
> Hello, Programmers.
>
>  I'm making some scripts in c#, but how can I reference a class
> library created in visual studio ?
>
> Thanks in advance
>
> Bruno Neves Pires Silva
Are all your drivers up to date? click for free checkup

Author
16 Dec 2008 4:40 PM
Bruno Neves Pires Silva
Hello, Nicholas.

  I'm using c# to make scripts because thats the language of scripts
of a software I'm using, Tekla Structures. It doesnt have solutions,
only .cs files. But I want to use some class librarys of my own, but I
dont know how to reference it.

Do you how can I do that ?



On 16 dez, 13:57, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.com> wrote:
Show quoteHide quote
> Bruno,
>
>     What do you mean that you are making some scripts?  C# is not a
> scripting language.
>
>     Do you mean you want to reference another library in your solution, or
> you want to reference a library that is not in your solution?
>
> --
>           - Nicholas Paldino [.NET/C# MVP]
>           - m...@spam.guard.caspershouse.com
>
> "Bruno Neves Pires Silva" <brunonpsi***@gmail.com> wrote in messagenews:aa6a72c3-3dab-40e4-95c6-c51c203da***@r37g2000prr.googlegroups.com...
>
> > Hello, Programmers.
>
> >  I'm making some scripts in c#, but how can I reference a class
> > library created in visual studio ?
>
> > Thanks in advance
>
> > Bruno Neves Pires Silva
Author
16 Dec 2008 5:07 PM
xcal
the way Visual Studio manage its class references,
can be pure internal code, not something you can
use again with Tecla Structures. Also, I 've googled
for Tecla Structures and I didn't get anything useful.

what is "Tecla Structures" ??, the people who created
them must be able to answer you.

Carlos,

"Bruno Neves Pires Silva" <brunonpsi***@gmail.com> escribió en el mensaje
news:02c0d930-0450-4660-9cf9-530bffd96106@13g2000yql.googlegroups.com...
Hello, Nicholas.

  I'm using c# to make scripts because thats the language of scripts
of a software I'm using, Tekla Structures. It doesnt have solutions,
only .cs files. But I want to use some class librarys of my own, but I
dont know how to reference it.

Do you how can I do that ?



On 16 dez, 13:57, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.com> wrote:
Show quoteHide quote
> Bruno,
>
> What do you mean that you are making some scripts? C# is not a
> scripting language.
>
> Do you mean you want to reference another library in your solution, or
> you want to reference a library that is not in your solution?
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - m...@spam.guard.caspershouse.com
>
> "Bruno Neves Pires Silva" <brunonpsi***@gmail.com> wrote in
> messagenews:aa6a72c3-3dab-40e4-95c6-c51c203da***@r37g2000prr.googlegroups.com...
>
> > Hello, Programmers.
>
> > I'm making some scripts in c#, but how can I reference a class
> > library created in visual studio ?
>
> > Thanks in advance
>
> > Bruno Neves Pires Silva
Author
16 Dec 2008 5:15 PM
Family Tree Mike
It's called Tekla. 

The website says that they support .Net and COM, so I doubt using only .cs
files is your only option.  Their site needs to be consulted by Bruno.

Mike

Show quoteHide quote
"xcal" wrote:

> the way Visual Studio manage its class references,
> can be pure internal code, not something you can
> use again with Tecla Structures. Also, I 've googled
> for Tecla Structures and I didn't get anything useful.
>
> what is "Tecla Structures" ??, the people who created
> them must be able to answer you.
>
> Carlos,
Author
17 Dec 2008 11:23 AM
Bruno Neves Pires Silva
Here's my problem, friends:

  I have made a program that access some objects in TEKLA structures,
but externally, like a VB6 program access MS Excel, for example. But
it's too slow, and TEKLA supports C# script that is faster. I want to
make the same program in Visual Studio, turn it into a class library
(its a executable now), and use it in a c# script inside Tekla
Structures, to gain speed.

The problem is that in a pure CS file, I dont know how to reference a
managed dll.

Thanks for the help, friends.


On 16 dez, 15:15, Family Tree Mike
<FamilyTreeM***@discussions.microsoft.com> wrote:
Show quoteHide quote
> It's called Tekla.  
>
> The website says that they support .Net and COM, so I doubt using only .cs
> files is your only option.  Their site needs to be consulted by Bruno.
>
> Mike
>
> "xcal" wrote:
> > the way Visual Studio manage its class references,
> > can be pure internal code, not something you can
> > use again with Tecla Structures. Also, I 've googled
> > for Tecla Structures and I didn't get anything useful.
>
> > what is "Tecla Structures" ??, the people who created
> > them must be able to answer you.
>
> > Carlos,
Author
17 Dec 2008 12:06 PM
Peter Morris
You need to ask TEKLA support, they will be able to tell you how their
product works (hopefully).


Author
17 Dec 2008 2:45 PM
Chris Dunaway
On Dec 17, 5:23 am, Bruno Neves Pires Silva <brunonpsi***@gmail.com>
wrote:
Show quoteHide quote
> Here's my problem, friends:
>
>   I have made a program that access some objects in TEKLA structures,
> but externally, like a VB6 program access MS Excel, for example. But
> it's too slow, and TEKLA supports C# script that is faster. I want to
> make the same program in Visual Studio, turn it into a class library
> (its a executable now), and use it in a c# script inside Tekla
> Structures, to gain speed.
>
> The problem is that in a pure CS file, I dont know how to reference a
> managed dll.
>
> Thanks for the help, friends.
>
> On 16 dez, 15:15, Family Tree Mike
>
> <FamilyTreeM***@discussions.microsoft.com> wrote:
> > It's called Tekla.
>
> > The website says that they support .Net and COM, so I doubt using only .cs
> > files is your only option.  Their site needs to be consulted by Bruno.
>
> > Mike
>
> > "xcal" wrote:
> > > the way Visual Studio manage its class references,
> > > can be pure internal code, not something you can
> > > use again with Tecla Structures. Also, I 've googled
> > > for Tecla Structures and I didn't get anything useful.
>
> > > what is "Tecla Structures" ??, the people who created
> > > them must be able to answer you.
>
> > > Carlos,

If all you can work with is CSharp code, then the only way to use code
in a code library would be to use reflection and create an instance of
the class that way.

Chris
Author
17 Dec 2008 3:16 PM
xcal
it is easier to use Sharpdevelop, its free software.
I think scripts are intended for short tasks, not for project tasks

hope this helps, Carlos.


Show quoteHide quote
"Chris Dunaway" <dunaw***@gmail.com> escribió en el mensaje
news:fd99397a-2ec6-4261-9386-82a7fbcac01a@20g2000yqt.googlegroups.com...
> On Dec 17, 5:23 am, Bruno Neves Pires Silva <brunonpsi***@gmail.com>
> wrote:
>> Here's my problem, friends:
>>
>>   I have made a program that access some objects in TEKLA structures,
>> but externally, like a VB6 program access MS Excel, for example. But
>> it's too slow, and TEKLA supports C# script that is faster. I want to
>> make the same program in Visual Studio, turn it into a class library
>> (its a executable now), and use it in a c# script inside Tekla
>> Structures, to gain speed.
>>
>> The problem is that in a pure CS file, I dont know how to reference a
>> managed dll.
>>
>> Thanks for the help, friends.
>>
>> On 16 dez, 15:15, Family Tree Mike
>>
>> <FamilyTreeM***@discussions.microsoft.com> wrote:
>> > It's called Tekla.
>>
>> > The website says that they support .Net and COM, so I doubt using only
>> > .cs
>> > files is your only option.  Their site needs to be consulted by Bruno.
>>
>> > Mike
>>
>> > "xcal" wrote:
>> > > the way Visual Studio manage its class references,
>> > > can be pure internal code, not something you can
>> > > use again with Tecla Structures. Also, I 've googled
>> > > for Tecla Structures and I didn't get anything useful.
>>
>> > > what is "Tecla Structures" ??, the people who created
>> > > them must be able to answer you.
>>
>> > > Carlos,
>
> If all you can work with is CSharp code, then the only way to use code
> in a code library would be to use reflection and create an instance of
> the class that way.
>
> Chris
Author
18 Dec 2008 5:37 PM
Bruno Neves Pires Silva
This can be the solution for my problem, Chris. But I dont know how to
do it. Can you give me a tip ?

I already wrote all the code in the script, and it worked.  But I want
to put all the code a class library, because I dont want everybody in
the company looking to the source code, and then reference it - here
is my problem.



On 17 dez, 12:45, Chris Dunaway <dunaw***@gmail.com> wrote:
Show quoteHide quote
> On Dec 17, 5:23 am, Bruno Neves Pires Silva <brunonpsi***@gmail.com>
> wrote:
>
>
>
> > Here's my problem, friends:
>
> >   I have made a program that access some objects in TEKLA structures,
> > but externally, like a VB6 program access MS Excel, for example. But
> > it's too slow, and TEKLA supports C#scriptthat is faster. I want to
> > make the same program in Visual Studio, turn it into a class library
> > (its a executable now), and use it in a c#scriptinside Tekla
> > Structures, to gain speed.
>
> > The problem is that in a pure CS file, I dont know how toreferencea
> > managed dll.
>
> > Thanks for the help, friends.
>
> > On 16 dez, 15:15, Family Tree Mike
>
> > <FamilyTreeM***@discussions.microsoft.com> wrote:
> > > It's called Tekla.
>
> > > The website says that they support .Net and COM, so I doubt using only .cs
> > > files is your only option.  Their site needs to be consulted by Bruno.
>
> > > Mike
>
> > > "xcal" wrote:
> > > > the way Visual Studio manage its class references,
> > > > can be pure internal code, not something you can
> > > > use again with Tecla Structures. Also, I 've googled
> > > > for Tecla Structures and I didn't get anything useful.
>
> > > > what is "Tecla Structures" ??, the people who created
> > > > them must be able to answer you.
>
> > > > Carlos,
>
> If all you can work with is CSharp code, then the only way to use code
> in a code library would be to use reflection and create an instance of
> the class that way.
>
> Chris

Bookmark and Share