Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need to install AzureSdk on the build server to create azure packages?

We use TeamCity as our CI server (but I imagine this applies to any build server).

We have not installed the azure SDK on the build server and are able to build the projects which use the SDK using the workaround described here.

I now want the server to produce the packages for deployment to Azure, but when I run an MSBuild task to create the packages (as directed here) I get a strange error

error MSB4057: The target "WatGetTargetFrameworkDirectories" does not exist in the project.

which yields few useful google results.

Do I need to install the SDK? Or is this error related to something else?

like image 297
Sam Holder Avatar asked Nov 04 '22 14:11

Sam Holder


1 Answers

WatGetTargetFrameworkDirectories is a target from AzureSDKs .targets file. Looks like your error related to Azure SDK.

Except it could be more subtle error related to not very good msbuild Azure Targets. For our own azure packaging we did need to call 2 targets "Clean;CorePublish", not just "Publish". Maybe this will also help you.

Side note: why you don't want to install AzureSDK on TeamCity BuildAgent? Build agents made exactly for that - to have frameworks you need for build. Also 1.6 and 1.7 AzureSDKs can be installed side-by-side.

like image 110
Alexey Shcherbak Avatar answered Nov 15 '22 05:11

Alexey Shcherbak