Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 9, 2025

The MCP server template README was hardcoded for VS Code, but the template also works in Visual Studio IDE which has MCP support. This change makes the README context-aware based on the host identifier.

Changes Made

  1. Created README.VisualStudio.md - New Visual Studio-specific README with:

    • Visual Studio-focused instructions instead of VS Code
    • References to Visual Studio MCP documentation
    • Visual Studio-specific configuration guidance
  2. Updated template.json - Added conditional sources with modifiers:

    • For CLI hosts (dotnetcli/dotnetcli-preview): Uses original README.md (VS Code focused)
    • For IDE hosts (Visual Studio, etc.): Uses README.VisualStudio.md renamed to README.md

Before vs After

CLI/dotnet new (VS Code focused):

## Using the MCP Server in VS Code
## Developing locally in VS Code

Visual Studio IDE (Visual Studio focused):

## Using the MCP Server in Visual Studio  
## Developing locally in Visual Studio

The implementation follows the same pattern used by the ChatWithCustomData template for conditional README files, ensuring consistency with existing template patterns.

Fixes #6590.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 11vvsblobprodcus336.vsblob.vsassets.io
    • Triggering command: dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter McpServerSnapshot --logger console;verbosity=detailed -v m (dns block)
  • 8xbvsblobprodcus382.vsblob.vsassets.io
    • Triggering command: dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter McpServerSnapshot --logger console;verbosity=detailed -v m (dns block)
  • d0svsblobprodcus381.vsblob.vsassets.io
    • Triggering command: dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter McpServerSnapshot --logger console;verbosity=detailed -v m (dns block)
  • e7bvsblobprodcus348.vsblob.vsassets.io
    • Triggering command: /home/REDACTED/work/extensions/extensions/.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /p:TreatWarningsAsErrors=false /p:ContinuousIntegrationBuild=false /home/REDACTED/work/extensions/extensions/artifacts/toolset/restore.proj /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/extensions/extensions/artifacts/toolset/9.0.0-beta.25325.4.txt (dns block)
    • Triggering command: dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter McpServerSnapshot --logger console;verbosity=detailed -v m (dns block)
  • i1qvsblobprodcus353.vsblob.vsassets.io
    • Triggering command: dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter McpServerSnapshot --logger console;verbosity=detailed -v m (dns block)
  • imzvsblobprodcus368.vsblob.vsassets.io
    • Triggering command: dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter McpServerSnapshot --logger console;verbosity=detailed -v m (dns block)
  • jd4vsblobprodcus366.vsblob.vsassets.io
    • Triggering command: dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter McpServerSnapshot --logger console;verbosity=detailed -v m (dns block)
  • kgfvsblobprodcus314.vsblob.vsassets.io
    • Triggering command: dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter McpServerSnapshot --logger console;verbosity=detailed -v m (dns block)
  • kmuvsblobprodcus389.vsblob.vsassets.io
    • Triggering command: dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter McpServerSnapshot --logger console;verbosity=detailed -v m (dns block)
  • l49vsblobprodcus358.vsblob.vsassets.io
    • Triggering command: dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter McpServerSnapshot --logger console;verbosity=detailed -v m (dns block)
  • ljcvsblobprodcus317.vsblob.vsassets.io
    • Triggering command: dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter McpServerSnapshot --logger console;verbosity=detailed -v m (dns block)
  • ofvvsblobprodcus315.vsblob.vsassets.io
    • Triggering command: dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter McpServerSnapshot --logger console;verbosity=detailed -v m (dns block)
  • sc4vsblobprodcus331.vsblob.vsassets.io
    • Triggering command: dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter McpServerSnapshot --logger console;verbosity=detailed -v m (dns block)
  • ukkvsblobprodcus352.vsblob.vsassets.io
    • Triggering command: dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter McpServerSnapshot --logger console;verbosity=detailed -v m (dns block)
  • ytvvsblobprodcus310.vsblob.vsassets.io
    • Triggering command: dotnet test test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj --filter McpServerSnapshot --logger console;verbosity=detailed -v m (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Update MCP template readme to switch to VS IDE context Update MCP template readme to switch to VS IDE context Jul 9, 2025
@Copilot Copilot AI requested a review from timheuer July 9, 2025 18:45
Copilot finished work on behalf of timheuer July 9, 2025 18:45
@jeffhandley
Copy link
Member

@timheuer / @joelverhagen / @leslierichardson95 - I suggest we keep with a single README and have sections for both VS and VS Code, regardless of how the template is created. That could coach users to see how to test in both of the IDEs.

I personally tend to create new projects from the CLI and then open the project in one of the IDEs.

If you are onboard with having a single README with IDE sections, we can ask Copilot to revise this PR.

Copy link
Contributor Author

Copilot AI commented Jul 10, 2025

@timheuer / @joelverhagen / @leslierichardson95 - I suggest we keep with a single README and have sections for both VS and VS Code, regardless of how the template is created. That could coach users to...

I've updated the approach to use a single README with sections for both VS Code and Visual Studio as suggested. The template now provides guidance for both IDEs regardless of how it's created. Changes in commit a4ba77f.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • e7bvsblobprodcus348.vsblob.vsassets.io
    • Triggering command: /home/REDACTED/work/extensions/extensions/.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /p:TreatWarningsAsErrors=false /p:ContinuousIntegrationBuild=false /home/REDACTED/work/extensions/extensions/artifacts/toolset/restore.proj /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/extensions/extensions/artifacts/toolset/9.0.0-beta.25325.4.txt (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@Copilot Copilot AI requested a review from jeffhandley July 10, 2025 17:19
Copilot finished work on behalf of jeffhandley July 10, 2025 17:19
@Copilot Copilot AI requested a review from timheuer July 10, 2025 17:40
Copilot finished work on behalf of timheuer July 10, 2025 17:40
Copy link
Member

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README is now quite repetitive with the Visual Studio and VS Code portions almost identical. Restructure it to reduce repetition while highlighting the differences between the IDEs.

Copy link
Contributor Author

Copilot AI commented Jul 10, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • e7bvsblobprodcus348.vsblob.vsassets.io
    • Triggering command: /home/REDACTED/work/extensions/extensions/.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /p:TreatWarningsAsErrors=false /p:ContinuousIntegrationBuild=false /home/REDACTED/work/extensions/extensions/artifacts/toolset/restore.proj /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/extensions/extensions/artifacts/toolset/9.0.0-beta.25325.4.txt (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of timheuer July 10, 2025 17:45
Copy link
Contributor Author

Copilot AI commented Jul 10, 2025

The README is now quite repetitive with the Visual Studio and VS Code portions almost identical. Restructure it to reduce repetition while highlighting the differences between the IDEs.

Restructured the README to significantly reduce repetition by combining similar sections and highlighting key differences between IDEs. The new structure consolidates "Using the MCP Server" and "Developing locally" sections with clear subsections for each IDE, eliminating duplicated content while maintaining clarity about IDE-specific configurations. Changes in commit 387d9ab.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • e7bvsblobprodcus348.vsblob.vsassets.io
    • Triggering command: /home/REDACTED/work/extensions/extensions/.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /p:TreatWarningsAsErrors=false /p:ContinuousIntegrationBuild=false /home/REDACTED/work/extensions/extensions/artifacts/toolset/restore.proj /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/extensions/extensions/artifacts/toolset/9.0.0-beta.25325.4.txt (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@Copilot Copilot AI requested a review from jeffhandley July 10, 2025 17:50
Copilot finished work on behalf of jeffhandley July 10, 2025 17:50
@joelverhagen
Copy link
Member

@copilot - these changes need to be copied into the corresponding snapshot. Look at the original PR for the MCP template to see an example.

Copy link
Contributor Author

Copilot AI commented Jul 14, 2025

@copilot - these changes need to be copied into the corresponding snapshot. Look at the original PR for the MCP template to see an example.

Updated the corresponding snapshot to match the template source with the latest README changes in commit 5dd0f87.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • e7bvsblobprodcus348.vsblob.vsassets.io
    • Triggering command: /home/REDACTED/work/extensions/extensions/.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /p:TreatWarningsAsErrors=false /p:ContinuousIntegrationBuild=false /home/REDACTED/work/extensions/extensions/artifacts/toolset/restore.proj /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/extensions/extensions/artifacts/toolset/9.0.0-beta.25325.4.txt (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@Copilot Copilot AI requested a review from joelverhagen July 14, 2025 14:37
Copilot finished work on behalf of joelverhagen July 14, 2025 14:37
@jeffhandley jeffhandley marked this pull request as ready for review July 14, 2025 18:39
@jeffhandley jeffhandley requested a review from a team as a code owner July 14, 2025 18:39
@jeffhandley jeffhandley changed the title Update MCP template readme to switch to VS IDE context Update MCP server template readme to show both VS Code and Visual Studio notes Jul 14, 2025
@jeffhandley jeffhandley merged commit dfd77b9 into main Jul 15, 2025
6 checks passed
@jeffhandley jeffhandley deleted the copilot/fix-6590 branch July 15, 2025 06:16
jeffhandley added a commit to jeffhandley/extensions that referenced this pull request Jul 15, 2025
…dio notes (dotnet#6591)

* Initial plan

* Add VS IDE-specific README and update template configuration

Co-authored-by: timheuer <[email protected]>

* Update to single README with both VS Code and Visual Studio sections

Co-authored-by: jeffhandley <[email protected]>

* Fix Visual Studio MCP documentation URL

Co-authored-by: timheuer <[email protected]>

* Fix Visual Studio MCP JSON configuration format

Co-authored-by: timheuer <[email protected]>

* Restructure README to reduce repetition between VS Code and Visual Studio sections

Co-authored-by: jeffhandley <[email protected]>

* Eliminate repetitive JSON configuration in README by consolidating server definitions

Co-authored-by: jeffhandley <[email protected]>

* Revise the mcp server template README

* Update MCP template README paths and sync snapshot with source template

Co-authored-by: joelverhagen <[email protected]>

* Update mcpserver project template baseline

* Bump MEAI.Templates package to preview.3.

* Add feedback survey to mcpserver project template README

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: timheuer <[email protected]>
Co-authored-by: jeffhandley <[email protected]>
Co-authored-by: Jeff Handley <[email protected]>
Co-authored-by: joelverhagen <[email protected]>
jeffhandley added a commit that referenced this pull request Jul 15, 2025
…dio notes (#6591)

* Initial plan

* Add VS IDE-specific README and update template configuration

Co-authored-by: timheuer <[email protected]>

* Update to single README with both VS Code and Visual Studio sections

Co-authored-by: jeffhandley <[email protected]>

* Fix Visual Studio MCP documentation URL

Co-authored-by: timheuer <[email protected]>

* Fix Visual Studio MCP JSON configuration format

Co-authored-by: timheuer <[email protected]>

* Restructure README to reduce repetition between VS Code and Visual Studio sections

Co-authored-by: jeffhandley <[email protected]>

* Eliminate repetitive JSON configuration in README by consolidating server definitions

Co-authored-by: jeffhandley <[email protected]>

* Revise the mcp server template README

* Update MCP template README paths and sync snapshot with source template

Co-authored-by: joelverhagen <[email protected]>

* Update mcpserver project template baseline

* Bump MEAI.Templates package to preview.3.

* Add feedback survey to mcpserver project template README

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: timheuer <[email protected]>
Co-authored-by: jeffhandley <[email protected]>
Co-authored-by: Jeff Handley <[email protected]>
Co-authored-by: joelverhagen <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Aug 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update MCP template readme to switch to VS IDE context
4 participants