Jenkins and MsBuild with a MVC website

1

Good, I would like you to help me with the Jenkins continuous integration tool, but above all the problem I have is with the msbuild.  I have a web in asp with nuget packages that in the VS compiles and publishes perfectly nevertheless with the MSbuild and Jenkins compiles me well but when publishing I keep files not necessary any suggestions Thank you!

Nuget Packages:

C:\nuget\nuget.exe restore .\GnossWeb\

Compilation

/t:build /tv:14.0 /m

Publication:

/t:rebuild /p:VisualStudioVersion=14.0 /p:configuration=Debug  /p:Targets=Publish /p:DeployOnBuild=true

Also try this:

/p:Configuration=Release
/p:DeployOnBuild=True
/p:DeployDefaultTarget=WebPublish
/p:WebPublishMethod=FileSystem
/p:DeleteExistingFiles=True

All the above with the msbuild

    
asked by Nacho Alonso 07.04.2017 в 14:18
source

1 answer

0

You can publish from MSBUILD doing:

msbuild MiAplicacion.sln /p:DeployOnBuild=true /p:PublishProfile=MiPerfil

Where MyProfile is is name to the profile of publication. You can find it in your project inside the folder Porperties / PublishProfiles. There must exist an xml file called MyProfile.pubxml.

The most important thing is the publishUrl tag; It is the publication path.

 <publishUrl>..\Paginas\MiPagina</publishUrl>

You can point to a relative path and then take the folder to do deployments in Jenkins for example

    
answered by 11.04.2017 в 22:01