title: VS Studio 2019 error when trying to publish self-contained
body: <p>I wrote a c# console application that I want to compile for a linux machine. When I use the following command in the console, I get this error:</p>
  
  <pre><code>dotnet publish -r linux-x64 --self-contained true
  
  C:\Program Files\dotnet\sdk\3.1.300\Microsoft.Common.CurrentVersion.targets(3983,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 &lt;UsingTask&gt; 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. [X:\Coding\Visual Studio 2019\Projects\firstDiscordBot\firstDiscordBot\firstDiscordBot.csproj]
  </code></pre>
  
  <p>I read through a lot of similar questions but none of the solutions worked for me. I tried deleting the .vs folder inside my solution's project folder and did Clean and Build and I tried entering <code>Install-Package MSBuildTasks</code> into the NuGet Package Manager Console and then rebuilding my project.</p>
  
  <p>(Error message in plain text, maybe a bit easier to read:)</p>
  
  <p>C:\Program Files\dotnet\sdk\3.1.300\Microsoft.Common.CurrentVersion.targets(3983,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  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. [X:\Coding\Visual Studio 2019\Projects\firstDiscordBot\firstDiscordBot\firstDiscordBot.csproj]</p>
  
  <p>[Edit]
  I did some experiments and now the error message says the following:</p>
  
  <p>C:\Program Files\dotnet\sdk\3.1.300\Microsoft.Common.CurrentVersion.targets(3975,5): error MSB4062: The "Microsoft.Build.Tasks.SignFile" task could not be loaded from the assembly Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.  Confirm that the  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. [X:\Coding\Visual Studio 2019\Projects\firstDiscordBot\firstDiscordBot\firstDiscordBot.csproj]</p>
  
  <p>I guess the error is basically the same, it probably won't matter much.</p>
  
  <p>I also did some more research and I tried several more things, such as using the 'Publish' feature when right-clicking my project in the Solution-Explorer and reinstalling the SDK. I also verified all my files several times but none of the above helped.</p>
  
  <p>I just want to mention that every little suggestion would be greatly appreciated as this is the first time, that I don't seem to able to fix the problem, even after multiple hours of research and dedication. So if there's anything you think I could do, I would be very happy.</p>