Skip to content

Repo sync for protected CLA branch #8552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions docs/containers/troubleshooting-docker-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ms.assetid: 346f70b9-7b52-4688-a8e8-8f53869618d3
ms.devlang: dotnet
ms.topic: troubleshooting
ms.workload: multiple
ms.date: 11/12/2021
ms.date: 10/12/2022
ms.author: ghogen
---
# Troubleshoot Visual Studio development with Docker
Expand All @@ -28,7 +28,7 @@ File sharing only needs to be managed if you are using Hyper-V with Docker. If y
![Shared drives](media/troubleshooting-docker-errors/docker-settings-image.png)

> [!TIP]
> Visual Studio versions later than Visual Studio 2017 version 15.6 will prompt when **Shared Drives** aren't configured.
> Visual Studio prompts you when **Shared Drives** aren't configured.

## Unable to start debugging

Expand Down Expand Up @@ -89,18 +89,12 @@ Click **Apply & Restart**. These steps modify the configuration file at *%Progra

## Container type mismatch

When adding Docker support to a project, you choose either a Windows or a Linux container. If the Docker Server host is not configured to run the same container type as the project target, you will likely see an error similar to the one below:
When adding Docker support to a project, you choose either a Windows or a Linux container. If the Docker Server host is not configured to run the same container type as the project target, you see an error similar to:

![Screenshot of Docker Host and Project Mismatch](media/troubleshooting-docker-errors/docker-host-config-change-linux-to-windows.png)

To resolve this issue:
To resolve this issue, right-click the Docker for Windows icon in the System Tray and choose **Switch to Windows containers...** or **Switch to Linux containers...**.

- Right-click the Docker for Windows icon in the System Tray and choose **Switch to Windows containers...** or **Switch to Linux containers...**.
## Other issues

## Microsoft/DockerTools GitHub repo

For any other issues you encounter, see [Microsoft/DockerTools](https://github.com/microsoft/dockertools/issues) issues.

## See also

- [Visual Studio troubleshooting](/troubleshoot/visualstudio/welcome-visual-studio/)
For any other issues, see the [Microsoft/DockerTools](https://github.com/microsoft/dockertools/issues) repo.
36 changes: 10 additions & 26 deletions docs/data-tools/troubleshooting-service-references.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Troubleshooting Service References
title: Troubleshoot references to WCF or WCF Data Services
description: Review common issues that may occur when you are working with Windows Communication Foundation (WCF) or WCF Data Services references in Visual Studio.
ms.custom: SEO-VS-2020
ms.date: 11/04/2016
Expand All @@ -20,20 +20,20 @@ ms.technology: vs-data-tools
ms.workload:
- data-storage
---
# Troubleshoot service references
# Troubleshoot Windows Communication Foundation (WCF) or WCF Data Services references in Visual Studio

[!INCLUDE [Visual Studio](~/includes/applies-to-version/vs-windows-only.md)]

This topic lists common issues that may occur when you are working with Windows Communication Foundation (WCF) or WCF Data Services references in Visual Studio.
This topic lists solutions to common issues that may occur when you are working with references to [Windows Communication Foundation (WCF) or WCF Data Services in Visual Studio](../data-tools/windows-communication-foundation-services-and-wcf-data-services-in-visual-studio.md).

If you want to update or remove a service reference, see the article "[Add, update, or remove a WCF data service reference](how-to-add-update-or-remove-a-wcf-data-service-reference.md)".

## Error returning data from a service

When you return a `DataSet` or `DataTable` from a service, you may receive a "The maximum size quota for incoming messages has been exceeded" exception. By default, the `MaxReceivedMessageSize` property for some bindings is set to a relatively small value to limit exposure to denial-of-service attacks. You can increase this value to prevent the exception. For more information, see <xref:System.ServiceModel.HttpBindingBase.MaxReceivedMessageSize%2A>.

To fix this error:

1. In **Solution Explorer**, double-click the *app.config* file to open it.

2. Locate the `MaxReceivedMessageSize` property and change it to a larger value.

## Cannot find a service in my solution
Expand All @@ -42,26 +42,23 @@ When you click the **Discover** button in the **Add Service References** dialog

To fix this error:

- In **Solution Explorer**, right-click the WCF Service Library project and click **Build**.
1. In **Solution Explorer**, right-click the WCF Service Library project.
1. Click **Build**.

## Error accessing a service over a remote desktop

When a user accesses a Web-hosted WCF service over a remote desktop connection and the user does not have administrative permissions, NTLM authentication is used. If the user does not have administrative permissions, the user may receive the following error message: "The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'NTLM'."

To fix this error:

1. In the website project, open the **Properties** pages.

2. On the **Start Options** tab, clear the **NTLM Authentication** check box.

> [!NOTE]
> You should turn off NTLM authentication only for websites that exclusively contain WCF services. Security for WCF services is managed through the configuration in the *web.config* file. This makes NTLM authentication unnecessary.
> [!NOTE]
> You should turn off NTLM authentication only for websites that exclusively contain WCF services. Security for WCF services is managed through the configuration in the *web.config* file. This makes NTLM authentication unnecessary.

## Access level for generated classes setting has no effect

Setting the **Access level for generated classes** option in the **Configure Service References** dialog box to **Internal** or **Friend** may not always work. Even though the option appears to be set in the dialog box, the resulting support classes are generated with an access level of `Public`.

This is a known limitation of certain types, such as those serialized using the <xref:System.Xml.Serialization.XmlSerializer>.
Setting the **Access level for generated classes** option in the **Configure Service References** dialog box to **Internal** or **Friend** may not always work. Even though the option appears to be set in the dialog box, the resulting support classes are generated with an access level of `Public`. This is a known limitation of certain types, such as those serialized using the <xref:System.Xml.Serialization.XmlSerializer>.

## Error debugging service code

Expand All @@ -74,17 +71,11 @@ If the service project is removed from the solution, this explicit build depende
To fix this error, you have to manually rebuild the service project:

1. On the **Tools** menu, click **Options**.

2. In the **Options** dialog box, expand **Projects and Solutions**, and then select **General**.

3. Make sure that the **Show advanced build configurations** check box is selected, and then click **OK**.

4. Load the WCF service project.

5. In the **Configuration Manager** dialog box, set the **Active solution configuration** to **Debug**. For more information, see [How to: Create and edit configurations](../ide/how-to-create-and-edit-configurations.md).

6. In **Solution Explorer**, select the WCF service project.

7. On the **Build** menu, click **Rebuild** to rebuild the WCF service project.

## WCF Data Services do not display in the browser
Expand All @@ -94,13 +85,6 @@ When it attempts to view an XML representation of data in a [!INCLUDE[ss_data_se
To fix this error, disable RSS feeds:

1. In Internet Explorer, on the **Tools** menu, click **Internet Options**.

2. On the **Content** tab, in the **Feeds** section, click **Settings**.

3. In the **Feed Settings** dialog box, clear the **Turn on feed reading view** check box, and then click **OK**.

4. Click **OK** to close the **Internet Options** dialog box.

## See also

- [Windows Communication Foundation Services and WCF Data Services in Visual Studio](../data-tools/windows-communication-foundation-services-and-wcf-data-services-in-visual-studio.md)
44 changes: 15 additions & 29 deletions docs/msbuild/diagnosing-task-failures.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,51 +18,37 @@ ms.technology: msbuild
ms.workload:
- multiple
---
# Diagnosing task failures
# Diagnose MSBuild task failures

`MSB6006` is emitted when a <xref:Microsoft.Build.Utilities.ToolTask>–derived class runs a tool process that returns a nonzero exit code if the task did not log a more specific error.

## Identifying the failing task
## Identify the failing task

When you encounter a task error, the first step is to identify the task that is failing.

The text of the error specifies the tool name (either a friendly name provided by the task's implementation of <xref:Microsoft.Build.Utilities.ToolTask.ToolName> or the name of the executable) and the numeric exit code. For example, in
The text of the error specifies the tool name (either a friendly name provided by the task's implementation of <xref:Microsoft.Build.Utilities.ToolTask.ToolName> or the name of the executable) and the numeric exit code. For example, in `error MSB6006: "custom tool" exited with code 1.` the tool name is `custom tool` and the exit code is `1`.

```text
error MSB6006: "custom tool" exited with code 1.
```
**To find the failed MSBuild task:**

The tool name is `custom tool` and the exit code is `1`.
+ **In the command-line builds**: If the build was configured to include a summary (the default), the summary will look like this:

### Command-line builds
```text
Build FAILED.

If the build was configured to include a summary (the default), the summary will look like this:
"S:\MSB6006_demo\MSB6006_demo.csproj" (default target) (1) ->
(InvokeToolTask target) ->
S:\MSB6006_demo\MSB6006_demo.csproj(19,5): error MSB6006: "custom tool" exited with code 1.
```

```text
Build FAILED.
This result indicates that the error occurred in a task defined on line 19 of the file `S:\MSB6006_demo\MSB6006_demo.csproj`, in a target named `InvokeToolTask`, in the project `S:\MSB6006_demo\MSB6006_demo.csproj`.

"S:\MSB6006_demo\MSB6006_demo.csproj" (default target) (1) ->
(InvokeToolTask target) ->
S:\MSB6006_demo\MSB6006_demo.csproj(19,5): error MSB6006: "custom tool" exited with code 1.
```
+ **In the Visual Studio UI**: The same information is available in the Visual Studio error list in the columns `Project`, `File`, and `Line`.

This result indicates that the error occurred in a task defined on line 19 of the file `S:\MSB6006_demo\MSB6006_demo.csproj`, in a target named `InvokeToolTask`, in the project `S:\MSB6006_demo\MSB6006_demo.csproj`.

### In Visual Studio

The same information is available in the Visual Studio error list in the columns `Project`, `File`, and `Line`.

## Finding more failure information
## Find more failure information

This error is emitted when the task did not log a specific error. The failure to log an error is often because the task is not configured to understand the error format emitted by the tool it calls.

Well-behaved tools generally emit some contextual or error information to their standard output or error stream, and tasks capture and log this information by default. Look in the log entries before the error occurred for additional information. Rerunning the build with a higher log level may be required to preserve this information.
Well-behaved tools generally emit some contextual or error information to their standard output or error stream, and tasks capture and log this information by default. Look in the log entries before the error occurred for additional information. Rerunning the build with a higher log level may be required to preserve this information. Hopefully, the additional context or errors identified in logging reveal the root cause of the problem. If not, you may have to narrow down the potential causes by examining the properties and items that are inputs to the failing task.

> [!NOTE]
> MSBuild recognizes a specific diagnostic output format. The details of this format are documented at [MSBuild and Visual Studio format for diagnostic messages](msbuild-diagnostic-format-for-tasks.md).

## Next steps

Hopefully, the additional context or errors identified in logging reveal the root cause of the problem.

If they do not, you may have to narrow down the potential causes by examining the properties and items that are inputs to the failing task.