MSBuild DeploymentModel unrecognised error in deploying SSIS package - tfs

I created a PowerShell script to automate deployment for SSIS projects and used it in a custom TFS task. Within this task I used a msbuild step to build the SSIS project which keeps failing with this error:
Error MSB4067: The element DeploymentModel beneath element Project
is unrecognized.
I built the SSIS projects in visual studio 2015 just fine. I have tried msbuild version 12.0 and 15.0 and they both have the same error.
Thank you

When you build your SSIS projects via VS, actually is calling /Build (devenv.exe), not directly using MSBuild.
There is no build-in task that supports building via devenv.exe.Still in the backlog. More details please refer: "Visual Studio Build" build step that actually invokes devenv.com instead of msbuild?
As a workaround, you could try to use 3-party extension task SSIS Build & Deploy for now.

Related

Nuget Restore in MS Build Step

In my asp.net web application, i have solution with 5 projects and nuget.org. In TFS Build Definition,
1) While building the whole solution in Visual Studio Build Task
Nuget packages getting restored.
2) While trying to generate executable files for individual projects in MS Build Task
If I select Restore Nuget packages, It's not finding nuget packages and step getting failed with message - "Process 'NuGet.exe' exited with code '1'."
I have tried many references online and none worked. Any suggestions on how to solve this?
Do i need to make any changes in the nuget.config file to support restoring
packages to individual projects.
Do not directly select Restore Nuget pacakges in MS build task configuration. This option is deprecated. To restore NuGet packages, add a NuGet Installer step before the build.
(Important) This option is deprecated. Make sure to clear this
checkbox and instead use the NuGet Installer build step.
Source Link: MSBuild
Besides, you could also build single project not the entire solution in Visual Studio Build task. Just select the project (.*proj) files instead of .sln file.
Unless you are building a customized MSBuild project file, then we recommend you use the MSBuild step instead of the Visual Studio Build step.
You could also try to build single project using Visual Studio Build task, see if the issue is still exists.
Same problem, downgraded to 4.4.1. it helped

Error Target clean does not exist in the project msbuild error while building delphi projects

We are building delphi projects using the msbuild tasks in VNext builds, they were running successfully until the TFS build agents were update to latest version 2.112.0, following is the error message: Error MSB4057: The target "Clean" does not exist in the project. Process 'msbuild.exe' exited with code '1' Any inputs to solve these errors would be helpful.
Can you build the project from command line in the build server?
Please make sure you specified the parameters correctly.
The property parameter (/p) forwards properties to the actual compiler. You can specify for example the configuration using /p:config=
So if you want to clean and then build a project using the release configuration, specify the paramters like this:
msbuild.exe "/t:Clean" "/t:Build" "/p:config=Release" Myapp.dproj
Please reference this thread Automate Delphi 2010 project build with MSBuild
And Thomas's answer in this article .

No ProjectInfo.xml files were found .TFS build with sonar end task

I am trying to configure my visual studio project to send some analysis data to SonarQube server using TFS 2015 build (vnext)
I get this error in the Sonar end task.
##[error]No ProjectInfo.xml files were found. Possible causes:
##[error]1. The project has not been built - the end step was called right after the begin step, without a build step in between
An unsupported version of MSBuild has been used to build the project. Currently MSBuild 12.0 upwards are supported
We use MSBuild 14.0 in the server.
The SonarQube Scanner for MSBuild requires your project to be built
with MSBuild 14.0. We recommend installing Visual Studio 2015 on the
analysis machine in order to benefit from the integration and features
provided with the Visual Studio ecosystem (VSTest, MSTest unit tests,
etc.).
Suggest you to also install VS2015 on your build server, and since you are using MSbuild 14.0, double check if you are using the old task with deprecated in front which used for MSbuild 12.0. SonarQube Scanner for MSBuild released with static analysis which could executed during the build on MSbuild 14.0.
The support of MSBuild 12 by the SonarQube Scanner for MSBuild is
deprecated and will be removed in a future release.
Source: Compatibility with Visual Studio and MSBuild
Please download and use the latest version of the SonarQube Scanner for MSBuild in marketplace and try again. The recent documentation is available from Analyzing with SonarQube Extension for VSTS/TFS, you could also take a look at this tutorial.

No ProjectInfo.xml files were found Sonar scan

I am trying to configure my visual studio project to send some scan data to SonarQube server using TFS 2015 build (vnext)
I get this error in the Sonar end task.
##[error]No ProjectInfo.xml files were found. Possible causes:
##[error]1. The project has not been built
The end step was called right after the begin step, without a build step in between an unsupported version of MSBuild has been used to build the project. Currently MSBuild 12.0 upwards are supported.
We use MSBuild 14.0 in the server. it is a C++ project (VCXPROJ project File)

TFS 2010 issues building C#6.0 code with MS Build 14

We have TFS 2010 running happily on a dedicated build server.
I have installed Microsoft Build Tools 2015, which includes MS Build 14 successfully on the build machine, but not Visual Studio 2015.
I've created a custom template which alters the "ToolsPath" property of the "Run MSBuild" activity to "C:\Program Files (x86)\MSBuild\14.0\Bin".
The build runs, but fails on this particular error:
(CoreCompile target) ->
CSC : error CS1566: Error reading resource 'ProjectName.exe.licenses' --
'Could not find file 'C:\develop\Sources\ProjectName\obj\x86\Release\ProjectName.exe.licenses'.' [C:\develop\Sources\ProjectName\ProjectName.csproj]
The same project builds fine using Visual Studio 2015 running from another machine.
It makes no difference whether the TFS build definition includes these MS Build arguments or not:
/tv:14.0 /p:VisualStudioVersion=14.0
Does anybody have a success story of using a TFS 2010 build agent to successfully build a C#6.0 project?
I solved this in the end by installing Visual Studio 2015!
The /tv:14.0 /p:VisualStudioVersion=14.0 argument may don't work for MSBuild Tools.
You should customize the tfs build process template to set ToolPath of the Run MSBuild for Project to target to MSBuild14; and set ToolVersion to "14.0".
Check this link for the detailed information:BuildActivity ignores ToolsVersion

Resources