Author Topic: Silverlight tagging?  (Read 3492 times)

zweibier

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Silverlight tagging?
« on: March 28, 2009, 10:46:16 pm »
Hey,
I'm doing some C# programming with Silverlight. Slickedit (2009) seems to automatically tag regular .NET libraries and use them which, naturally, is not what I want. Can I have a per-project C# configuration which uses tags based on the Silverlight libs, as opposed to the desktop .NET libs?

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Silverlight tagging?
« Reply #1 on: March 30, 2009, 05:15:37 pm »
You can create your own library of .NET symbols, which will be used in addition to the "stock" tagging of the .NET Framework directories.

Go to Tools > Tag Files to bring up the Context Tagging dialog. Highlight the folder for "C#" Tag Files in the left-hand side tree. Click the Add Tag File... button at the bottom, and pick a location for your new tagfile. Default location in your config is just fine. Just name it Silverlight.vtg or something similar.

When the Add Tree dialog appears, manually change the File Types: filter from .cs to *.dll;*.xml, since you're tagging assemblies instead of C# source. Then pick the directory where your Silverlight dlls and/or reference assemblies are installed.

Be careful of the Recursive checkbox on the Add Tree dialog. Usually this is what you want, but I found that when tagging Silverlight 2.0.40115.0 (C:\Program Files\Microsoft Silverlight\2.0.40115.0), it picked up a bunch of the localizations. Once it tagged everything, I went back to the Context Tagging dialog, highlighted Silverlight.vtg, then selected all of the files from the localization subdirectories (except for en-us), and used the Remove Src File button to remove the redundant tags.

If you *only* want Silverlight tags whenever you edit .Net source, then simply remove the stock dotnet.vtg file by highlighting it and using the Remove Tag File button.

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Silverlight tagging?
« Reply #2 on: March 30, 2009, 05:25:42 pm »
Option #2 for building your Silverlight-only tag file.

Go to Tools > Tag Files, and click the Auto Tag button. Uncheck the C++ compiler libraries and Java compiler options since you don't need to rebuild them. Under the .NET Frameworks section, use the Browse button to choose the C:\Program Files\Microsoft Silverlight\2.0.40115.0 directory (or wherever the version you're using resides). Click Create tag files, and it'll bring in all those assemblies. When it's finished, select the dotnet.vtg file entry in the Context Tagging dialog, and then select the localized DLLs you don't need. (Image attached)

zweibier

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: Silverlight tagging?
« Reply #3 on: March 31, 2009, 12:09:11 pm »
Thanks Matthew,
this solved the immediate problem of using the right tags for the Silverlight project.
Your method though replaces the default .NET tag file. It means that, when switching between the .NET and Silverlight projects, one has to regenerate that tag file.
Not a terribly big problem but still, kind of inconvenience. Or, there's a way to automatically associate certain tag files, depending on the project?

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Silverlight tagging?
« Reply #4 on: March 31, 2009, 04:36:20 pm »
Right now we don't have that facility for .NET code. We have something similar for our C/C++ tagging with multiple compiler-specific tagging databases. The ideal solution is to build the tagfile for the project itself, and look in the project file(s) for the referenced assemblies and tag those as needed. But we're not there yet.