JsType - mark entire project for compilation

50 views
Skip to first unread message

Jan Mikeska

unread,
Apr 7, 2013, 2:11:28 PM4/7/13
to shar...@googlegroups.com
Hello,

I'm trying to mark a whole project for compilation to Js. I added this

[assembly: JsType(JsMode.Clr, Export = true, Filename = "../../Config.AppcHtml/Libs/Core.Models.Configurator.js")]

to AssemblyInfo.cs. The project contains a number of classes in several folders. It seems that it does compile all files however the result gets overwritten by the next folder. What am I doing wrong?

Example:
FolderA - Classes A1.cs, A2.cs
FolderB - Classes B1.cs, B2.cs

Build result: only the B1 & B2 will be in the js file. If I comment out/delete all files in FolderB I will get A1 & A2 in the js file.

Regards,
Jan


Dan-el Khen

unread,
Apr 8, 2013, 11:08:01 AM4/8/13
to shar...@googlegroups.com
HI Jan,

The path you're using is relative, which means, that if a file is inside a folder, the target file will be different. What you should do is to use the tilda '~' sign to refer to the project root:
[assembly: JsType(JsMode.Clr, Export = true, Filename = "~/Config.AppcHtml/Libs/Core.Models.Configurator.js")]

Let me know if it helps.

Cheers
Dan-el





--
You received this message because you are subscribed to the Google Groups "SharpKit Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sharpkit+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jan Mikeska

unread,
Apr 8, 2013, 12:30:22 PM4/8/13
to shar...@googlegroups.com
Hi Dan-el,

It helps partially - all code gets generated. What I'm trying to achieve is to add the js to another project within the solution. The ../../ was the only thing I could think of. Is there any way to do this? I have a number of class libraries and trying to get the js they generate to a consuming website without having to copy them manually.

Many thanks,
Jan

Dan-el Khen

unread,
Apr 8, 2013, 3:22:42 PM4/8/13
to shar...@googlegroups.com
Yes, so simply use both:

~/../../a/b/c/final.js

Is this what you're going for?

Dan-el


Jan Mikeska

unread,
Apr 8, 2013, 4:05:55 PM4/8/13
to shar...@googlegroups.com
Thanks Dan-el, exactly what I needed.

Regards,
Jan

Dan-el Khen

unread,
Apr 8, 2013, 4:20:31 PM4/8/13
to shar...@googlegroups.com
Great!

Cheers
Dan-el
Reply all
Reply to author
Forward
0 new messages