dotnet / dotnet/format

Advice about msbuild task warnings

Open
#584 24 comments 9 reactions 0 assignees View on GitHub
Question
Dominant language
No language data
Stars
1.9k
Forks
173
Avg merge
10d 13h
Merged PRs (30d)
1

Description

I'm trying to make sense of some of the warnings `dotnet-format` is spitting out. This is on a solution containing .net core projects, using SDK 3.1.101 on macOS.

When I run `dotnet-format` on my solution, I get:

```txt
Formatting code files in workspace '/Users/ryan/github.com/.sln.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
Format complete in 5610ms.
```

When I rerun with `-v diag` I get:

```txt
Formatting code files in workspace '/Users/ryan/github.com/.sln'.
Loading workspace.
Msbuild failed when processing the file '/Users/ryan/github.com/' with message: /usr/local/share/dotnet/sdk/3.1.101/Microsoft.Common.CurrentVersion.targets: (1540, 5): The "Microsoft.Build.Tasks.ResolveNonMSBuildProjectOutput" 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.
Found project reference without a matching metadata reference: /Users/ryan/github.com/dotnet/
Msbuild failed when processing the file '/Users/ryan/github.com/' with message: /usr/local/share/dotnet/sdk/3.1.101/Microsoft.Common.CurrentVersion.targets: (1540, 5): The "ResolveNonMSBuildProjectOutput" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "/usr/local/share/dotnet/sdk/3.1.101" directory.
Found project reference without a matching metadata reference: /Users/ryan/github.com/dotnet/
Found project reference without a matching metadata reference: /Users/ryan/github.com/
Msbuild failed when processing the file '/Users/ryan/github.com/' with message: /usr/local/share/dotnet/sdk/3.1.101/Microsoft.Common.CurrentVersion.targets: (1540, 5): The "ResolveNonMSBuildProjectOutput" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "/usr/local/share/dotnet/sdk/3.1.101" directory.
Found project reference without a matching metadata reference: /Users/ryan/github.com/
Found project reference without a matching metadata reference: /Users/ryan/github.com/
Found project reference without a matching metadata reference: /Users/ryan/github.com/
Complete in 4307ms.
Determining formattable files.
Complete in 985ms.
Running formatters.
Complete in 518ms.
Formatted 0 of 106 files.
Format complete in 5816ms.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.