Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

C# WPF program works fine but pipeline fails

Varun Chandra
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 15, 2023

I have a WPF project that I worked on and its working great. My team has been using this for test automation in our lab. I recently decided to improve the way we handle our software's and decided to configure pipelines and develop unit tests. I managed to write a couple of unit tests and they currently pass. 

 

I read a couple of blogs and tried to configure a pipeline for my repo on bitbucket. For some reason I can't get it to pass. It fails all the time. I fixed the initial errors that I got and they don't appear any more. But the latest error doesn't make any sense. Here is the output:

+ dotnet build
Microsoft (R) Build Engine version 16.7.3+2f374e28e for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
/usr/share/dotnet/sdk/3.1.426/NuGet.targets(128,5): error : Invalid restore input. Invalid target framework 'unsupported'. Input files: /opt/atlassian/pipelines/agent/build/Common/CommonLibraries/CommonLibraries.csproj. [/opt/atlassian/pipelines/agent/build/InverterAutomation.sln]
Build FAILED.
/usr/share/dotnet/sdk/3.1.426/NuGet.targets(128,5): error : Invalid restore input. Invalid target framework 'unsupported'. Input files: /opt/atlassian/pipelines/agent/build/Common/CommonLibraries/CommonLibraries.csproj. [/opt/atlassian/pipelines/agent/build/InverterAutomation.sln]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.82
image.png
Main Project (has a output file). This has the WPF component. image.pngLibrary project. Has no output component.  image.png

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 17, 2023

Hi @Varun Chandra!

Pipelines builds are executed in Docker containers based on the Docker image you define in the bitbucket-pipelines.yml file of your repo (your yml file has as image the Docker Hub image mcr.microsoft.com/dotnet/core/sdk:3.1).

Pipelines that run in our own infrastructure can build .NET Core applications, as .NET Core is cross-platform.

I read the documentation for WPF here:

I see there that WPF only runs on Windows, so it looks like it is not possible to build this application in Pipelines, as Pipelines currently runs on a Kubernetes cluster of Linux Docker hosts.

We offer Windows Runners that allow you to run builds in Pipelines on your own Windows infrastructure, and you don’t get charged for the build minutes used by your self-hosted Windows runner:

If you have a Windows machine that you can use to run your builds, you can look into configuring a Windows Runner for these builds instead. You will be able to view the build logs for these builds as well on the Pipelines page of the repo on our website.

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events