From aff7c6f92f60e1f25005ef05249a20dfac94b114 Mon Sep 17 00:00:00 2001 From: Mark Lintell Date: Thu, 3 Sep 2015 12:44:06 +0100 Subject: [PATCH 1/2] Initial repository clone --- SlowCheetah/Properties/Settings.Designer.cs | 220 +++--- SlowCheetah/Resources.Designer.cs | 564 +++++++-------- SlowCheetah/SlowCheetah.csproj | 642 +++++++++--------- .../SlowCheetah_UnitTests.csproj | 234 +++---- SlowCheetah/app.config | 140 ++-- 5 files changed, 900 insertions(+), 900 deletions(-) diff --git a/SlowCheetah/Properties/Settings.Designer.cs b/SlowCheetah/Properties/Settings.Designer.cs index b11136b..197358f 100644 --- a/SlowCheetah/Properties/Settings.Designer.cs +++ b/SlowCheetah/Properties/Settings.Designer.cs @@ -1,110 +1,110 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.34014 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace SlowCheetah.VisualStudio.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Microsoft\\MSBuild\\SlowCheetah\\v2.5.11\\")] - public string InstallPath { - get { - return ((string)(this["InstallPath"])); - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("SlowCheetah.Xdt.dll")] - public string TransformAssemblyPath { - get { - return ((string)(this["TransformAssemblyPath"])); - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("%LOCALAPPDATA%")] - public string InstallUserFolder { - get { - return ((string)(this["InstallUserFolder"])); - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("$(LOCALAPPDATA)")] - public string InstallUserFolderMSBuild { - get { - return ((string)(this["InstallUserFolderMSBuild"])); - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("SlowCheetah.Transforms.targets")] - public string TargetsFilename { - get { - return ((string)(this["TargetsFilename"])); - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("SlowCheetahTargets")] - public string SlowCheetahTargets { - get { - return ((string)(this["SlowCheetahTargets"])); - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute(".htm;.html;.cs.vb;.txt;.jpg;.png;.ico;.aspx;.snk;.dll;.pdb;.settings")] - public string ExcludedFileExtensions { - get { - return ((string)(this["ExcludedFileExtensions"])); - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("SlowCheetah.Xdt.TransformXml")] - public string TransformXmlTaskName { - get { - return ((string)(this["TransformXmlTaskName"])); - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("SlowCheetah")] - public string SlowCheetahNugetPkgName { - get { - return ((string)(this["SlowCheetahNugetPkgName"])); - } - set { - this["SlowCheetahNugetPkgName"] = value; - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SlowCheetah.VisualStudio.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Microsoft\\MSBuild\\SlowCheetah\\v2.5.11\\")] + public string InstallPath { + get { + return ((string)(this["InstallPath"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("SlowCheetah.Xdt.dll")] + public string TransformAssemblyPath { + get { + return ((string)(this["TransformAssemblyPath"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("%LOCALAPPDATA%")] + public string InstallUserFolder { + get { + return ((string)(this["InstallUserFolder"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("$(LOCALAPPDATA)")] + public string InstallUserFolderMSBuild { + get { + return ((string)(this["InstallUserFolderMSBuild"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("SlowCheetah.Transforms.targets")] + public string TargetsFilename { + get { + return ((string)(this["TargetsFilename"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("SlowCheetahTargets")] + public string SlowCheetahTargets { + get { + return ((string)(this["SlowCheetahTargets"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute(".htm;.html;.cs.vb;.txt;.jpg;.png;.ico;.aspx;.snk;.dll;.pdb;.settings")] + public string ExcludedFileExtensions { + get { + return ((string)(this["ExcludedFileExtensions"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("SlowCheetah.Xdt.TransformXml")] + public string TransformXmlTaskName { + get { + return ((string)(this["TransformXmlTaskName"])); + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("SlowCheetah")] + public string SlowCheetahNugetPkgName { + get { + return ((string)(this["SlowCheetahNugetPkgName"])); + } + set { + this["SlowCheetahNugetPkgName"] = value; + } + } + } +} diff --git a/SlowCheetah/Resources.Designer.cs b/SlowCheetah/Resources.Designer.cs index c4c6904..9c86ad8 100644 --- a/SlowCheetah/Resources.Designer.cs +++ b/SlowCheetah/Resources.Designer.cs @@ -1,282 +1,282 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.34014 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace SlowCheetah.VisualStudio { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SlowCheetah.VisualStudio.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to Slow Cheetah. - /// - internal static string _100 { - get { - return ResourceManager.GetString("100", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to General. - /// - internal static string _101 { - get { - return ResourceManager.GetString("101", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Cannot find the preview tool {0}. Verify the settings in the 'Config Transform' category of Tools\Options.. - /// - internal static string Error_CantFindPreviewTool { - get { - return ResourceManager.GetString("Error_CantFindPreviewTool", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No preview tool specified. You can set a preview tool in the 'Config Transform' category of Tools\Options.. - /// - internal static string Error_NoPreviewToolSpecified { - get { - return ResourceManager.GetString("Error_NoPreviewToolSpecified", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unable to save the project file {0}. {1}. - /// - internal static string Error_SavingProjectFile { - get { - return ResourceManager.GetString("Error_SavingProjectFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The source file for the transform {0} was not found.. - /// - internal static string Error_SourceFileNotFound { - get { - return ResourceManager.GetString("Error_SourceFileNotFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The transform file {0} was not found.. - /// - internal static string Error_TransformFileNotFound { - get { - return ResourceManager.GetString("Error_TransformFileNotFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The command line to pass to the preview tool. {0} is the original file, {1} is the transformed file. - /// - internal static string PropDesc_PreviewToolCommandLine { - get { - return ResourceManager.GetString("PropDesc_PreviewToolCommandLine", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The full path to the tool used to show the results of the transformation. - /// - internal static string PropDesc_PreviewToolExecutablePath { - get { - return ResourceManager.GetString("PropDesc_PreviewToolExecutablePath", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Set to false to disable the preview tool and just show the transformed file. - /// - internal static string PropDesc_RunPreviewTool { - get { - return ResourceManager.GetString("PropDesc_RunPreviewTool", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Preview Tool Command Line. - /// - internal static string PropName_PreviewToolCommandLine { - get { - return ResourceManager.GetString("PropName_PreviewToolCommandLine", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Preview Tool Executable Path. - /// - internal static string PropName_PreviewToolExecutablePath { - get { - return ResourceManager.GetString("PropName_PreviewToolExecutablePath", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Run Preview Tool. - /// - internal static string PropName_RunPreviewTool { - get { - return ResourceManager.GetString("PropName_RunPreviewTool", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to In order to support transforms your project file will need to be modified. This will cause your project to be unloaded and then reloaded. If your project is checked into source control then it may be checked out.\n\nChoose Yes to proceed otherwise No.. - /// - internal static string String_AddImportText { - get { - return ResourceManager.GetString("String_AddImportText", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Add Transform Project Import. - /// - internal static string String_AddImportTitle { - get { - return ResourceManager.GetString("String_AddImportTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to {0}.{1}{2}. - /// - internal static string String_FormatTransformFilename { - get { - return ResourceManager.GetString("String_FormatTransformFilename", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to $(). - /// - internal static string String_ImportPath { - get { - return ResourceManager.GetString("String_ImportPath", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SlowCheetahImport. - /// - internal static string String_SlowCheetahImportProp { - get { - return ResourceManager.GetString("String_SlowCheetahImportProp", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8" ?>\n<!-- For more information on using transformations see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->\n. - /// - internal static string String_TransformFileContents { - get { - return ResourceManager.GetString("String_TransformFileContents", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8" ?> - ///<!-- For more information on using transformations - /// see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. --> - ///. - /// - internal static string TransformContents { - get { - return ResourceManager.GetString("TransformContents", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to {0} Preview. - /// - internal static string TransformPreview_Caption { - get { - return ResourceManager.GetString("TransformPreview_Caption", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Original {0}. - /// - internal static string TransformPreview_LeftLabel { - get { - return ResourceManager.GetString("TransformPreview_LeftLabel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Transformed {0} (by {1} ). - /// - internal static string TransformPreview_RightLabel { - get { - return ResourceManager.GetString("TransformPreview_RightLabel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to {0} Preview. - /// - internal static string TransformPreview_ToolTip { - get { - return ResourceManager.GetString("TransformPreview_ToolTip", resourceCulture); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SlowCheetah.VisualStudio { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SlowCheetah.VisualStudio.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Slow Cheetah. + /// + internal static string _100 { + get { + return ResourceManager.GetString("100", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to General. + /// + internal static string _101 { + get { + return ResourceManager.GetString("101", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the preview tool {0}. Verify the settings in the 'Config Transform' category of Tools\Options.. + /// + internal static string Error_CantFindPreviewTool { + get { + return ResourceManager.GetString("Error_CantFindPreviewTool", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No preview tool specified. You can set a preview tool in the 'Config Transform' category of Tools\Options.. + /// + internal static string Error_NoPreviewToolSpecified { + get { + return ResourceManager.GetString("Error_NoPreviewToolSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to save the project file {0}. {1}. + /// + internal static string Error_SavingProjectFile { + get { + return ResourceManager.GetString("Error_SavingProjectFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The source file for the transform {0} was not found.. + /// + internal static string Error_SourceFileNotFound { + get { + return ResourceManager.GetString("Error_SourceFileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The transform file {0} was not found.. + /// + internal static string Error_TransformFileNotFound { + get { + return ResourceManager.GetString("Error_TransformFileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The command line to pass to the preview tool. {0} is the original file, {1} is the transformed file. + /// + internal static string PropDesc_PreviewToolCommandLine { + get { + return ResourceManager.GetString("PropDesc_PreviewToolCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The full path to the tool used to show the results of the transformation. + /// + internal static string PropDesc_PreviewToolExecutablePath { + get { + return ResourceManager.GetString("PropDesc_PreviewToolExecutablePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set to false to disable the preview tool and just show the transformed file. + /// + internal static string PropDesc_RunPreviewTool { + get { + return ResourceManager.GetString("PropDesc_RunPreviewTool", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preview Tool Command Line. + /// + internal static string PropName_PreviewToolCommandLine { + get { + return ResourceManager.GetString("PropName_PreviewToolCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preview Tool Executable Path. + /// + internal static string PropName_PreviewToolExecutablePath { + get { + return ResourceManager.GetString("PropName_PreviewToolExecutablePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Run Preview Tool. + /// + internal static string PropName_RunPreviewTool { + get { + return ResourceManager.GetString("PropName_RunPreviewTool", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In order to support transforms your project file will need to be modified. This will cause your project to be unloaded and then reloaded. If your project is checked into source control then it may be checked out.\n\nChoose Yes to proceed otherwise No.. + /// + internal static string String_AddImportText { + get { + return ResourceManager.GetString("String_AddImportText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add Transform Project Import. + /// + internal static string String_AddImportTitle { + get { + return ResourceManager.GetString("String_AddImportTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}.{1}{2}. + /// + internal static string String_FormatTransformFilename { + get { + return ResourceManager.GetString("String_FormatTransformFilename", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to $(). + /// + internal static string String_ImportPath { + get { + return ResourceManager.GetString("String_ImportPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SlowCheetahImport. + /// + internal static string String_SlowCheetahImportProp { + get { + return ResourceManager.GetString("String_SlowCheetahImportProp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8" ?>\n<!-- For more information on using transformations see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->\n. + /// + internal static string String_TransformFileContents { + get { + return ResourceManager.GetString("String_TransformFileContents", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8" ?> + ///<!-- For more information on using transformations + /// see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. --> + ///. + /// + internal static string TransformContents { + get { + return ResourceManager.GetString("TransformContents", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} Preview. + /// + internal static string TransformPreview_Caption { + get { + return ResourceManager.GetString("TransformPreview_Caption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Original {0}. + /// + internal static string TransformPreview_LeftLabel { + get { + return ResourceManager.GetString("TransformPreview_LeftLabel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Transformed {0} (by {1} ). + /// + internal static string TransformPreview_RightLabel { + get { + return ResourceManager.GetString("TransformPreview_RightLabel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} Preview. + /// + internal static string TransformPreview_ToolTip { + get { + return ResourceManager.GetString("TransformPreview_ToolTip", resourceCulture); + } + } + } +} diff --git a/SlowCheetah/SlowCheetah.csproj b/SlowCheetah/SlowCheetah.csproj index 195f187..8a1942d 100644 --- a/SlowCheetah/SlowCheetah.csproj +++ b/SlowCheetah/SlowCheetah.csproj @@ -1,322 +1,322 @@ - - - - - - Debug - AnyCPU - 2.0 - {82981C27-9587-42C7-90C3-9CB88D59C3F1} - {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Library - Properties - SlowCheetah.VisualStudio - SlowCheetah - True - Key.snk - v4.5 - - - - - - - - - ..\ - true - $(VisualStudioVersion) - - - - - 4.0 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - Program - $(DevEnvDir)devenv.exe - /rootsuffix Exp - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - Program - $(DevEnvDir)devenv.exe - /rootsuffix Exp - false - False - - - - - - - - - - - - - - - - - - false - - - - ..\packages\Microsoft.Web.Xdt.1.0.0-alpha\lib\net40\Microsoft.Web.XmlTransform.dll - - - ..\packages\NuGet.VisualStudio.2.2.0\lib\net40\NuGet.VisualStudio.dll - True - - - ..\packages\SlowCheetah.Xdt.1.1.1-beta\lib\SlowCheetah.Xdt.dll - - - - - - - - - - - True - - - - - {80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2} - 8 - 0 - 0 - primary - False - False - - - {26AD1324-4B7C-44BC-84F8-B86AED45729F} - 10 - 0 - 0 - primary - False - False - - - {1A31287A-4D7D-413E-8E32-3B374931BD89} - 8 - 0 - 0 - primary - False - False - - - {2CE2370E-D744-4936-A090-3FFFE667B0E1} - 9 - 0 - 0 - primary - False - False - - - {1CBA492E-7263-47BB-87FE-639000619B15} - 8 - 0 - 0 - primary - False - False - - - {00020430-0000-0000-C000-000000000046} - 2 - 0 - 0 - primary - False - False - - - - - - - Component - - - - - - - - - - - - True - True - Settings.settings - - - True - True - Resources.resx - - - - - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - true - VSPackage - - - - - - Designer - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - Designer - - - - - Always - true - - - Always - - - Always - true - - - Always - true - - - - - true - - - - - - - - Menus.ctmenu - Designer - - - - - - - Designer - - - - - - False - Microsoft .NET Framework 4 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 4.5 - true - - - - true - - - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - - - - + + + + + + Debug + AnyCPU + 2.0 + {82981C27-9587-42C7-90C3-9CB88D59C3F1} + {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Library + Properties + SlowCheetah.VisualStudio + SlowCheetah + True + Key.snk + v4.5 + + + + + + + + + ..\ + true + $(VisualStudioVersion) + + + + + 4.0 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + Program + $(DevEnvDir)devenv.exe + /rootsuffix Exp + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + Program + $(DevEnvDir)devenv.exe + /rootsuffix Exp + false + False + + + + + + + + + + + + + + + + + + false + + + + ..\packages\Microsoft.Web.Xdt.1.0.0-alpha\lib\net40\Microsoft.Web.XmlTransform.dll + + + ..\packages\NuGet.VisualStudio.2.2.0\lib\net40\NuGet.VisualStudio.dll + True + + + ..\packages\SlowCheetah.Xdt.1.1.1-beta\lib\SlowCheetah.Xdt.dll + + + + + + + + + + + True + + + + + {80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2} + 8 + 0 + 0 + primary + False + False + + + {26AD1324-4B7C-44BC-84F8-B86AED45729F} + 10 + 0 + 0 + primary + False + False + + + {1A31287A-4D7D-413E-8E32-3B374931BD89} + 8 + 0 + 0 + primary + False + False + + + {2CE2370E-D744-4936-A090-3FFFE667B0E1} + 9 + 0 + 0 + primary + False + False + + + {1CBA492E-7263-47BB-87FE-639000619B15} + 8 + 0 + 0 + primary + False + False + + + {00020430-0000-0000-C000-000000000046} + 2 + 0 + 0 + primary + False + False + + + + + + + Component + + + + + + + + + + + + True + True + Settings.settings + + + True + True + Resources.resx + + + + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + true + VSPackage + + + + + + Designer + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + Designer + + + + + Always + true + + + Always + + + Always + true + + + Always + true + + + + + true + + + + + + + + Menus.ctmenu + Designer + + + + + + + Designer + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 4.5 + true + + + + true + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + \ No newline at end of file diff --git a/SlowCheetah/SlowCheetah_UnitTests/SlowCheetah_UnitTests.csproj b/SlowCheetah/SlowCheetah_UnitTests/SlowCheetah_UnitTests.csproj index af855c0..4546447 100644 --- a/SlowCheetah/SlowCheetah_UnitTests/SlowCheetah_UnitTests.csproj +++ b/SlowCheetah/SlowCheetah_UnitTests/SlowCheetah_UnitTests.csproj @@ -1,118 +1,118 @@ - - - - Debug - AnyCPU - 2.0 - {2FAF5A09-3AA5-43BB-BC9A-608CE27ABBE4} - Library - Properties - SlowCheetah_UnitTests - SlowCheetah_UnitTests - v4.5 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - - - - - - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - Key.snk - - - true - - - - - - - - - - - - - - - - - False - ..\..\lib\Microsoft.VSSDK.TestHostFramework.dll - - - False - ..\..\lib\Microsoft.VSSDK.UnitTestLibrary.dll - - - - - - - - - - - - - - - - - - - - - - - - - Resources\Install\SlowCheetah.Transforms.targets - - - - - - {82981C27-9587-42C7-90C3-9CB88D59C3F1} - SlowCheetah - - - - - Resources\Install\Microsoft.Web.XmlTransform.dll - - - Resources\Install\SlowCheetah.Xdt.dll - - - - - Resources\Install\Install-Manifest.xml - - - + + + + Debug + AnyCPU + 2.0 + {2FAF5A09-3AA5-43BB-BC9A-608CE27ABBE4} + Library + Properties + SlowCheetah_UnitTests + SlowCheetah_UnitTests + v4.5 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + + + + + + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + Key.snk + + + true + + + + + + + + + + + + + + + + + False + ..\..\lib\Microsoft.VSSDK.TestHostFramework.dll + + + False + ..\..\lib\Microsoft.VSSDK.UnitTestLibrary.dll + + + + + + + + + + + + + + + + + + + + + + + + + Resources\Install\SlowCheetah.Transforms.targets + + + + + + {82981C27-9587-42C7-90C3-9CB88D59C3F1} + SlowCheetah + + + + + Resources\Install\Microsoft.Web.XmlTransform.dll + + + Resources\Install\SlowCheetah.Xdt.dll + + + + + Resources\Install\Install-Manifest.xml + + + \ No newline at end of file diff --git a/SlowCheetah/app.config b/SlowCheetah/app.config index 998b2cd..4449326 100644 --- a/SlowCheetah/app.config +++ b/SlowCheetah/app.config @@ -1,70 +1,70 @@ - - - - -
-
- - -
- - - - - - Microsoft\MSBuild\SlowCheetah\v1\ - - - SlowCheetah.Xdt.dll - - - %LOCALAPPDATA% - - - $(LOCALAPPDATA) - - - SlowCheetah.Transforms.targets - - - SlowCheetahTargets - - - .htm;.html;.cs.vb;.txt;.jpg;.png;.ico;.aspx;.snk;.dll;.pdb;.settings - - - SlowCheetah.Xdt.TransformXml - - - - - Microsoft\MSBuild\SlowCheetah\v1\ - - - Microsoft.Web.XmlTransform.dll - - - %LOCALAPPDATA% - - - SlowCheetah.Xdt.TransformXml - - - $(LOCALAPPDATA) - - - SlowCheetah.Transforms.targets - - - SlowCheetahTargets - - - - - - - SlowCheetah - - - - + + + + +
+
+ + +
+ + + + + + Microsoft\MSBuild\SlowCheetah\v1\ + + + SlowCheetah.Xdt.dll + + + %LOCALAPPDATA% + + + $(LOCALAPPDATA) + + + SlowCheetah.Transforms.targets + + + SlowCheetahTargets + + + .htm;.html;.cs.vb;.txt;.jpg;.png;.ico;.aspx;.snk;.dll;.pdb;.settings + + + SlowCheetah.Xdt.TransformXml + + + + + Microsoft\MSBuild\SlowCheetah\v1\ + + + Microsoft.Web.XmlTransform.dll + + + %LOCALAPPDATA% + + + SlowCheetah.Xdt.TransformXml + + + $(LOCALAPPDATA) + + + SlowCheetah.Transforms.targets + + + SlowCheetahTargets + + + + + + + SlowCheetah + + + + From da263763286cdddde687ead217d1277e4abd1e6d Mon Sep 17 00:00:00 2001 From: Mark Lintell Date: Thu, 3 Sep 2015 12:59:21 +0100 Subject: [PATCH 2/2] Modified the Preview Transform functionality to handle publish profiles --- SlowCheetah/SlowCheetahPackage.cs | 79 +++++++++++++++++++++++++++---- 1 file changed, 71 insertions(+), 8 deletions(-) diff --git a/SlowCheetah/SlowCheetahPackage.cs b/SlowCheetah/SlowCheetahPackage.cs index 7d760bc..3274933 100644 --- a/SlowCheetah/SlowCheetahPackage.cs +++ b/SlowCheetah/SlowCheetahPackage.cs @@ -355,7 +355,6 @@ private void OnAddTransformCommand(object sender, EventArgs e) throw new COMException(string.Format(Resources.Error_SavingProjectFile, itemFullPath, GetErrorInfo()), hr); } ProjectItem selectedProjectItem = GetProjectItemFromHierarchy(hierarchy, itemid); - Project project = null; if (selectedProjectItem != null) { // need to enure that this item has metadata TransformOnBuild set to true if (buildPropertyStorage != null) { @@ -409,7 +408,6 @@ private List GetPublishProfileTransforms(IVsHierarchy hierarchy,string p IVsProjectSpecialFiles specialFiles = hierarchy as IVsProjectSpecialFiles; if (specialFiles != null) { uint itemid; - string filePath; specialFiles.GetFile((int)__PSFFILEID2.PSFFILEID_AppDesigner, (uint)__PSFFLAGS.PSFF_FullPath, out itemid, out propertiesFolder); } } @@ -815,19 +813,80 @@ private void PreviewTransform(IVsHierarchy hier, string sourceFile, string trans this.LogMessageWriteLineFormat("SlowCheetah PreviewTransform"); FileInfo sourceFileInfo = new FileInfo(sourceFile); // dest file + + + IVsProject vsProject = (IVsProject)hier; + string projectFullPath; + if (ErrorHandler.Failed(vsProject.GetMkDocument(VSConstants.VSITEMID_ROOT, out projectFullPath))) + { + projectFullPath = null; + } + + // Determine if the transformFile is a publish profile transform and if it is then see if a configuration transform exists + string configTransformFile = null; + if (!string.IsNullOrWhiteSpace(projectFullPath)) + { + List publishProfiles = this.GetPublishProfileTransforms(hier, projectFullPath); + FileInfo transformFileInfo = new FileInfo(transformFile); + string transformName = transformFileInfo.Name; + string transformExt = transformFileInfo.Extension; + + foreach (string publishProfile in publishProfiles) + { + int dotPos = publishProfile.IndexOf(".", StringComparison.Ordinal); + string prefixedProfile = (dotPos < 0) ? "." + publishProfile : publishProfile.Substring(dotPos); + + int profilePos = transformName.IndexOf(prefixedProfile + transformExt, StringComparison.OrdinalIgnoreCase); + if (profilePos >= 0) + { + string configTransformName = transformName.Remove(profilePos, prefixedProfile.Length); + string configTransformPath = transformFileInfo.DirectoryName; + + int found; + uint itemId; + VSDOCUMENTPRIORITY[] priority = new VSDOCUMENTPRIORITY[1]; + int success = vsProject.IsDocumentInProject(configTransformName, out found, priority, out itemId); + + if ((success == VSConstants.S_OK) && (found != 0)) + { + var configTransformTemp = !string.IsNullOrWhiteSpace(configTransformPath) + ? Path.Combine(configTransformPath, configTransformName) + : configTransformName; + + if (File.Exists(configTransformTemp)) + { + configTransformFile = configTransformTemp; + break; + } + } + } + } + } + string destFile = this.GetTempFilename(true, sourceFileInfo.Extension); - // perform the transform and then display the result into the diffmerge tool that comes with VS. If for - // some reason we can't find it, we just open it in an editor window - ITransformer transformer = new Transformer(); - transformer.Transform(sourceFile, transformFile, destFile); + // Perform the appropriate transforms + if (!string.IsNullOrWhiteSpace(configTransformFile)) + { + ITransformer transformer = new Transformer(); + transformer.Transform(sourceFile, configTransformFile, destFile); + transformer.Transform(destFile, transformFile, destFile); + } + else + { + ITransformer transformer = new Transformer(); + transformer.Transform(sourceFile, transformFile, destFile); + } // Does the customer want a preview? - if (optionsPage.EnablePreview == false) { + if (optionsPage.EnablePreview == false) + { GetDTE().ItemOperations.OpenFile(destFile); } else { + // Display the transform result into the diffmerge tool that comes with VS. If for + // some reason we can't find it, we just open it in an editor window Guid SID_SVsDifferenceService = new Guid("{77115E75-EF9E-4F30-92F2-3FE78BCAF6CF}"); Guid IID_IVsDifferenceService = new Guid("{E20E53BE-8B7A-408F-AEA7-C0AAD6D1B946}"); uint VSDIFFOPT_RightFileIsTemporary = 0x00000020; //The right file is a temporary file explicitly created for diff. @@ -847,9 +906,13 @@ private void PreviewTransform(IVsHierarchy hier, string sourceFile, string trans Debug.Assert(openComparisonWindow2 != null); if(openComparisonWindow2 != null) { + var transformLabel = !string.IsNullOrWhiteSpace(configTransformFile) + ? string.Format("{0}, {1}", Path.GetFileName(configTransformFile), Path.GetFileName(transformFile)) + : Path.GetFileName(transformFile); + string sourceName = Path.GetFileName(sourceFile); string leftLabel = string.Format(CultureInfo.CurrentCulture, Resources.TransformPreview_LeftLabel, sourceName); - string rightLabel = string.Format(CultureInfo.CurrentCulture, Resources.TransformPreview_RightLabel, sourceName, Path.GetFileName(transformFile)); + string rightLabel = string.Format(CultureInfo.CurrentCulture, Resources.TransformPreview_RightLabel, sourceName, transformLabel); string caption = string.Format(CultureInfo.CurrentCulture, Resources.TransformPreview_Caption, sourceName); string tooltip = string.Format(CultureInfo.CurrentCulture, Resources.TransformPreview_ToolTip, sourceName); object[] paras = new object[] {sourceFile, destFile, caption, tooltip, leftLabel, rightLabel, null, null, VSDIFFOPT_RightFileIsTemporary};