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
Related
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.
After updating to TFS 2017 Update 2 RC1, my builds are failing because Visual Studio 2017 (MSBuild 15.0) is not found. I am using the 'Visual Studio Build' task with 'Latest' selected as the Visual Studio version.
I have reinstalled Visual Studio Build Tools 2017.
I have repaired my TFS installation.
I have reinstalled my Build Agent.
I have verified that my Build Agent has Visual Studio 2017 and MSBuild 15.0
capabilities.
The only way I am able to get a successful build is to replace my 'Visual Studio Build' tasks with 'MSBuild', and manually direct to the MSBuild executable. I don't find this acceptable, I have too many Build configurations that would need to be changed. And when the next version of MSBuild comes out, I have to manually update them all.
Build Agent Capabilities:
MSBuild
Visual Studio
Suggest you directly select VS2017 instead of latest in the VS version option, then trigger the build again.
To narrow down the issue, you could try below ways:
Create a new build definition with the same settings to build the
project
Use the build definition to build another Visual Studio 2017 project such as a new created one
Enable TFS Build debug logging by adding a variable named
system.debug and setting its value to 'true'. This will enable full debug logging to correct more info.
I am using TFS 2015 trail version in windows server 2012.I created windows service project in visual studio community edition along with WiX Project to package the windows service. If i build the solution from visual studio, I am able to get the MSI. But if i use Visual studio build in TFS 2015,i get the following error.
"Unexpected exit code received from msbuild.exe: 1" and "Task VSBuild
failed. This caused the job to fail. Look at the logs for the task for
more details."
I refered the below links as reference :
http://wixtoolset.org/documentation/manual/v3/msbuild/wix_with_team_build.html-
http://wixtoolset.org/documentation/manual/v3/msbuild/daily_builds.html
1) I am unable to follow the first link steps as i got struck in step 2:
i am unable to find configuration folder in build definition.
I was reading that we do not have TFSBuild.proj straing from TFS version 2010.
"Right-click on the Build Definition and select View Configuration
Folder." "Check out and open the file named TFSBuild.proj."
2)I am unable to follow second link as well. I am getting below error:
"The imported project "C:\wix\3.8\Wix.targets" was not found. Confirm
that the path in the declaration is correct, and that the
file exists on disk."
since I am new to TFS Build 2015, any help or guidance will be appreciated.
Beginning with NuGet 2.7, the NuGet Visual Studio extension integrates into Visual Studio's build events and restores missing packages when a build begins. This feature is enabled by default. If you are using NuGet to install Wix packages, that's why you can get a successful build from visual studio.
If you want to use NuGet to install Wix packages, you can create one build.proj to restore these packages during build. Check: http://docs.nuget.org/consume/package-restore/team-build
If you don't use NuGet to install Wix packages, a traditional way you can refer to:http://edwinfrey.com/blog/2012/06/11/building-wix-msis-in-tfs-preview/
I have TFS2012 Update 3 server. We have started new VS 2013 project. I need to prepare build server and service. My initial thought is to install Vs 2013 together with TFS2013 build service.
After installation TFS2013 and registration to TFS collection I got below issue:
The register command is not supported for Team Foundation Service [our_tfs_url] because the server is not compatible.
Please advice any solution how to create builds for VS 2013 projects that are stored in TFS 2012.
Update 1:
1) I installed TFS 2012 build service and redirect msbuild ( toolpath) in build template to use VS 2013 msbuild
2) I am able now to build project with a test
3) There are still issue with Code Coverage, that finish with warning: Install visual studio. It seems for me that CC used still VS 2012. Is any way to redirect CC to VS 2013?
Below solution helps me build on VS 2013 build machine with TFS 2012 build service and generate code coverage.
TFS 2012 buid service runs tests from 11.0 location, to replace CommonExtensions in folder
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions
with Vs 2013 assemblies from
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions
fix that issue and now I can see code coverage per build.
thanks MS to provide workaround on that issue with Code coverage.
I recently upgraded from VS2010 to VS2013 on our project.
When trying to run our web deploy I now receive this error:
"C:\G\ectc.proj" (Deploy target) (1) -> "C:\G\Source\Web\Web.csproj (ResolveReferences;_CopyWebApplicatio n target) (14:18) -> C:\g\Source\Web\Web.csproj : error MSB4057: The target "_CopyWeb Application" does not exist in the project.
It's strange, If i checkout the code before the upgrade and run the same build command which is:
msbuild ctc.proj /t:Deploy
It work's fine, But doesnt if i run the that command on the VS 2013 code base.
Thanks
Try pre-processing ctc.proj from the 2010 environment and the 2013 environment to determine which target files are missing, or what's occuring in the 2013 deployment and failing to resolve the targets file containing CopyWebApplication.
In the 2013 environment use:
msbuild ctc.proj /pp >2013.txt
In the 2010 environment use:
msbuild ctc.proj /pp >2013.txt
I'm guessing it's using an incorrect path to the target containing CopyWebApplications.