I have a dev machine where I do my development for biztalk 2020 using framework 4.8 and BTDF V5.8. When I install my apps using the Visual studio 2019 Biztalk extensions I can install the applications no issues. And the with the following settings in BizTalkDeploymentFramework.targets.
<Target Name="SetToolsVersionParam">
<CreateProperty Value="/tv:12.0" Condition="'$(MSBuildToolsVersion)' == '12.0'">
<Output TaskParameter="Value" PropertyName="ToolsVersionParam" />
</CreateProperty>
</Target>
When I build an msi of the same project and I deploy it to biztalk sever in UAT, I need to update the SetToolsVersionParam to 4.
<Target Name="SetToolsVersionParam">
<CreateProperty Value="/tv:4.0" Condition="'$(MSBuildToolsVersion)' == '4.0'">
<Output TaskParameter="Value" PropertyName="ToolsVersionParam" />
</CreateProperty>
</Target>
Question why can I not leave my SetToolsVersionParam at 12 for deployment to the UAT server like on my dev machine?
Another Question, as I do both both biztalk and .net6 development on the dev machine, this has not been an issue, however I recently need to install the .net6 runtime on the UAT server for a new service and the fix above for SetToolsVersionParam stopped working.
I cannot get any new msi's to install on the server. I get the following irrespective if the SetToolsVersionParam is 12 or 4. Error MSB4067: The element beneath element is unrecognized.
I search all post regarding BTDF, but I have been unable to find a resolution as yet.
Any help will be appreciated.
Update: I ran the following PowerShell command between the 2 (Working server and one that is failing) the result is the same.
dir HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\
Hive: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions
Name Property
---- --------
2.0 MSBuildToolsPath : C:\windows\Microsoft.NET\Framework64\v2.0.50727\
3.5 MSBuildToolsPath : C:\windows\Microsoft.NET\Framework64\v3.5\
4.0 FrameworkSDKRoot : $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft
SDKs\Windows\v7.0A@InstallationFolder)
MSBuildRuntimeVersion : 4.0.30319
MSBuildToolsPath : C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
MSBuildToolsPath32 : $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSB
uild\ToolsVersions\4.0@MSBuildT
oolsPath)
MSBuildToolsRoot : C:\Windows\Microsoft.NET\Framework64\
SDK35ToolsPath : $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft
SDKs\Windows\v7.0A\WinSDK-NetFx35Tools-x86@InstallationFolder)
SDK40ToolsPath : $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft
SDKs\Windows\v7.0A\WinSDK-NetFx40Tools-x86@InstallationFolder)
When installing the MSI I get the following output:
GetSoftwarePaths:
Using .NET Framework Install Path 'C:\Windows\Microsoft.NET\Framework\v4.0.30319'.
Using BizTalk Install Path 'C:\Program Files (x86)\Microsoft BizTalk Server\'.
Using Deployment Framework Install Path 'C:\Program Files (x86)\BTS_Nexus for BizTalk 1.0.0\1.0\Deployment\'.
Using Deployment Framework Tools Path 'C:\Program Files (x86)\BTS_Nexus for BizTalk 1.0.0\1.0\Deployment\Framework\De
ployTools'.
Using BizTalk ESB Toolkit Install Path 'C:\Program Files (x86)\Microsoft BizTalk ESB Toolkit\'.
ExportSettings:
"C:\Program Files (x86)\BTS_Nexus for BizTalk 1.0.0\1.0\Deployment\Framework\DeployTools\EnvironmentSettingsExporter.
exe" "C:\Program Files (x86)\BTS_Nexus for BizTalk 1.0.0\1.0\Deployment\EnvironmentSettings\SettingsFileGenerator.xml
" "C:\Program Files (x86)\BTS_Nexus for BizTalk 1.0.0\1.0\Deployment\EnvironmentSettings"
Environment Settings Spreadsheet to XML Exporter 1.7.0
[https://github.com/tfabraham/EnvironmentSettingsManager]
Copyright (C) 2007 Thomas F. Abraham. All Rights Reserved.
Importing from SettingsFileGenerator.xml...
Output format is XmlPreprocess (multi-file).
Exporting to Exported_LocalSettings.xml...
Exporting to Exported_DevSettings.xml...
Exporting to Exported_UatSettings.xml...
Exporting to Exported_ProdSettings.xml...
Finished.
LaunchServerDeployWizard:
"C:\Program Files (x86)\BTS_Nexus for BizTalk 1.0.0\1.0\Deployment\Framework\DeployTools\SetEnvUI.exe" /c:InstallWiza
rd.xml /p:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" /a:"Framework\BizTalkDeploymentFramework.Server
Execute.targets /t:Deploy /clp:NoSummary /nologo /p:Interactive=True /p:ProjectFile=Deployment.btdfproj "
Build started 30/06/2023 4:16:33 PM.
Microsoft (R) Build Engine Version 2.0.50727.9031
[Microsoft .NET Framework, Version 2.0.50727.9058]
Copyright (C) Microsoft Corporation 2005. All rights reserved.
C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets(1801,2): error MSB4067: The element <ItemDefinitionGroup> beneath element <Project> is unrecognized.
Project "C:\Program Files (x86)\BTS_Nexus for BizTalk 1.0.0\1.0\Deployment\Framework\BizTalkDeploymentFramework.ServerE
xecute.targets" on node 1 (Deploy target(s)).
Copy:
Copying file from "..\..\DeployResults\DeployResults.txt" to "..\..\DeployResults\DeployResults_UAT-BIZTALK1_20230630
_1616.txt".
copy /y "..\..\DeployResults\DeployResults.txt" "..\..\DeployResults\DeployResults_UAT-BIZTALK1_20230630_1616.txt"
PauseForError:
*************************************
************* FAILED! ***************
*************************************
Press a key to continue...
When I compare this with the above output with the msi output on the server that worked I see a difference in the GetSoftwarePaths section:
Using .NET Framework Install Path 'C:\Windows\Microsoft.NET\Framework\v2.0.50727'.
Using BizTalk Install Path 'C:\Program Files (x86)\Microsoft BizTalk Server\'.
Using Deployment Framework Install Path 'C:\Program Files (x86)\BTS_Nexus for BizTalk 1.0.0\1.0\Deployment\'.
Using Deployment Framework Tools Path 'C:\Program Files (x86)\BTS_Nexus for BizTalk 1.0.0\1.0\Deployment\Framework\DeployTools'.
Using BizTalk ESB Toolkit Install Path 'C:\Program Files (x86)\Microsoft BizTalk ESB Toolkit\'.
This one that working uses
Using .NET Framework Install Path 'C:\Windows\Microsoft.NET\Framework\v2.0.50727
and the one that is not working is using
Using .NET Framework Install Path 'C:\Windows\Microsoft.NET\Framework\v4.0.30319'.
Where and how do I change this to use the correct framework? As this seems to be the issue.
I manage to get my msi installed. After comparing the Microsoft.Net on both servers I found the an extra folder Primary Interop Assemblies which I renamed the folder. I also compared the contents of Microsoft.Net and MSBuild folders between the 2 servers. There was a slight change in file BizTalkDeploymentFramework.targets, which from comparing the contents seemed to be more formatting, but I replaced the file with the file from the server that works.
This worked and the msi installed.
Thanks for all the help and support.