How to fire a build from visual studio 2010 using ant? - visual-studio

I want to automatically build my project using ant.
Each and every time I am doing it manually.
Can any one please tell me how to start a build using ant in visual studio 2010?

Hi i have done using the command prompt .
TFSBuild start /collection:"http://milagan2008svr:8080/" /builddefinition:"EvolveNET 2010\EvolveNET" /droplocation:"\\milagan2008svr\Builds\EvolveNET 2010" /priority:"High" /login:usr,passwd
So with ant i used <exec> of ant command to fire a build. This solved my problem :)

Related

Xamarin.forms project in Mac terminal without Visual Studio

I'm trying to build a job for Xamarin.forms project in mac terminal without UI method. but, not sure which are the tools are mandatory to be installed. Could anyone help here ?
Installed : Dotnet Core 6 version of visual studio SDK
Build need to be fully in terminal(mac-command line)
Need to do without visual studio application
Why not try build the app from the command line using MSBuild and see what errors it gives you. That way, you can find out what's missing and add things until it builds.
I'm using this command to build my apps from Windows (you may need to change a few things on Mac):
"C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\msbuild.exe" C:\Projects\MyApp\src\MyApp\MyApp.iOS\MyApp.iOS.csproj /p:Platform=iPhone /p:BuildIpa=true /p:IpaPackageDir=C:\Projects\MyApp\artifacts\App_iOS /p:IpaPackageName=MyApp.ipa /p:ServerAddress=192.168.0.23 /p:ServerUser="Username" /p:ServerPassword=123456SafePassword /p:ContinueOnDisconnected=false /p:Configuration=Release /restore /target:Build /verbosity:Normal
Here's some useful info on Continuous Integration with Xamarin.

command line solution build using devenv rebuilding more projects than visual studio solution build

I am trying to mimic visual studio solution build from command prompt using batch script but there is significant difference between manual solution build(ctrl+shift+b) inside visual studio and command line solution build using devenv in terms of project rebuild counts. More projects are getting rebuilt from command line in comparison to visual studio solution build.
I am using this for command line build in batch file:
call"C:\ProgramFiles(x86)\MicrosoftVisualStudio\2019\Professional\VC\Auxiliary\Build\vcvars32.bat"
devenv solution_name.sln /build "Debug"
command line solution build output looks like this: devenv solution build using cmd prompt
visual studio solution build output looks like this: manual vs solution build output
I have tried changing the configurations too but it didn't help, I am curious why this might be happening and is there a way to get same result from command line build as of manual vs solution build?

Jenkins - Visual Studio Command line arguments

Planning to Build & Deploy SSIS Projects(ISPAC) or Database Solutions (DAPAC) from Jenkins using Visual Studio Command line arguments.
Question: I know i can execute Windows batch commands but i would like to if i can execute Visual Studio Commands as well.
FYI: Planning to install Visual Studio on the Agent.
I think you will be able to do it using msbuild. If your SSIS solution can be compiled by Visual Studio, the msbuild command can do it as well (See also msbuild integration).
To utilize msbuild to create an ispac/dapac file take a look at this article. It's not Jenkins specific but that should not matter.

How to build the MSBuild.exe after cloning the git

I am trying to get MSBuild.exe without installing any Microsoft Visual Studio in Windows 10. I found it possible to get the git of MSBuild.exe from here:
git clone https://github.com/Microsoft/msbuild.git
But I don't know how to build the MSBuild.exe once cloned the branch. The instructions in the repository are to build it with Visual Studio 2017. But I read it is possible to get MSBuild.exe without installing any Visual Studio.
I am really new at this, so maybe similar questions have been asked about this topic but I wasn't able to find them. Any help is appreciated.
Don't try to build MsBuild yourself which is only part of the tools you need.
But I read it is possible to get MSBuild.exe without installing any Visual Studio.
Yes, you should install "Microsoft Build Tools".
Use your preferred search engine to find it or look at:
How can I install the VS2017 version of msbuild on a build server without installing the IDE?

How to build a Xamarin DLL in visual studio from the command line?

Xamarin Studio has been replaced for Visual Studio on MacOS. I have a project that builds a DLL using Xamarin iOS. For DevOps (automated release), I want to build the project for release from the command line. I know previously the mdtool was used for this purpose, as seen in this answer but now in visual studio there is no more mdtools binary anymore.
msbuild has replaced mdtool (and xbuild), so all the tasks that once were handled by mdtool are now handled by the cross-platform msbuild and its standard set of cmd-line options.
Release configuration:
Clean a single project in a solution
msbuild /p:SolutionDir=./ /target:Clean /p:Configuration=Release SomeProjectLibrary/SomeProjectLibrary.csproj
Build a single project in a solution
msbuild /p:SolutionDir=./ /target:Build /p:Configuration=Release SomeProjectLibrary/SomeProjectLibrary.csproj
Note: Using Using SolutionDir=./ so these cmds are being run from the root directory of the solution.

Resources