Sal
Sal

Reputation: 39

Configuration to publish ASP.NET CORE projects using Jenkins

I have configured for other projects to publish the .Net project using Jenkins and they all worked well. I'm using this command:

"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" %WORKSPACE%\Source\test1.sln /T:Clean /T:Rebuild. 

But this didn't work for ASP.NET core project using Jenkins to build and publish. Manually, I can build and publish from Visual Studio 2017. Does anyone here know how to configure Jenkins to build and publish ASP.Net CORE project using Jenkins.

Upvotes: 2

Views: 4060

Answers (1)

Lam Le
Lam Le

Reputation: 1849

Jenkins should not be the problem here. I can confirm that my Jenkins jobs are building Net Core 2.0 solutions. You need MSBuild "15" which can be downloaded here (build tools for VS 2017). After installation, the default location should be C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe.

And yours can be changed into something like this:

"& C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe" %WORKSPACE%\Source\test1.sln /T:Clean /T:Rebuild.

Furthermore, you can check the changes here with the build tool at Github.

Upvotes: 3

Related Questions