This is a migrated thread and some comments may be shown as answers.

how to recompile RadControls for Silverlight from source code

10 Answers 351 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
arthurd
Top achievements
Rank 1
arthurd asked on 02 Aug 2010, 04:49 AM
According to this article http://www.telerik.com/help/silverlight/protecting-telerik-radcontrols-assembly.html there is supposed to be build instructions with the source code. I just downloaded and unzipped RadControls_for_Silverlight_2010_2_0714_Source and I cannot find the build instructions.

I need to build with VS2010 for Silverlight 4.

Thanks

10 Answers, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 02 Aug 2010, 07:34 AM
Hi arthurd,

We are currently working on build instruction for our source and would like to apologize for the current lack of documentation on this topic.

I have attached an archive that contain two executables that will compile all of our controls. Just extract the files in the Build folder of our source code and run Build_SL.bat. Once the operation is complete all assemblies will be copied to the Binaries folder.

To successfully compile our source code you will also need to install StyleCop 4.3 (do not forget to install the MsBuild integration feature as well).

Hope this helps.


Greetings,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
arthurd
Top achievements
Rank 1
answered on 18 Oct 2010, 06:50 PM
I finally got back to trying this out. It mostly works. I installed StyleCop v4.3, copied Build_SL.BAT to the Build directory, and execed the BAT file.

I get the following error on Docking_SL.SLN when MSBUILD crashes:

Unhandled Exception: Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: MSB0001: Internal MSBuild Error: Global Request Id 3 has not been assigned and cannot be retrieved.

It does build Telerik.Windows.Controls.Docking.dll correctly. I think it was a testing project that failed which I don't really care about right now.

I changed build script to build the Debug version instead of Release and it crashes in the same place.

But the build script continues and the rest is built correctly.

0
Accepted
Milan
Telerik team
answered on 21 Oct 2010, 12:52 PM
Hi arthurd,

Could you please open Docking_SL.sln are remove the test project, save the solution and try to rebuild the control suite. Docking_SL.sln is located in Controls\Docking\Docking_SL.sln.


Greetings,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
arthurd
Top achievements
Rank 1
answered on 21 Oct 2010, 07:30 PM
I am going to consider this issue resolved because it doesn't happen when compiling the latest Q2 SP2 src code.
0
Deepak Shakya
Top achievements
Rank 1
answered on 19 Mar 2012, 05:26 AM
Hi Milan,

Is it an issue if I use StyleCop 4.7? The batch file shows that an error at the end regarding StyleCop not being 4.3. Also, could you please update the Instruction document to include the installation of StyleCop?

Cheers!
0
Deepak Shakya
Top achievements
Rank 1
answered on 20 Mar 2012, 09:06 AM
Hi Milan,
  • I installed StyleCop 4.6
  • Ran Build_SL.bat and it was a success this time.
  • Copied the new binaries from Binaries/Silverlight folder to: C:\Program Files\Telerik\RadControls for Silverlight Q3.  2011\Binaries\Protected\Silverlight
  • Updated the references in the Silverlight project to reflect new binaries. (Version  = 2011.3.1520.1040)
  • Added the Resource string in App.xaml with the application name

Result:

Still throws an error: 
  1. This version of Telerik RadControls for Silverlight is licensed only for use by AppName

I am following: http://www.telerik.com/help/silverlight/protecting-telerik-radcontrols-assembly.html

I am using this for Silverlight 4 and am using source with version: 2011.3.1220

I have been following the instructions. Don't know what I am doing wrong. Could you please reply to this thread asap as it is really close to deployment date.

0
Tina Stancheva
Telerik team
answered on 21 Mar 2012, 07:29 PM
Hello Deepak,

I wasn't able to reproduce such an issue on our side. As soon as I add the correct Telerik.Windows.Controls.Key string in the App.xaml file in a sample Silverlight application, the solution can be build and runs as expected.

Can you make sure that you've followed all steps from the Protecting Telerik RadControls assembly tutorial? If you have, can you send us a sample application reproducing the issue - add just a couple of RadControls and the Telerik.Windows.Controls.dll, so that we can investigate the case further?

