Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong install dir on VS2019? #477

Open
lchegde opened this issue Sep 2, 2020 · 3 comments
Open

Wrong install dir on VS2019? #477

lchegde opened this issue Sep 2, 2020 · 3 comments

Comments

@lchegde
Copy link

lchegde commented Sep 2, 2020

It seems that the MSBuildExtensionsPath in Visual Studio 2019 is no longer pointing to the MSBuild install directory. Rather it points to a MSbuild folder below the VS2019 install folder:

  • C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\

This caused the deploys to fail. I had to manually copy the BTDF folder into the new MSBuild folder.
I will also look into redefining the path variable in the btdfprj-file, which may be a better option than changing the install target folder.

@tfabraham
Copy link
Member

Hi, can you please provide some context? What were you doing when you experienced the issue? Thanks!

@lchegde
Copy link
Author

lchegde commented Sep 3, 2020

Sure! I just started working with BT2020 and I have lot of projects to migrate, all using BTDF for deploy. This is on a brand new DEV environment with all the BT2020 bits installed along with VS2019 Professional. I also added BTDF 5.8RC1 using the MSI installer from the release page https://github.com/BTDF/DeploymentFramework/releases/tag/v5.8.0-rc1.

This installs BTDF all fine into the main MSBuild install folder C:\Program Files (x86)\MSBuild\DeploymentFrameworkForBizTalk

The framework is referenced like so in the existing project files:
<DeploymentFrameworkTargetsPath>$(MSBuildExtensionsPath)\DeploymentFrameworkForBizTalk\5.0\</DeploymentFrameworkTargetsPath>

But when I try to run this, using the command line since the plugin isn't ready, I get this error:

PS D:\Source\xxxx\BizTalk\xxx> msbuild .\Deployment\xxx.Deployment.btdfproj /t:Deploy
Microsoft (R) Build Engine version 16.7.0+b89cb5fde for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 03.09.2020 08:30:37.
Project "D:\Source\xx\Int\Shared\Main\BizTalk\xx.xx.xx\Deployment\xx.xx.xx.Deployment.btdfproj" on node 1 (Deploy target(s)).
D:\Source\xx\Int\Shared\Main\BizTalk\xx.xx\Deployment\xx.xx.xx.Deployment.btdfproj(96,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDep
loymentFramework.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\DeploymentFrameworkForBizTalk\5.0\BizTalkDeploymentFramework.targets" is correct, and that the file exi
sts on disk.
Done Building Project "D:\Source\xx\Int\Shared\Main\BizTalk\xx.xx.xx\Deployment\xx.xx.xx.Deployment.btdfproj" (Deploy target(s)) -- FAILED.

Build FAILED.

As you can see MSBuild is no longer looking for the framework in C:\Program Files (x86)\MSBuild\. Rather it is looking in C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\

A bit of googling gave me this VS Enviroment-vars page at MS, where MSBuildExtensionsPath indeed is pointing to a different folder, per the samples: https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-reserved-and-well-known-properties?view=vs-2019

It not a big issue, its easy to just copy the install folder or just hard code the correct path in the project config, but it did not work for me out of the box. (I did check out the samples for the latest release as well, the samples still point to MSBuildExtensionsPath)

@swalde
Copy link

swalde commented Nov 11, 2020

I also had this error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants