1

I believe standard .Net framework code cannot be built on Linux so I think we cannot build and deploy standard .Net framework code (not .Net core) using Jenkins running on Linux.

Is there anyway to achieve this? Can we add a windows slave to do this?

developer
  • 1,401
  • 4
  • 28
  • 73
  • by `standard .Net framework` you mean the `Full .Net Framework` and not `.Net Standard` or `.Net Core` correct? If so, no, you can't do that. The full framework depends on on Win32. – Matthew Whited May 20 '19 at 20:54
  • Yes, I meant full .net framwork. Can I add windows slave on Jenkins deployed on linux server and use it to compile the code? – developer May 21 '19 at 16:05

1 Answers1

1

It depends on what exactly you need.

Currently new build infrastructure is being developed that should allow you to build many .NET Framework libraries and console applications on every platform that .NET Core supports.

See the design PR for Easy Acquisition of .NET Framework Targeting Pack which describes the packages currently in preview which can be used in a project via

<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies"
                  Version="1.0.0-preview.1" 
                  PrivateAssets="All" />

Another option would be to install mono and use mono's msbuild command to build existing .NET Framework projects, although there may be some different in regard to assembly resolution when using specific NuGet packages.

However, there is no tooling for more advanced scenarios like WPF or ASP.NET (classic) applications as well as EF 6 .edmx tooling.

Martin Ullrich
  • 94,744
  • 25
  • 252
  • 217
  • Thanks for your quick response. Can I add a windows slave on Jenkins deployed on linux to compile the full .net framework (asp.net, wpf apps)? – developer May 21 '19 at 16:07
  • 1
    Yes you should be able to use windows build slaves, please refer to Jenkins’ documentation or ask a new question when you run into issues. – Martin Ullrich May 21 '19 at 17:15
  • Yes, you can have a Jenkins Master on Linux with windows nodes (and linux nodes too); we do. Consider using labels to to identify what jobs should be restricted to run where. – Ian W May 22 '19 at 09:47