How to reference in c# script?

  • Thread starter Thread starter Bruno Neves Pires Silva
  • Start date Start date
B

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
 
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?
 
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 ?



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]
          - (e-mail address removed)

Bruno Neves Pires Silva said:
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
 
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" <[email protected]> escribió en el mensaje
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 ?



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]
- (e-mail address removed)

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
 
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
 
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.
 
You need to ask TEKLA support, they will be able to tell you how their
product works (hopefully).
 
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.

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
 
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.
 
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.
 
Back
Top