I have a solution in Visual Studio 2012 which contains multiple projects - a web application, some class libraries, a couple of database projects and an Installshield LE 2013 project.
If I build the solution for Release, locally, the ISLE project creates and outputs a setup.exe and associated msi etc. However, if I build the solution with Release configuration through TFS 2013 build automation, the build succeeds, produces outputs for all projects and drops them in the drop location with the exception of the ISLE project. No setup.exe and no .msi files are created on the build machine. The tail end of the build log is included below on Detailed mode:
I modified my islproj file to include an AfterGet target as suggested by This Post to avoid the -2200 error described there, and you can see this target in the log in case you are wondering why it's there...
How can I ask the build agent to actually compile my installer?
....omitted other projects build logging....
Task "MSBuild"
Global Properties:
Configuration=SingleImage
Platform=
BuildingSolutionFile=true
CurrentSolutionConfigurationContents=<SolutionConfiguration>
<ProjectConfiguration Project="{0D638421-Bxx3-43BC-A6F1-8992DB9770C8}" AbsolutePath="C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\PROJECTNAME\PROJECTNAME.csproj" BuildProjectInSolution="True">Release|x86</ProjectConfiguration>
<ProjectConfiguration Project="{A31FE3AA-Fxx6-4AAB-B934-750C0F1C6013}" AbsolutePath="C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\PROJECTNAME.Reports\PROJECTNAMEReportsLibrary.csproj" BuildProjectInSolution="True">Release|x86</ProjectConfiguration>
<ProjectConfiguration Project="{D8CD6EA6-5xx2-44E2-B3C1-954E1DF99303}" AbsolutePath="C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\PROJECTNAME.Database\PROJECTNAME.Database.sqlproj" BuildProjectInSolution="True">Release|x86</ProjectConfiguration>
<ProjectConfiguration Project="{BA6453AD-DxxB-466C-9579-BF631B75C2E8}" AbsolutePath="C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\PROJECTNAMEImport.Database\PROJECTNAMEImport.Database.sqlproj" BuildProjectInSolution="True">Release|x86</ProjectConfiguration>
<ProjectConfiguration Project="{951766F3-1xx0-40A4-80D7-1FEDDD922A4E}" AbsolutePath="C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\PROJECTNAME.Tests\PROJECTNAME.Tests.csproj" BuildProjectInSolution="True">Release|x86</ProjectConfiguration>
<ProjectConfiguration Project="{45370F77-9xx5-4689-8236-B6DBECE591D9}" AbsolutePath="C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\PROJECTNAME.Setup.Full\PROJECTNAME.Setup.Full.isproj" BuildProjectInSolution="True">SingleImage<ProjectDependency Project="{0D638421-Bxx3-43BC-A6F1-8992DB9770C8}" /><ProjectDependency Project="{147B816F-2xxA-4FA9-873E-47615DCFAFFA}" /><ProjectDependency Project="{A31FE3AA-FAF6-4AAB-Bxx4-750C0F1C6013}" /></ProjectConfiguration>
<ProjectConfiguration Project="{147B816F-2xxA-4FA9-873E-47615DCFAFFA}" AbsolutePath="C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\PROJECTNAME.Setup.Files\PROJECTNAME.Setup.Files.csproj" BuildProjectInSolution="True">Release|x86</ProjectConfiguration>
</SolutionConfiguration>
SolutionDir=C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\
SolutionExt=.sln
SolutionFileName=PROJECTNAME.sln
SolutionName=PROJECTNAME
SolutionPath=C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\PROJECTNAME.sln
9>Project "C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\PROJECTNAME.Setup.Full\PROJECTNAME.Setup.Full.isproj.metaproj" (9) is building "C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\PROJECTNAME.Setup.Full\PROJECTNAME.Setup.Full.isproj" (10) on node 1 (default targets).
10>Building with tools version "3.5".
10>Target "AfterGet" in project "C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\PROJECTNAME.Setup.Full\PROJECTNAME.Setup.Full.isproj" (entry point):
Using "Exec" task from assembly "Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Exec"
Command:
attrib -r "C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\PROJECTNAME.Setup.Full\PROJECTNAME.Setup.Full.isl"
Done executing task "Exec".
10>Done building target "AfterGet" in project "PROJECTNAME.Setup.Full.isproj".
10>Done Building Project "C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\PROJECTNAME.Setup.Full\PROJECTNAME.Setup.Full.isproj" (default targets).
9>Done executing task "MSBuild".
9>Done building target "Build" in project "PROJECTNAME.Setup.Full.isproj.metaproj".
9>Done Building Project "C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\PROJECTNAME.Setup.Full\PROJECTNAME.Setup.Full.isproj.metaproj" (default targets).
1>Done executing task "MSBuild".
1>Done building target "Build" in project "PROJECTNAME.sln".
1>Done Building Project "C:\Builds\1\PROJECTNAME\PROJECTNAME Release Build\src\PROJECTNAME\Trunk\PROJECTNAME\PROJECTNAME.sln" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:02:02.06
Related
I am trying to build a kivy app that has these requirements in buildozer.spec:
requirements = python3,kivy,pillow,plyer,scipy,numpy
all Android (SDK/NDK, API) settings are defaulted (commented)
One run w/o specifying NDK gives:
[INFO]: <- directory context /home/joachim/PycharmProjects/CardReader/.buildozer/android/platform/python-for-android
[WARNING]: install_libs called with no libraries to install!
[INFO]: Building lapack for arm64-v8a
[INFO]: -> directory context /home/joachim/PycharmProjects/CardReader/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/lapack/arm64-v8a__ndk_target_21/lapack/build
[ERROR]: Build failed: Please set the environment variable 'LEGACY_NDK' to point to a NDK location with gcc/gfortran support (supported NDK version: 'r21e')
When I clean and then set NDK to 21e and run again I get the other error:
[INFO]: Will compile for the following archs: arm64-v8a, armeabi-v7a
[INFO]: Found Android API target in $ANDROIDAPI: 27
[INFO]: Available Android APIs are (27)
[INFO]: Requested API target 27 is available, continuing.
[INFO]: Found NDK dir in $ANDROIDNDK: /home/joachim/.buildozer/android/platform/android-ndk-r21e
[INFO]: Found NDK version 21e
[ERROR]: Build failed: The minimum supported NDK version is 23. You can download it from https://developer.android.com/ndk/downloads/.
[INFO]: Instructions: Please, go to the android NDK page (https://developer.android.com/ndk/downloads/) and download a supported version.
*** The currently recommended NDK version is 23b ***
How can this mismatch be solved? Looking for supported NDK with gcc/gfortran support.
Or, what needs to be set for LEGACY_NDK ?
So I've just ran into that problem and found a solution.
The issue was that to build scipy python for android needs an android ndk that was built with fortran support. These appear to be only supported with NDK version 21 and lower and the NDK needs to be specifically built with fortran support. Luckily someone hosts prebuilt versions for that purpose. https://github.com/mzakharo/android-gfortran/releases (Linux only, if you are building the APK from windows you need to build your own NDK toolchain as described in the readme of that project)
Then you have to do the following:
First you need to download the legacy NDK via buildozer
For this modifiy in buildozer.spec:
#android.ndk = 23b --> android.ndk = 21e
Then Execute
buildozer android debug
When it fails (this is ok since we only ran buildozer to download the r21 NDK):
tar -jxvf gcc-arm-linux-x86_64.tar.bz2
mv arm-linux-androideabi-4.9 ~/.buildozer/android/platform/android-ndk-r21e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
Note: change ~/.buildozer to the path where buildozer stores your ndks
Then revert the changes to buildozer.spec:
android.ndk = 21e --> #android.ndk = 23b
Now you can build and deploy with
export LEGACY_NDK=~/.buildozer/android/platform/android-ndk-r21e
buildozer android debug deploy run
Note: change ~/.buildozer as described above
I have created azure functions using Visual Studio 2017(Professional Edition), I can successfully build the azure function within visual studio,
But I have a requirement where I have to build and create package without visual studio 2017, so I have tried to build the azure functions from MSBuild 2017 referring the link : https://blogs.technet.microsoft.com/livedevopsinjapan/2017/09/12/build-and-deploy-azure-functions-without-using-visual-studio-2017/
MSBuild Command :
"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\msbuild.exe" "Telemetry.sln" /nologo /nr:false /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="WebApp.zip" /p:DeployIisAppPath="Default Web Site" /t:"Telemetry:Clean;Build";"Telemetry_Test:Clean;Build" /p:platform="any cpu" /p:configuration="release" /p:VisualStudioVersion="15.0"
Executed above command and it failed to build azure functions
C:\..\MyFunctionAppTest>"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\msbuild.exe" "MyFunctionAppTest.sln" /nologo /nr:false /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="WebApp.zip" /p:DeployIisAppPath="Default Web Site" /t:"MyFunctionAppTest:Clean;Build" /p:platform="any cpu" /p:configuration="release" /p:VisualStudioVersion="15.0"
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 12/11/2017 6:57:19 AM.
Project "C:\..\MyFunctionAppTest\MyFunctionAppTest.sln" on node 1 (MyFunctionAppTest:Clean;Build target(s)).
ValidateSolutionConfiguration:
Building solution configuration "release|any cpu".
Project "C:\..\MyFunctionAppTest\MyFunctionAppTest.sln" (1) is building "C:\..\MyFunctionAppTest\MyFunctionAppTes
t\MyFunctionAppTest.csproj" (2) on node 1 (Clean;Build target(s)).
C:\..\MyFunctionAppTest\MyFunctionAppTest\MyFunctionAppTest.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' spec
ified could not be found.
Done Building Project "C:\..\MyFunctionAppTest\MyFunctionAppTest\MyFunctionAppTest.csproj" (Clean;Build target(s)) -
- FAILED.
Done Building Project "C:\..\MyFunctionAppTest\MyFunctionAppTest.sln" (MyFunctionAppTest:Clean;Build target(s)) -- F
AILED.
Build FAILED.
"C:\..\MyFunctionAppTest\MyFunctionAppTest.sln" (MyFunctionAppTest:Clean;Build target) (1) ->
"C:\..\MyFunctionAppTest\MyFunctionAppTest\MyFunctionAppTest.csproj" (Clean;Build target) (2) ->
C:\..\MyFunctionAppTest\MyFunctionAppTest\MyFunctionAppTest.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' sp
ecified could not be found.
Make sure to install the .NET Core workload in MS Build installation:
If it doesn't help, check other comments in this issue.
Currently I'm trying to upgrade a Xamarin.Forms project to use .NET Standard 2.0. This went fine for Android but I'm getting stuck with the iOS version. To build iOS we use a On-Primise MacMini as build agent int VSTS. Now I'm getting the error below when building the solution.
=================================
.... way more erros like below ...
2017-11-21T11:39:43.8920830Z ViewModels/DashboardViewModel.cs(66,35): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [/Users/Admin/BuildAgent/_work/3/s/xxx.App/xxx.Core.csproj]
2017-11-21T11:39:43.9014700Z ViewModels/DashboardViewModel.cs(66,73): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [/Users/Admin/BuildAgent/_work/3/s/xxx.App/xxx.Core.csproj]
2017-11-21T11:39:43.9036150Z ViewModels/DashboardViewModel.cs(66,93): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [/Users/Admin/BuildAgent/_work/3/s/xxx.App/xxx.Core.csproj]
2017-11-21T11:39:43.9053280Z
2017-11-21T11:39:43.9083060Z 6 Warning(s)
2017-11-21T11:39:43.9107960Z 47 Error(s)
2017-11-21T11:39:43.9116100Z
2017-11-21T11:39:43.9131830Z Time Elapsed 00:00:59.23
2017-11-21T11:39:43.9327960Z ##[error]Xamarin.iOS task failed with error Error: /Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild failed with return code: 1. For guidance on setting up the build definition, see https://go.microsoft.com/fwlink/?LinkId=760847.
2017-11-21T11:39:43.9575950Z [command]/usr/bin/security delete-keychain /Users/Admin/BuildAgent/_work/3/s/_xamariniostasktmp.keychain
2017-11-21T11:39:44.2658340Z ##[section]Finishing: Build Xamarin.iOS solution xxx.sln
=================================
This output comes from the following build definition:
Now I've searched the internet and found a view possible solutions:
Update Visual Studio on the MacMini
Update XCode on the MacMini
Install .NET Core 2.x SDK on the MacMini
Add .NET Standard 2.x NuGet package to Xamarin.IOS project
Add .NET Standard Library NuGet pre-release package to Xamarin.iOS project (not possible)
Manually reference netstandard.dll to the Xamarin.iOS project
Remove install argument (not using it)
But all of this was not enough to fix the issue. Now I'm not a expert in using a Mac. Actually I never touched one before this issue... So I might have done something wrong here...
But I've been able to get some version information about all products on the MacMini:
========= Visual Studio =========
Visual Studio Community 2017 for Mac
Version 7.2.2 (build 11)
Installation UUID: b43353ef-651c-468b-8b7d-3f1714586419
Runtime:
Mono 5.4.1.6 (2017-06/1f4613aa1ac) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 504010006
NuGet
Version: 4.3.1.4445
.NET Core
Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 2.0.3
SDK: /usr/local/share/dotnet/sdk/2.0.3/Sdks
SDK Version: 2.0.3
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Sdks
Xamarin.Profiler
Version: 1.5.6
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Xamarin.Android
Not Installed
Xamarin Inspector
Not Installed
Apple Developer Tools
Xcode 9.1 (13532)
Build 9B55
Xamarin.iOS
Version: 11.3.0.47 (Visual Studio Community)
Hash: 51128b8c
Branch: xcode9.1
Build date: 2017-10-31 22:42:13-0400
Xamarin.Mac
Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.
Build Information
Release ID: 702020011
Git revision: b604c37c5a4a2f0919b45ffbe2aaad9fe040af31
Build date: 2017-11-01 08:31:43-04
Xamarin addins: d57dc14cbd4eb166ee62bab585965ab78d3650bc
Build lane: monodevelop-lion-d15-4
Operating System
Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
Wed Oct 4 00:17:00 PDT 2017
root:xnu-3789.71.6~1/RELEASE_X86_64 x86_64
============= XCode =============
XCode for Mac
Version 9.1 (9B55)
============= Mono ==============
Mono JIT compiler version 5.4.1.6 (2017-06/1f4613aa1ac Wed Oct 18 09:31:57 EDT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: yes(3.6.0svn-mono-master/8b1520c8aae)
GC: sgen (concurrent by default)
========= .NET Core SDK =========
.NET Core SDK
Version 2.0.3
=================================
The project can be build on the MacMini itself. Only the VSTS task keeps failing...
Does someone have any idea's left which can help me solve my issue?
Kind regards,
Jop
Everything started to work fine after we manually edited the .NET Standard 2.0 project file (*.csproj) and add a PackageReference by hand.
<ItemGroup>
...
<PackageReference Include="NETStandard.Library" version="2.0.0" />
...
</ItemGroup>
I am unable to build a NDK project from the Android Studio environment but can build it manually using the command console.
I get the following error after building:
Error:Execution failed for task ':xxxxxx:compileReleaseNdk'.> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\xxxxx\AppData\Local\Android\SDK\android-sdk\ndk-bundle\ndk-build.cmd'' finished with non-zero exit value 2
I got a similar error while invoking ndk-build.cmd manually using the console from the jni directory where my NDK project is stored.However I fixed it by modifying the following in my Application.mk file as follows:
NDK_TOOLCHAIN_VERSION := 4.9
since 4.9 is the tool chain available on my install. I suspect from the Android Studio environment, the toolchain version is being picked incorrectly, and yet I do not know where to set this option in the GUI.
The build.gradle file has the following NDK block:
ndk{
moduleName "xxxxxx"
ldLibs "log"
cFlags "-std=c++11 -fexceptions"
stl "gnustl_static"
abiFilters "arm64-v8a armeabi armeabi-v7a mips mips64 x86 x86_64"
}
Please advise me on how to go about solving this problem.
Just out of curiosity, I moved my project directory to the desktop and tried to build that project. The build was successful.
Finally narrowed down the problem to the NDK compiler not being able to create the following intermediate object file inside my project folder:
C:\Users\xxxxx\GitRepos\REVIEWS\xxx\SMART-xxx\xxxx-xxx-androidnative\xxxLibraries\xxxlibrary\build\intermediates\ndk\debug\obj/local/arm64-v8a/objs/natXXXX/C_\Users\xxxxx\GitRepos\REVIEWS\xxx\SMART-xxxx\xxxx-xxx-androidnative\xxxLibraries\xxxlibrary\src\main\jni\NativeXXXX.o.d
The reason was the well known windows path cannot exceed 255 characters issue. As you can see above the NDK-Build utility tries to append a deep folder hierarchy like "C_\Users\xxxxx\GitRepos\REVIEWS\xxx\SMART-xxxx\xxxx-xxx-androidnative\xxxLibraries\xxxlibrary\src\main\jni\" which exceeds MAX_PATH.
I recently just started using linux and I'm not very familiar with some of the errors or commands.
I keep getting the following error and really can't understand why
"/home/steambotv1.0/SteamBot-master/.nuget/../.ci/exec-with-retry.sh: No such file or directory"
Why is it looking for that file? it never did on windows (it compiles fine on windows)
Can any please point me in the right direction?
Here is the rest of the error message:
XBuild Engine Version 3.0.0.0
Mono, Version 3.0.0.0
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.
Build started 8/5/2015 12:00:36 AM.
Project "/home/steambotv1.0/SteamBot-master/SteamBot.sln" (default target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Target Build:
Project "/home/steambotv1.0/SteamBot-master/SteamTrade/SteamTrade.csproj" (default target(s)):
Target RestorePackages:
Executing: bash "/home/steambotv1.0/SteamBot-master/.nuget/../.ci/exec-with-retry.sh" mono --runtime=v4.0.30319 /home/steambotv1.0/SteamBot-master/.nuget/NuGet.exe install "packages.config" -source "" -RequireConsent -solutionDir "/home/steambotv1.0/SteamBot-master/"
bash: /home/steambotv1.0/SteamBot-master/.nuget/../.ci/exec-with-retry.sh: No such file or directory
/home/steambotv1.0/SteamBot-master/.nuget/NuGet.targets: error : Command 'bash "/home/steambotv1.0/SteamBot-master/.nuget/../.ci/exec-with-retry.sh" mono --runtime=v4.0.30319 /home/steambotv1.0/SteamBot-master/.nuget/NuGet.exe install "packages.config" -source "" -RequireConsent -solutionDir "/home/steambotv1.0/SteamBot-master/"' exited with code: 127.
Task "Exec" execution -- FAILED
Done building target "RestorePackages" in project "/home/steambotv1.0/SteamBot-master/SteamTrade/SteamTrade.csproj".-- FAILED
Done building project "/home/steambotv1.0/SteamBot-master/SteamTrade/SteamTrade.csproj".-- FAILED
Task "MSBuild" execution -- FAILED
Done building target "Build" in project "/home/steambotv1.0/SteamBot-master/SteamBot.sln".-- FAILED
Done building project "/home/steambotv1.0/SteamBot-master/SteamBot.sln".-- FAILED
Build FAILED.
Errors:
/home/steambotv1.0/SteamBot-master/SteamBot.sln (default targets) ->
(Build target) ->
/home/steambotv1.0/SteamBot-master/SteamTrade/SteamTrade.csproj (default targets) ->
/home/steambotv1.0/SteamBot-master/.nuget/NuGet.targets (RestorePackages target) ->
/home/steambotv1.0/SteamBot-master/.nuget/NuGet.targets: error : Command 'bash "/home/steambotv1.0/SteamBot-master/.nuget/../.ci/exec-with-retry.sh" mono --runtime=v4.0.30319 /home/steambotv1.0/SteamBot-master/.nuget/NuGet.exe install "packages.config" -source "" -RequireConsent -solutionDir "/home/steambotv1.0/SteamBot-master/"' exited with code: 127.
Test if you can see the file in a terminal window opened with the same user.
If not, change the permissions in Admin mode.