Does SRT and/or SRT2 work with VS2008?

Topics: SRT, StringResourceTool
Jul 1, 2008 at 2:58 PM
Does SRT2 work with VS2008?

We've been using the original 2005 version of SRT with a very large app for several years (with many thousands of .strings file) with both VS2003 and now VS2005.

Now we're about to migrate the app to VS2008. 

Does anyone know if the original SRT or SRT2 will work with VS2008?  

If we decided to go ahead and migrate to SRT2, what differences should we expect to see between it and the original SRT? 

It's an absolutely great tool, but I'm very concerned that we're now dangerously dependent on it, and one day we'll wake up to find that neither SRT or SRT2 work with some future version of VS or .NET. 

Or worse...  peer support for both versions disappear!

Is there a commercial product that would be compatible with our existing .strings files? 

Thanks!!!
Aug 27, 2008 at 11:31 AM
With the current setup not. But you can download the source and add the registry entry creation code to the existing ones.
After that create the setup and install the custom tool. I have tried it with the vs 2008 ant it works.

Greetings
gligi
Nov 21, 2008 at 7:03 PM
I made the above changes, verified that they were present, but I still can't see the template when I choose add new item?

Any idea where to start looking for answers?

I am running VS 2008 on Windows Server 64bit.  I am running the 32bit version of VS.

Thanks for any help
-Daniel
Nov 25, 2008 at 4:21 AM
Edited Nov 25, 2008 at 4:27 AM
Hi Daniel,

I'm using a newly installed 64-bit machine with VS.NET 2008 also and faced the same problem, but have managed to resolve it

Here is the trick,

(1) Download the sourcecode
(2) Open the solution with VS.NET 2008
(3) Look for the file "SRCodeGenerator.cs" under the project "SRResourceGenerator.CustomTool"
(4) locate the methods and add the following lines.

public static void RegisterClass( Type t ) 
{
// Register for both VS.NET 2002 & 2003 ( C# )
Register( new Version( 7, 0 ), CSharpCategory );
Register( new Version( 7, 1 ), CSharpCategory );
Register( new Version( 8, 0 ), CSharpCategory );
             Register(new Version(9, 0), CSharpCategory); //add this line
//Register(new Version(9, 1), CSharpCategory); //add this line, not sure about the version


// Register for both VS.NET 2002 & 2003 ( VB )
Register( new Version( 7, 0 ), VBCategory );
Register( new Version( 7, 1 ), VBCategory );
Register( new Version( 8, 0 ), VBCategory );
             Register(new Version(9, 0), VBCategory);
//Register(new Version(9, 1), VBCategory);//add this line, not sure about the version

}

/// <summary>
/// Unregisters the generator.
/// </summary>
[ComUnregisterFunction]
public static void UnregisterClass( Type t ) 
{
// Unregister for both VS.NET 2002 & 2003 ( C# )
Unregister( new Version( 7, 0 ), CSharpCategory );
Unregister( new Version( 7, 1 ), CSharpCategory );
             Unregister( new Version( 9, 0 ), CSharpCategory );
//Unregister( new Version( 9, 1 ), CSharpCategory );//add this line, not sure about the version


// Unregister for both VS.NET 2002 & 2003 ( VB )
Unregister( new Version( 7, 0 ), VBCategory );
Unregister( new Version( 7, 1 ), VBCategory );
             Unregister(new Version(9, 0), VBCategory);
//Unregister(new Version(9, 1), VBCategory);//add this line, not sure about the version

}

(5) Rebuild the solution file as well as the setup file (Please make sure that your setup file has the right reference to the primary output of "SRResourceGenerator.CustomTool"

(6) Install the setup file


Hope that it helps, feel free to let me know if any assistance needed ;)