Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeLITE with multiple projects

I am using TypeLITE with various projects and a simple web site. I would like to use TypeLITE to generate TypeScript definitions from my C# classes, but I am not allowed to add the TypeLITE dll's to every project.

Let this be my project structure:

Solution
|
|
----- WebSite (with NuGet-Installation of TypeLITE)
|
|
----- FirstProject
|
|
----- SecondProject
|
|
----- ThirdProject

I installed TypeLITE via NuGet-Console and the C#-Classes are located in "FirstProject", "SecondProject" and "ThirdProject".

Problem: I have to use the NuGet-Installation for all other projects.

Is this possible?

like image 340
thardes2 Avatar asked Jun 10 '14 11:06

thardes2


1 Answers

If you want to use definitions of classes from the FirstProject in your WebSite, you can just add reference to the FirstProject to the TypeLite.tt file inside your WebSite

<#@ assembly name="$(TargetDir)FirstProject.dll" #>

and classes from the FirstProject will become available to the TypeLITE.

(if FirstProject.dll isn't located in the bin folder of your WebSite, you have to use appropriate directory instead of $(TargetDir))

like image 129
Lukas Kabrt Avatar answered Oct 08 '22 16:10

Lukas Kabrt