On a side note, I want to encourage you to take advantage of the support ticketing system (http://www.telerik.com/account/support-tickets/new-support-ticket.aspx) in cases when you need a prompt response to urgent issues. This is the best way to reach our support staff - the support system assigns a response time for all of your questions, depending on your license and ensures that all questions will reach the respective developers, if needed.

Regards,
Tina Stancheva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Deepak Shakya
Top achievements
Rank 1
answered on 22 Mar 2012, 08:48 AM
Hi Tina,

Thanks for your reply. I can confirm that I have followed the instructions exactly as in the tutorial and Instruction document that came with the source code. I successfully created the protected binaries by running the Build_SL.bat file.

This time I added the resource string inside the ResourceDictionary tag but outside the ResourceDictionary.MergedDictionaries as I have used xaml files for styling the controls which I had to merge in App.xaml.

The result is still the same. I get the InnerException as: 

This version of Telerik RadControls for Silverlight is licensed only for use by Tool.

 "Tool" being the name of the Application.

The StackTrace is as:

   at Telerik.Windows.AssemblyProtection.ValidatePassPhrase()
   at Telerik.Windows.AssemblyProtection.Validate()
   at Telerik.Windows.TelerikLicense.Verify(FrameworkElement target)
   at Telerik.Windows.Controls.ItemsControl..ctor()
   at Telerik.Windows.Controls.HeaderedItemsControl..ctor()
   at Telerik.Windows.Controls.Charting.ChartLegend..ctor()
   at Telerik.Windows.Controls.Charting.ChartDefaultView.InitializeChartLegend()
   at Telerik.Windows.Controls.Charting.ChartDefaultView..ctor()

Any help? 

NB: My Chart was working fine with unprotected binaries.
0
Tina Stancheva
Telerik team
answered on 22 Mar 2012, 03:03 PM
Hello Deepak,

The error is related to the protection - it basically notifies you that the Telerik.Windows.Controls.Key string doesn't match the internal const string ApplicationName in the AssemblyProtection.cs file. But if both strings match, can you try using the protected assemblies in a sample application - for example with the chart control? If it also produces the error, you can send us a support ticket with the application and the protected dlls so that we can test it on our side as well.

Also, you initially asked what is the difference between the Chart and Charting dlls. Basically in order to use RadChart control in your projects you have to add references to Telerik.Windows.Controls.Charting.dll, Telerik.Windows.Controls.dll and Telerik.Windows.Data.dll, but in order to use the new RadChartView control you need the Telerik.Windows.Controls.Chart.dll, Telerik.Windows.Controls.dll and Telerik.Windows.Data.dll. So based on the control you're using you have to choose the assembly you need in your solution (read more).

Greetings,
Tina Stancheva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Deepak Shakya
Top achievements
Rank 1
answered on 23 Mar 2012, 09:12 AM
Hi Tina,

Thanks again. I got it working finally. I prepared a test project to send it to you with RadChart and protedted assembles without making any changes. I ran it and it worked just fine with new assemblies. Huh! I went back to my original project with the same setup and it didn't work.

So I removed the reference to the ResourceDictionary for RadChart styles and removed styles from the chart and... it worked! Yeh!

So, yes, it was something to do with the existing styles (from previous versions???). So I restyled it again and works fine now.

Lesson learned: Always check for the errors in style when you upgrade the version and you get an error. This is second time it has happened it to me.

Many thanks again!

Have a great weekend ahead!

Just a note: How to I apply the internal build when I have to copy the Binaries from the internal build for Silvelight HOTFIX for silverlight 4? Do I get the source code again and re-run the batch file? Is there anyway of telling that the binaries are protected? Just incase people try to decompile the XAP and use the dll?
Tags
General Discussions
Asked by
arthurd
Top achievements
Rank 1
Answers by
Milan
Telerik team
arthurd
Top achievements
Rank 1
Deepak Shakya
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or