Problems publishing dotnet 4.6.2 console app
See original GitHub issueSteps to reproduce
- Create .NET Framework 4.6.2 console app in Visual studio
- Run dotnet build from command line (success)
- Run dotnet publish from command line, error: C:\Program Files\dotnet\sdk\2.0.3\Microsoft.Common.CurrentVersion.targets(3861,5): error MSB4062: The “Microsoft.Build.Tasks.ResolveManifestFiles” task could not be loaded from the assembly Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
I have a sample project here: https://github.com/bjnoel/ConsoleTest with a 4.6.2 class library and 4.6.2 console app. The class library builds/publishes fine, the console app only builds.
I have tried publishing with the -f net462 flag and it makes no difference.
Expected behavior
The console app publishes or gives a meaningful error.
Actual behavior
error MSB4062 as above.
Environment data
dotnet --info
output:
.NET Command Line Tools (2.0.3)
Product Information: Version: 2.0.3 Commit SHA-1 hash: 12f0c7efcc
Runtime Environment: OS Name: Windows OS Version: 10.0.16299 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.0.3\
Microsoft .NET Core Shared Framework Host
Version : 2.0.3 Build : a9190d4a75f4a982ae4b4fa8d1a24526566c69df
Other information
We have a large solution that mostly contains .NET core 2, .Net standard 2 libraries, this legacy .net framework console app is causing issues with our CI server. Publishing through visual studio works ok.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top GitHub Comments
I’m encountering the same issue, wouldn’t it make sense to be able to tell the cli to ignore “unsupported” projects?
Jupp, same here.