I'm facing problems using TFBuild in Visual Studio Team Services (was Visual Studio Online).
I want to use the Copy Files task before running Cordova tasks, to copy certificates from a local folder into the build folder (or any folder that Cordova Build can access, it has to be relative to the repository)
I am using the following configuration:
Step Configuration
But what happens is, that it creates a folder with the name $(build.artifactsstagingdirectory) in user/****/myagent/_work/build/****/ instead of using the content of the variable as the path.
Tried with several variables, always creates a folder with the name of the variable. Tried with upper/lower/camel/pascal Case but it did not change anything.
The source files are copied into that folder.
Docs don't seem to do something different.
log does not say anything besides:
2016-07-20T11:58:20.550Z: found 1 files
2016-07-20T11:58:20.551Z: Copying /Users/****/certs/android/release/xxxx.keystore to $(build.artifactstagingdirectory)/xxxx.keystore
The Build-Agent is a Mac Mini, with OS X 10.11.6
Am I doing something wrong or is it a Bug?
Debug log says:
http://prntscr.com/bxn6s6
Had to add a picture, wouldn't let me post it with line breaks otherwise.
The solution was simple. The Build Agent was outdated.
With the current version (which had huge installation problems due to openSSL deprecation on Mac OS) it works fine.
Related
I've seen this question asked but never specifically for Mac. My company is using TeamCity on a Mac Mini to do our iOS and android builds. We would use windows but, iOS builds require a Mac with Xcode. I have not been able to satisfy this condition. I can see that there are multiple versions of MSBuild (and Xbuild) already on my machine. Here is what I tried:
set an environment variable for MSBuildTools12.0_x86_Path using launchctl setenv (tried the bin directory of every instance of MSBuild existing on my machine), rebooted before checking TC
setting env.MSBuildTools12.0_x86_Path entry in buildAgent.properties
setting system.MSBuildTools12.0_x86_Path entry in buildAgent.properties
logging into TeamCity, going to my build configuration, going to the "parameters" tab and adding a new parameter for env.MSBuildTools12.0_x86_Path
After all of the above failed to satisfy the condition, I tried grabbing version 12 of MSBuild from a Windows machine, copying it to my Mac and pointing to its "Bin" directory instead, and repeating all bullets above.
The path was /Users/myusername/MSBuild/12.0/Bin. This bin directory contains MSBuild.exe, an MSBuild folder, a bunch of DLLs and more.
Again, this failed to change the outcome of the unmet condition in TeamCity. The frustrating thing is that TeamCity isn't giving me details. I don't know if it's still complaining that the path isn't even set (and where it is even looking for that path definition), or if it SEES that the path is set but it's not pointing to a folder it recognizes as MSBuild. I'm completely in the dark.
Does anyone have any guidance for me on this? I feel I've exhausted all paths to a solution. Thank you so much, in advance.
I figured it out on my own. On the Mac, you have to do an "MSBuild" runner type and pick "Mono xbuild 4.5" for the version. I used "x86" for the run platform and set a parameter for Mono4.5_x86 to point to xbuild. But it was trying to run the 64 bit version of mono and I found no way to set a command line argument for mono to tell it I want --arch=32 so I ended up having to link the mono executable to mono-sgen32 to get the build to finally work.
I am trying to implement Bamboo into creating an IPA file or APK file using Xbuild but I am getting 1 warning and 1 error:
The warning is the following:
/usr/local/Cellar/mono/4.6.2.7/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: warning : Unable to find framework corresponding to the target framework moniker '.NETPortable,Version=v4.5,Profile=Profile78'. Framework assembly references will be resolved from the GAC, which might not be the intended behavior.
The error is this:
/usr/local/Cellar/mono/4.6.2.7/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: error : PCL Reference Assemblies not installed.
I am unsure why this is happening because when I open the project in Xamarin studio and build it, it will be successful, and when I run it the app is fully functional with no problems at all. I have located the file location of the profile 78 in the version 4.5 and it exists, I have the latest installed version of Mono Development Kit (MDK). How can it build correctly in Xamarin but not in Bamboo, is it do with how I locate the files?
I have also tried to create the APK file on the terminal but got the same error as well. I have tried a lot of fixes like uninstalling mono and reinstalling, I added .NETPortable from windows to Mac but that didn't work, why can't my mac find the profile 78 it is located on my mac.
The file /usr/local/Cellar/mono/4.6.2.7/lib/mono/xbuild/14.0/bin/microsoft.common.targets seems to be looking for the .NetPortable,Version=v4.5,Profile=78 but I have that in this location: Library/Frameworks/Mono.framework/Versions/4.6.2/lib/mono/xbuild.frameworks/.NetPortable/v4.5/Profile/Profile78 and I have pasted the .NetPortable folder in multiple locations to try and fix this error. Where am I going wrong?
Although I have not touched Bamboo for quite some time(3+ years), one thing I personally do is to ensure your xbuild command works like a charm in a local environment with a similar setup. Seeing that you tried to create an .apk through the terminal and got the same error sounds like an installation error. The PCL Reference Assemblies should be apart of the MDK on MacOS. Seeing that you have it installed, it sounds like a potential issue with file permissions of the Bamboo user account.
To create an .apk file, you need to use the /t:PackageForAndroid target against your Android project when invoking xbuild.
EX:
xbuild XamarinAndroidApplication.csproj /p:Configuration=Release /t:PackageForAndroid
You can also use the SignAndroidPackage target given the notes here:
https://developer.xamarin.com/guides/android/under_the_hood/build_process/#Build_Targets
xbuild XamarinAndroidApplication.csproj /p:Configuration=Release /t:SignAndroidPackage
If you wanted to use the MSBuild equivalents, it would look like this:
msbuild MyAndroidApp.sln
msbuild /t:SignAndroidPackage MyAndroidApp.csproj
im just starting out with FreeSwitch, i downloaded via git, and am trying to build in VS
all i need i believe are the dlls of mod_managed, as my goal is to manage FS via .net
but i get 248 errors, most look something like this:
Error 5 error C1083: Cannot open source file: '....\jpeg-8d\jaricom.c': No such file or directory D:\FreeSwitch\freeswitch\libs\win32\libjpeg\c1 libjpeg
btw, i searched windows and cannot find any such file anywhere on my pc.
I tried
cleaning the solution first, but it did not help
moving the file to a path without spaces
downloading with autocrlf=false
building on another machine
but none of these steps helped
anybody have any idea?
if i can just download the dlls i need, i wouldnt mind skipping this step altogether
environment
win 8 64bit
visual studio 2012
thanks a million
The libjpeg sources are not in the git sources but are normally downloaded during the build process. If you build the entire solution that should not be a problem since it has the project dependencies set: libjpeg.2012 depends on Download libjpg.2012, which means the latter gets built before the first. All Download libjpg.2012 is run a cscript which downloads libjpeg from http://www.ijg.org/files/jpegsrc.v8d.tar.gz (see inside the project file).
So if you do not have the sources, either you are building incorrectly (not in VS for instance, or with a broken solution file) or the download script is broken. In that case, you should inspect the output: I assume it shows errors when it can not download the libs.
I am trying to set up the ODE source code to work in visual studio. I have followed to instructions given in this link, which say to cd to the build directory and run the commnad premake4 vs2008.
that runs fine, and indeed, all the vs2008 files are created. But when I try to compile the project, I get an error saying that ode.dll cannot be found - should it be downloaded\installed separately or am I doing something wrong?
you should take a look a this link below
http://sourceforge.net/apps/mediawiki/arsproject/index.php?title=Main_Page#Visual_Studio
go to the section (middle of the page) Open Dynamic Engine (ODE)
Installation Steps for Windows.
I followed these steps and the installation works fine. In the ODE lib folder, do you have 2 folders
with name such as DebugDoubleDll or ReleaseDoubleDll? if you have compiled in double precision.
If yes, you should have a library named ode_doubled.lib in the ODE lib folder.
Did you try to run the demo executable to test your installation?
Last thing, did you include in your PATH environment variable the lib folder (where the libraries are located), if no, it's probably the reason why you have this error message.
I'm using CMake to build my project. The project uses some parts of the vxl (http://vxl.sourceforge.net) library. Since I don't need the full vxl lib, I build only the parts I need within my projcet by using cmake's ExternalProject. The Linux port of my project compiles without problems.
The Windows port also compiles fine, if I run everything locally (on C:) on my Windows box! My home dir is mounted as network drive. If I put the cmake build stuff to my home (lets say Z:\ProjectBuild), the vxl configuration (executed by ExternalProject) won't be correct.
The vxl cmake project carries out several tests (e.g. for data types) that use the cmake try_run() command. The created test exe in Z:\ProjectBuild\path\to\exe\ has a side-by-side configuration problem. Windows cannot resolve the path to debugging CRT dlls. If I do the same thing on C:, I don't run in any problems, however I want to have the build stuff in my home. The use of the Visual Studio command prompt didn't solve the problem.
I'm not sure, if it is a cmake problem (in terms of cmake configuration) or a Windows/Visual Studio problem (side-by-side configuration or path).
Any suggestions?
My machine:
Windows XP,
VS 2005 (SP1),
CMake 2.8.1
Thank you
Tobias
The problem seems to be solved. Using another mapped drive under Windows solves the problem. It seems to be sync problem with the Samba shares for my mapped home dir.
The created manifest for the little test application wasn't completely written and than VS embeds a empty manifest without any side-by-side configuration.