Skip to main content

Posts

Showing posts from 2011

XML file for Visual Studio HelpViewer 1.0

The following XML file is used in combination with the XSLT file posted in an earlier post. These 2 files transform into HMTL that views correctly in Visual Studio 2010 HelpViewer 1.0. <? xml   version = " 1.0 "   encoding = " iso-8859-1 " ?> <? xml-stylesheet   type="text/xsl" href="../xslt/gravity.xslt" ?> < HelpDocument >   < Meta >     < title > Add </ title >     < metaTitle > Add </ metaTitle >     < metaID > Help3-7F3D2D9D-Add </ metaID >     < metaParent > Help3-7F3D2D9D-Entity </ metaParent >          < metaKeywords >       < metaKeyword >         < keyword > Add </ keyword >       </ metaKeyword >   ...

XSL XSLT file for Visual Studio HelpViewer 1.0

This XSL/XSLT file is based on a Visual Studio Help file found in "C:\ProgramData\Microsoft\HelpLibrary\content\Microsoft\store\Development_Frameworks_21823146_VS_100_en-us_9.msha" I've stripped out the content and replaced with  < xsl:if   gt; etc. The values for this content are taken from XML files which have the corresponding XML element hierachy, e.g

XML to HTML

To convert XML to HTML you need an XSL (XSLT) file and some application to transform the XML to HTML using this XSL file. Usually this work is done by the browser, by including a link to the XSL file in the XML file, when you open the file in a browser it runs the transform on the XML using the XSL file you've pointed to. But I wanted to run this as a seperate step from a batch file so that I can create my .html files on disk but maintain their content using XML. Here's how I've done it: using   System ; using   System . Collections . Generic ; using   System . Linq ; using   System . Text ; using   System . Xml . Xsl ; using   System . IO ; namespace   Tool . XMLToHTML {      class   Program     {          ///   <summary>          ///  "Help\Help3\_HelpSource\gravity.xslt" "Help\Help3\_HelpSource"...

Visual Studio 2010 HelpViewer 1.0 Custom Help Creation

Recently I've been working with our legacy HTML help files, trying to add them the the new Visual Studio 2010 HelpViewer. This is not a simple task. We wanted the styling of our html to be the same as .NET help files We would also like there to be little or no maintenance required to keep them up to date with the latest Visual Studio Help Styles etc. We have a custom development language so the code snippets require their own color coding and the Language should be "Gravity" and not C# or VB. The content itself should be easily maintained. Our own applications logos and copyright should appear instead of Visual Studios. The requirements above proved to be not a simple to implement as you might think. Below I'll mention the snags I came across and describe how I overcame them. 1. Styling: The styling information was not simple to find, there are documents on http://www.helpware.net/mshelp3/intro.htm which explain some of the content of the help files, this is...

TFSbuild custom parameters and Testing

To test your Team Build Project locally with TFSBuild use the Visual Studio 2010 command prompt. here's a sample C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>TFSBuild start /collectio n:http://MYSERVER:8080 /builddefinition:"MYTFS/TestBuild" /droplocation:"\\ SOMECOMPUTER\SOMEDIRECTORY" http://msdn.microsoft.com/en-us/library/ms181742.aspx However firstly I recommend testing the syntax of your project with MsBuild e.g. C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>msbuild C:\SOMEDIR\TeamBui ldTypes\MsBuildSamples\TFSBuild.proj http://msdn.microsoft.com/en-us/library/ms181723(VS.90).aspx In order to tell msbuild to run a particular target within use something like C:\MsBuildSamples>msbuild TfsBuild.proj /t:DesktopRebuild this will run the Target "DesktopRebuild". Passing Parameters/Arguments To use parameters passed in through TFSbuild it's simple, just pass in your argument with the /property switch on the command line o...

Build with .NET 4.0 in Team Foundation Server

In order to force your Team Build to use the .NET assemblies and tools you'll need to make the following change. Change the value in the C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\tfsbuildservice.exe.config From add key="MSBuildPath" value="" to add key="MSBuildPath" value="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319" TFS service must be restarted afterwards "Visual Studio Team Foundation Build" http://blogs.infosupport.com/blogs/martijnb/archive/2010/05/04/building-visual-studio-2010-solutions-using-team-build-2008.aspx