-2

I'm in the process of moving to .NET Core. In the mean time, I have two sets of apps - some using .NET Core 3.1 and the rest the full .NET Framework 4.6.2.

Also, I'm trying to make a build script to build all apps with one command.

But dotnet publish does not work for full .NET Framework projects.

How can I use dotnet publish command to build full .NET Framework applications?

Milad Tabrizi
  • 480
  • 3
  • 15
  • 2
    As you've discovered - no, the `dotnet` command line tool suite is solely for **.NET Core** projects and builds – marc_s Aug 31 '20 at 16:44
  • 2
    https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet -> "This article applies to: ✔️ .NET Core 2.1 SDK and later versions" -> no, you cannot – Camilo Terevinto Aug 31 '20 at 16:48
  • I think it's a little harsh to say `dotnet` as a cmdline tool only works for .NET Core (or .NET6+) projects. Reason being, you can run `dotnet msbuild OldProject.csproj` to build older projects and indeed that's what you need to do in TeamCity now that the VS build runner is deprecated. – benmccallum Nov 25 '21 at 08:19

1 Answers1

2

dontnet commands only works for .NET Core projects, so It is working as intended!

Milad Tabrizi
  • 480
  • 3
  • 15