This question is in reference to Atlassian Documentation: Bitbucket Pipelines (beta)
I'm wondering is pipelines support to build .net framework? I didn't see .yml config for .net. Please advise.
Regards
John Wu
The feature request for Windows/.NET builds is here: https://bitbucket.org/site/master/issues/13452/support-for-native-windows-net-builds-on
Follow that ticket for updates from our team.
Hello I would like to ask the same question. Will there be in near future any solution to this? We need to build applications with .net 4.7.1 in pipelines and due to missing TPT inheritance in Entity Framework core we cannot use .netCore images. Thank You for reply
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Windows has an 80% desktop market share as of 2019 and people are still creating and maintaining desktop applications for it in .NET Framework and C++. Offering a windows build platform on pipelines would be in Atlassian's benefit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you don't mind using mono, you can as well do:
image: mono
pipelines: default: - step: script: - nuget restore - MONO_IOMAP=case xbuild /t:Build /p:Configuration="Release" /p:Platform="Any CPU" Solution.sln
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tried with this script but I am not able to run the build. I am getting the error near nuget restore. command not found. Please help me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use msbuild instead deprecated xbuild
msbuild /t:Clean,Build /p:Configuration=Release 'Solution.sln'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@PlanCZero I know you posted this a looong time ago but in case it may help you or others...
In our case, we really like Bitbucket but as we need to "Build" our .NET Framework projects we are using BitBucket and Azure DevOps together. So, we have a Pipeline defined in Azure DevOps getting the source code from BitBucket.
Therefore, we are able to build our Windows .Net Framework projects in Azure Devops while still maintaining our code on BitBucket. They both integrate really well and you can get the Build status from both tools ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @PlanCZero I like this solution with Bitbucket and Azure DevOps but the issue is we are having IP Restriction on bitbucket, Is there way we can whitelist particular repo from IP-Restriction ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Here's my "best effort" for testing .Net projects in Pipelines.
So, we know that there is no msbuild support at the moment.
And porting to .Net Core is not a good solution.
However, I've come up with a halfway house.
A way to test your C# with Pipelines, but still output a Full Framework build.
You need Visual Studio 2017
You're going to create new .csproj files for .Net SDK rather than msbuild
You will use the new <TargetFrameworks> node rather than the default, singular <TargetFramework> node
Each DLL has 2 targets by default, the .Net Standard 2.0 and the .Net Full Framework 4.5.1
Each entry project, be it EXE, ASP.Net, etc, also has 2 targets, .Net Core 2.0 and .Net Full Framework 4.5.1
Two unfortunate, serious limitations exist:
1) You can't use Linq To Sql, you have to replace it or buy the drop in replacement LinqConnect by DevArt
2) You must either port your .Net web projects to ASP.Net MVC or Razer (any programming model older than that is not supported in ASP.Net Core) or test your ASP.Net web projects somewhere else
There's other changes, it's too much to list here, but by and large I've found most things "Just Work" until .Net Standard
So, your new DLL csproj files look like this:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net451</TargetFrameworks>
</PropertyGroup>
</Project>
Exe projects look like this:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.0;net451</TargetFrameworks>
<AssemblyName>MyProj</AssemblyName>
<RootNamespace>RJ.MyProj</RootNamespace>
</PropertyGroup>
</Project>
By default, these include all files in your projects, as opposed to msbuild which includes zero files by default.
There's no GUI support for these project types yet. You need to hand write them. You'll need to put criteria in the references and nuget sections so each framework version has it's own section. You can add as many targets as you like, all the way back to .Net Framework 2.0! When you build these, it outputs (by default) 2 folders under bin. Their names match the target framework.
Once you get this working, you have two set of binaries. One is the full framework and it should be identical to what you built before.
The other binary is .Net Standard or Core and can be spun up and tested inside a .Net Core container in Pipelines.
The logic is that, for your business logic at least, if it passes your tests running under .Net Core, it's equivalent to passing under the full framework.
I'm still learning all this, I've only got to the point of everything compiling and it seems to run under both types of framework.
Most of the information I needed to learn to get this working so far came from this page:
MultiTargeting And Porting a .Net Library to .Net Core 2.0
It's a bit out of date, it's from when all of this stuff was in preview.
I know it's not what people are asking for, but it's the closest you can do without requiring live software to be ported to .Net Core
Good luck everybody! If I ever get an example project together, I'll post that here as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
One of our customers provided an example of a Bitbucket Pipelines configuration for a .NET Core application. You can find it on Bitbucket.
We do not yet support running pipelines in Windows environment but we're keeping an eye on the work that Docker and Microsoft are doing together.
Thanks,
Sten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
This is not an answer.
However it is a solution.
Look into using .Net Standard 2.0 and up.
Targeting .Net Standard allows your project to multi target .Net Full and .Net Core.
2.0 and up allows you to use most .net tools like MVC, razor and entities frame framework.
Your project can even be set up to produce multiple sets of binaries.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still no positive news on that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any updates to this folks? MS has full docker support these days, when are we going to see that in pipelines?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are there any Docker images that have MSBuild on? I am having problems with Mono and my .NET solution (I don't use .NET core yet)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here are two blog posts about building .Net apps in Pipelines, using the docker image:
image: microsoft/dotnet
http://davevde.github.io/using-bitbucket-pipelines-with-aspnet-core/
http://davevde.github.io/bitbucket-pipeline-with-aspnet-core-and-webpack/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, @Sigge Birgisson. .NET Core is a bit too "shiny and new" to be adopted for our new client projects.
Do you know of any reference information that would help us understand the build and test running process for ASP.NET 4.x WebAPI solutions using NUnit 3?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dave Todaro Have you found any information on how to build ASP.NET 4.x solutions in Bitbucket Pipelines?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I could find an example project: https://bitbucket.org/liammoat/pipelines-dotnet-demo/src/master/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That example if for .NET Core and as the original question states is about: ".NET framework".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What build tools do people use for .NET these days? When I last coded C# a couple years back, MS Build was pervasive, like it or not. But we liked to use a layer over it like psake or fake. Are people using those or others?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I recently reviewed a whole lot of CI tools - I use BB Pipelines for the Node frontend and Visual Studio Team Services for the .NET part. I have to say it has improved a LOT since I last used it a few years ago. The scrum tools are massively improved too. BuddyBuild is a fantastic CI tool but uses Mono for .NET. So I would check out VSTS. When BB comes out of beta I am moving all my Node projects to VSTS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have same issue... my app is Console App / Windows Sevrice -
.net 4.5 app and I would like to get it building in PIPELINEs.. Any chance for using msbuild?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We're currently evaluating Atlassian's BitBucket, Jira and Pipelines.
Everything's good except we're going to have to use msbuild for, well, everything.
No way we can move to .net core first.
What's the status on msbuild in a windows dock?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.