Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,5 @@ __pycache__/

# Deployment Framework for BizTalk
VSIX/
src/AddIn.VS2010/ProjectTemplates/DFBTProject.zip
src/AddIn.VS2013/ProjectTemplates/DFBTProject.zip
src/AddIn.VS2012/ProjectTemplates/DFBTProject.zip
src/AddIn.VS2015/ProjectTemplates/DFBTProject.zip
src/AddIn.VS2019/ProjectTemplates/DFBTProject.zip
src/Addin/ProjectTemplates/DFBTProject.zip
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 2.2.0 [Release] (1/20/2026)

* Add support for BizTalk 2020 (#4)
* Drop support for BizTalk 2016 (#6)

### 2.1.0 [Release] (1/18/2026)

* Remove support for BizTalk 2010, 2013 R1 and R2 (#3)
Expand Down
Binary file removed References/Microsoft.VisualStudio.Shell.12.0.dll
Binary file not shown.
8 changes: 4 additions & 4 deletions ToolsForVisualStudio.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
Copyright (C) 2008-Present Thomas F. Abraham. All Rights Reserved.
Licensed under the MIT License. See License.txt in the project root.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0" DefaultTargets="Build">
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0" DefaultTargets="Build">
<PropertyGroup>
<VsixVersion>2.1.0.0</VsixVersion>
<VsixVersion>2.2.0.0</VsixVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -37,14 +37,14 @@
</Target>

<Target Name="BuildAddin">
<WriteXmlValue XmlFilename="src\Addin.VS2015\source.extension.vsixmanifest" XPath="//ns:Metadata/ns:Identity/@Version" Namespace="http://schemas.microsoft.com/developer/vsx-schema/2011" Value="$(VsixVersion)" />
<WriteXmlValue XmlFilename="src\Addin.VS2019\source.extension.vsixmanifest" XPath="//ns:Metadata/ns:Identity/@Version" Namespace="http://schemas.microsoft.com/developer/vsx-schema/2011" Value="$(VsixVersion)" />

<MSBuild Projects="src\DeploymentFrameworkForBizTalkAddin.sln" Properties="Configuration=Release;Platform=Any CPU" Targets="Rebuild" />
</Target>

<Target Name="CopyAddin">
<ItemGroup>
<VsixFile Include="src\AddIn.VS2015\bin\release\DeploymentFrameworkForBizTalkToolsForVS2015.vsix" />
<VsixFile Include="src\AddIn.VS2019\bin\release\DeploymentFrameworkForBizTalkToolsForVS2019.vsix" />
</ItemGroup>

<RemoveDir Directories="VSIX" />
Expand Down
2 changes: 1 addition & 1 deletion src/AddIn.ProjectTemplate/DFBT.vstemplate
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<TemplateContent>
</TemplateContent>
<WizardExtension>
<Assembly>DeploymentFxForBizTalkAddin.ProjectWizard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e748234cd372cc72</Assembly>
<Assembly>DeploymentFxForBizTalkAddin.ProjectWizard, Version=2.2.0.0, Culture=neutral, PublicKeyToken=e748234cd372cc72</Assembly>
<FullClassName>DeploymentFramework.VisualStudioAddIn.ProjectWizard.AddProjectWizard</FullClassName>
</WizardExtension>
</VSTemplate>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VisualStudioAddIn.ProjectWizard.Test</RootNamespace>
<AssemblyName>DeploymentFxForBizTalkAddin.ProjectWizard.Test</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
174 changes: 89 additions & 85 deletions src/AddIn.ProjectWizard/AddProjectWizard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
// Copyright (C) 2008-Present Thomas F. Abraham. All Rights Reserved.
// Licensed under the MIT License. See License.txt in the project root.

using EnvDTE80;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.TemplateWizard;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using EnvDTE;
using EnvDTE80;
using Microsoft.VisualStudio.TemplateWizard;
using Microsoft.Win32;
using System.Reflection;
using System.ComponentModel;

namespace DeploymentFramework.VisualStudioAddIn.ProjectWizard
{
Expand All @@ -39,103 +39,107 @@ public void RunFinished()

public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
{
DTE2 dte = automationObject as DTE2;
ThreadHelper.JoinableTaskFactory.Run(async delegate {
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

if (dte == null)
{
MessageBox.Show(
"Cannot convert automation object to DTE2.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
DTE2 dte = automationObject as DTE2;

if (!dte.Solution.IsOpen)
{
MessageBox.Show(
"Please open your BizTalk solution, then use the Add New Project dialog on the solution to add this project.",
"Error",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
return;
}
if (dte == null)
{
MessageBox.Show(
"Cannot convert automation object to DTE2.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}

string destinationPath = replacementsDictionary["$destinationdirectory$"];
if (!dte.Solution.IsOpen)
{
MessageBox.Show(
"Please open your BizTalk solution, then use the Add New Project dialog on the solution to add this project.",
"Error",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
return;
}

if (string.IsNullOrEmpty(destinationPath))
{
MessageBox.Show(
"Cannot determine destination directory ($destinationdirectory$ is missing).",
"Error",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
return;
}
string destinationPath = replacementsDictionary["$destinationdirectory$"];

string btdfInstallDir =
(string)Registry.GetValue(@"HKEY_LOCAL_MACHINE\Software\DeploymentFrameworkForBizTalk", "InstallPath", null);
if (string.IsNullOrEmpty(destinationPath))
{
MessageBox.Show(
"Cannot determine destination directory ($destinationdirectory$ is missing).",
"Error",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
return;
}

if (string.IsNullOrEmpty(btdfInstallDir))
{
MessageBox.Show(
"Cannot find Deployment Framework registry key.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
string btdfInstallDir =
(string)Registry.GetValue(@"HKEY_LOCAL_MACHINE\Software\DeploymentFrameworkForBizTalk", "InstallPath", null);

DeploymentOptions options = new DeploymentOptions();
if (string.IsNullOrEmpty(btdfInstallDir))
{
MessageBox.Show(
"Cannot find Deployment Framework registry key. Please install the Deployment Framework for BizTalk MSI.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}

OptionsForm optionsFrm = new OptionsForm(options);
if (optionsFrm.ShowDialog() != DialogResult.OK)
{
return;
}
DeploymentOptions options = new DeploymentOptions();

OptionsForm optionsFrm = new OptionsForm(options);
if (optionsFrm.ShowDialog() != DialogResult.OK)
{
return;
}

string templateDir = Path.Combine(btdfInstallDir, @"Developer\ProjectTemplate");
string templateDir = Path.Combine(btdfInstallDir, @"Developer\ProjectTemplate");

string[] templateFiles = Directory.GetFiles(templateDir, "*.*", SearchOption.AllDirectories);
string[] templateFiles = Directory.GetFiles(templateDir, "*.*", SearchOption.AllDirectories);

try
{
CopyDirectory(templateDir, destinationPath);
}
catch (Exception ex)
{
MessageBox.Show(
"Failed to copy Deployment Framework template files to destination folder: " + ex.Message,
"Error",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
return;
}
try
{
CopyDirectory(templateDir, destinationPath);
}
catch (Exception ex)
{
MessageBox.Show(
"Failed to copy Deployment Framework template files to destination folder: " + ex.Message,
"Error",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
return;
}

string solutionName = Path.GetFileNameWithoutExtension(dte.Solution.FileName);
string projectFileName = "Deployment.btdfproj";
string projectFilePath = Path.Combine(destinationPath, projectFileName);
string solutionName = Path.GetFileNameWithoutExtension(dte.Solution.FileName);
string projectFileName = "Deployment.btdfproj";
string projectFilePath = Path.Combine(destinationPath, projectFileName);

Dictionary<string, string> replacements = new Dictionary<string, string>();
replacements.Add("[PROJECTNAME]", solutionName);
Dictionary<string, string> replacements = new Dictionary<string, string>();
replacements.Add("[PROJECTNAME]", solutionName);

ReplaceInTextFile(destinationPath, "InstallWizard.xml", replacements, Encoding.UTF8);
ReplaceInTextFile(destinationPath, "UnInstallWizard.xml", replacements, Encoding.UTF8);
ReplaceInTextFile(destinationPath, "InstallWizard.xml", replacements, Encoding.UTF8);
ReplaceInTextFile(destinationPath, "UnInstallWizard.xml", replacements, Encoding.UTF8);

replacements.Add("[GUID1]", Guid.NewGuid().ToString());
replacements.Add("[GUID2]", Guid.NewGuid().ToString());
ReplaceInTextFile(destinationPath, projectFileName, replacements, Encoding.UTF8);
replacements.Add("[GUID1]", Guid.NewGuid().ToString());
replacements.Add("[GUID2]", Guid.NewGuid().ToString());
ReplaceInTextFile(destinationPath, projectFileName, replacements, Encoding.UTF8);

UpdateProjectFile(projectFilePath, options, optionsFrm.WritePropertiesOnlyWhenNonDefault);
UpdateProjectFile(projectFilePath, options, optionsFrm.WritePropertiesOnlyWhenNonDefault);

try
{
dte.ExecuteCommand("File.OpenFile", '"' + projectFilePath + '"');
}
catch (Exception)
{
MessageBox.Show("Failed to open .btdfproj file in editor.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
try
{
dte.ExecuteCommand("File.OpenFile", '"' + projectFilePath + '"');
}
catch (Exception)
{
MessageBox.Show("Failed to open .btdfproj file in editor.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}

MessageBox.Show(
"A default Deployment Framework for BizTalk project has been configured in " + destinationPath + ". You must edit " + projectFileName + " to configure your specific deployment requirements.",
"Project Created",
MessageBoxButtons.OK,
MessageBoxIcon.Information);
MessageBox.Show(
"A default Deployment Framework for BizTalk project has been configured in " + destinationPath + ". You must edit " + projectFileName + " to configure your specific deployment requirements.",
"Project Created",
MessageBoxButtons.OK,
MessageBoxIcon.Information);
});
}

public bool ShouldAddProjectItem(string filePath)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -10,11 +10,13 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DeploymentFramework.VisualStudioAddIn.ProjectWizard</RootNamespace>
<AssemblyName>DeploymentFxForBizTalkAddin.ProjectWizard</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\DeploymentFrameworkForBizTalkAddin.snk</AssemblyOriginatorKeyFile>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -36,53 +38,15 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.TemplateWizardInterface, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="netstandard" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Data" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<COMReference Include="EnvDTE">
<Guid>{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}</Guid>
<VersionMajor>8</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="EnvDTE100">
<Guid>{26AD1324-4B7C-44BC-84F8-B86AED45729F}</Guid>
<VersionMajor>10</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="EnvDTE80">
<Guid>{1A31287A-4D7D-413E-8E32-3B374931BD89}</Guid>
<VersionMajor>8</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
<COMReference Include="EnvDTE90">
<Guid>{2CE2370E-D744-4936-A090-3FFFE667B0E1}</Guid>
<VersionMajor>9</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>False</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\CommonAssemblyInfo.cs">
<Link>CommonAssemblyInfo.cs</Link>
Expand All @@ -107,6 +71,14 @@
<Link>DeploymentFrameworkForBizTalkAddin.snk</Link>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.SDK">
<Version>16.10.31321.278</Version>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.TemplateWizardInterface">
<Version>16.10.31320.204</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
Binary file removed src/AddIn.VS2015/BTDFTVS2015Logo.png
Binary file not shown.
Binary file added src/AddIn.VS2019/BTDFTVS2019Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading