Skip to content

Commit

Permalink
Merge pull request MicrosoftDocs#4667 from MicrosoftDocs/master637149…
Browse files Browse the repository at this point in the history
…026260063677

For protected CLA branch, push strategy should use PR and merge to target branch method to work around git push error
  • Loading branch information
ghogen authored Jan 18, 2020
2 parents 6125f81 + e58e2b6 commit a6619f3
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 38 deletions.
25 changes: 13 additions & 12 deletions docs/extensibility/how-to-roundtrip-VSIXs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ manager: "justinclareburt"
ms.workload:
- "willbrown"
---
# How to: Make extensions compatible with Visual Studio 2017 and Visual Studio 2015
# How to: Make extensions compatible with Visual Studio 2019/2017 and Visual Studio 2015

This document explains how to make extensibility projects round-trip between Visual Studio 2015 and Visual Studio 2017. After completing this upgrade, a project will be able to open, build, install, and run in both Visual Studio 2015 and Visual Studio 2017. As a reference, some extensions that can round-trip between Visual Studio 2015 and Visual Studio 2017 can be found in the [VS SDK extensibility samples](https://github.com/Microsoft/VSSDK-Extensibility-Samples).
This document explains how to make extensibility projects round-trip between Visual Studio 2015 and Visual Studio 2019 or Visual Studio 2017. After completing this upgrade, a project will be able to open, build, install, and run in both Visual Studio 2015 and Visual Studio 2019 or 2017. As a reference, some extensions that can round-trip between Visual Studio 2015 and Visual Studio 2019 or 2017 can be found in the [VS SDK extensibility samples](https://github.com/Microsoft/VSSDK-Extensibility-Samples).

If you only intend to build in Visual Studio 2017, but want the output VSIX to run in both Visual Studio 2015 and Visual Studio 2017, then refer to the [Extension migration document](how-to-migrate-extensibility-projects-to-visual-studio-2017.md).
If you only intend to build in Visual Studio 2019/2017, but want the output VSIX to run in both Visual Studio 2015 and Visual Studio 2019/2017, then refer to the [Extension migration document](how-to-migrate-extensibility-projects-to-visual-studio-2017.md).

> [!NOTE]
> Due to changes in Visual Studio between versions, some things that worked in one version don't work in another. Ensure that the features you are trying to access are available in both versions or the extension will have unexpected results.
Expand All @@ -37,11 +37,11 @@ Here is an outline of the steps you'll complete in this document to round-trip a
This document assumes that you have the following installed on your machine:

* Visual Studio 2015 with the VS SDK installed
* Visual Studio 2017 with the Extensibility workload installed
* Visual Studio 2019 or 2017 with the Extensibility workload installed

## Recommended approach

It is highly recommended to start this upgrade with Visual Studio 2015, instead of Visual Studio 2017. The main benefit of developing in Visual Studio 2015 is to ensure that you do not reference assemblies that are not available in Visual Studio 2015. If you do development in Visual Studio 2017, there is a risk that you might introduce a dependency on an assembly that only exists in Visual Studio 2017.
It is highly recommended to start this upgrade with Visual Studio 2015, instead of Visual Studio 2019 or 2017. The main benefit of developing in Visual Studio 2015 is to ensure that you do not reference assemblies that are not available in Visual Studio 2015. If you do development in Visual Studio 2019 or 2017, there is a risk that you might introduce a dependency on an assembly that only exists in Visual Studio 2019 or 2017.

## Ensure there is no reference to project.json

Expand All @@ -61,12 +61,12 @@ If your project contains a *project.json* file:

We need to be sure to add build tools that will allow us to build and debug appropriately. Microsoft has created an assembly for this called Microsoft.VisualStudio.Sdk.BuildTasks.

To build and deploy a VSIXv3 in both Visual Studio 2015 and 2017, you will require the following NuGet packages:
To build and deploy a VSIXv3 in both Visual Studio 2015 and 2019/2017, you will require the following NuGet packages:

Version | Built Tools
--- | ---
Visual Studio 2015 | Microsoft.VisualStudio.Sdk.BuildTasks.14.0
Visual Studio 2017 | Microsoft.VSSDK.BuildTool
Visual Studio 2019 or 2017 | Microsoft.VSSDK.BuildTool

To do so:

Expand Down Expand Up @@ -106,7 +106,7 @@ To do this manually:
* Save and close the file.

> [!NOTE]
> You may need to manually edit the Prerequisite version to ensure it is compatible with all versions of Visual Studio 2017. This is because the designer will insert the minimum version as your current version of Visual Studio (for example, 15.0.26208.0). However, since other users may have an earlier version, you will want to manually edit this to 15.0.
> You may need to manually edit the Prerequisite version to ensure it is compatible with all versions of Visual Studio 2019 or 2017. This is because the designer will insert the minimum version as your current version of Visual Studio (for example, 15.0.26208.0). However, since other users may have an earlier version, you will want to manually edit this to 15.0.
At this point, your manifest file should look something like this:

Expand Down Expand Up @@ -189,22 +189,23 @@ For example:
<Error Condition="'$(VisualStudioVersion)' == '14.0' And Exists('packages\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.14.0…" />
```

* Save the csproj file and close it.
* Save the csproj file and close it.
* Note that if you are using more than one project in the solution, set this project as Startup Project by using "Set as Startup Project" on the project context menu). This ensures that Visual Studio reopens this project after you unload it.

## Test the extension installs in Visual Studio 2015 and Visual Studio 2017
## Test the extension installs in Visual Studio 2015 and Visual Studio 2019 or 2017

At this point, your project should be ready to build a VSIXv3 that can install on both Visual Studio 2015 and Visual Studio 2017.

* Open your project in Visual Studio 2015.
* Build your project and confirm in the output that a VSIX builds correctly.
* Navigate to your project directory.
* Open the *\bin\Debug* folder.
* Double-click on the VSIX file and install your extension on Visual Studio 2015 and Visual Studio 2017.
* Double-click on the VSIX file and install your extension on Visual Studio 2015 and Visual Studio 2019/2017.
* Make sure that you can see the extension in **Tools** > **Extensions and Updates** in the **Installed** section.
* Attempt to run/use the extension to check that it works.

![Find a VSIX](media/finding-a-VSIX-example.png)

> [!NOTE]
> If your project hangs with the message **opening the file**, force shut down Visual Studio, navigate to your project directory, show hidden folders, and delete the *.vs* folder.
2 changes: 1 addition & 1 deletion docs/extensibility/internals/solution-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Solution configurations store solution-level properties. They direct the behavio
The standard Visual Studio toolbar contains a Start button and a solution configuration drop-down to the right of the Start button. This list allows users to choose the configuration to be started when F5 is pressed, create their own solution configurations, or edit an existing configuration.

> [!NOTE]
> There are no extensibility interfaces to create or edit the solution configurations. You must use `DTE.SolutionBuilder`. However, there are extensibility APIs for managing the solution build. For more information, see <xref:Microsoft.VisualStudio.Shell.Interop.IVsSolutionBuildManager2>.
> There are no extensibility interfaces to create or edit the solution configurations. You must use `DTE.SolutionBuild`. However, there are extensibility APIs for managing the solution build. For more information, see <xref:Microsoft.VisualStudio.Shell.Interop.IVsSolutionBuildManager2>.
Here is how you can implement the solution configurations supported by your project type:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ms.workload:
If you've never written a Visual Studio extension before, you probably have some questions. We've listed some of the most common ones here. If you don't see the information you're looking for, use the feedback buttons (**Was this page helpful?** at the bottom of the screen) to ask for what you want.

> [!NOTE]
> This article applies to Visual Studio on Windows. For Visual Studio for Mac, see [Extending Visual Studio for Mac](/visualstudio/mac/extending-visual-studio-mac).
> This article applies to Visual Studio on Windows. For Visual Studio for Mac, see [Extending Visual Studio for Mac](/visualstudio/mac/extending-visual-studio-mac). For Visual Studio Code, see [Visual Studio Code Extension API](https://code.visualstudio.com/api).
## What software do I need to develop Visual Studio extensions?

Expand Down Expand Up @@ -90,3 +90,4 @@ In practice, we have found that the features most people want to extend are comm
## See also

- [Extending Visual Studio for Mac](/visualstudio/mac/extending-visual-studio-mac)
- [Extending Visual Studio Code](https://code.visualstudio.com/api)
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ To follow this walkthrough, you must install the Visual Studio SDK. For more inf

::: moniker range=">=vs-2019"

2. Add the following assembly reference to the project:
2. Add the following assembly references to the project:

- Microsoft.VisualStudio.Shell.Framework
- Microsoft.VisualStudio.Shell.Immutable.10.0

3. In the *DTETestProvider.cs* file, add the following `using` directives:
Expand Down Expand Up @@ -86,4 +87,4 @@ To follow this walkthrough, you must install the Visual Studio SDK. For more inf
## See also

- [Language service and editor extension points](../extensibility/language-service-and-editor-extension-points.md)
- [Launch Visual Studio using DTE](launch-visual-studio-dte.md)
- [Launch Visual Studio using DTE](launch-visual-studio-dte.md)
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ You can implement language-based statement completion by defining the identifier

Microsoft.VisualStudio.OLE.Interop

Microsoft.VisualStudio.Shell.14.0
Microsoft.VisualStudio.Shell.15.0

Microsoft.VisualStudio.Shell.Immutable.10.0

Expand Down
8 changes: 3 additions & 5 deletions docs/ide/compiling-and-building-in-visual-studio.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ ms.workload:
---
# Compile and build in Visual Studio

When you build source code, the build engine creates assemblies and executable applications. In general, the build process is very similar across many different project types such as Windows, ASP.NET, mobile apps, and others. The build process is also similar across programming languages such as C#, Visual Basic, C++, and F#.

By building your code often, you can quickly identify compile-time errors, such as incorrect syntax, misspelled keywords, and type mismatches. You can also detect and correct run-time errors, such as logic errors and semantic errors, by building and running debug versions of the code.

A successful build validates that the application's source code contains correct syntax and that all static references to libraries, assemblies, and other components can resolve. An application executable is produced that can be tested for proper functioning in both a [debugging environment](../debugger/index.yml) and through a variety of manual and automated tests to [validate code quality](../test/improve-code-quality.md). Once the application has been fully tested, you can compile a release version to deploy to your customers. For an introduction to this process, see [Walkthrough: Building an application](../ide/walkthrough-building-an-application.md).
For a first introduction to building within the IDE, see [Walkthrough: Building an application](walkthrough-building-an-application.md).

You can use any of the following methods to build an application: the Visual Studio IDE, the MSBuild command-line tools, and Azure Pipelines:

| Build Method | Benefits |
| --- |--- | --- |
| IDE |- Create builds immediately and test them in a debugger.<br />- Run multi-processor builds for C++ and C# projects.<br />- Customize different aspects of the build system. |
| CMake | - Build projects using the CMake tool<br />- Use the same build system across Linux and Windows platforms. |
| MSBuild command line| - Build projects without installing Visual Studio.<br />- Run multi-processor builds for all project types.<br />- Customize most areas of the build system.|
| Azure Pipelines | - Automate your build process as part of a continuous integration/continuous delivery pipeline.<br />- Apply automated tests with every build.<br />- Employ virtually unlimited cloud-based resources for build processes.<br />- Modify the build workflow and create build activities to perform deeply customized tasks.|

Expand Down Expand Up @@ -54,3 +51,4 @@ From there, you can explore a variety of other tasks:

- [Building (compiling) website projects](https://msdn.microsoft.com/Library/a9cbb88c-8fff-4c67-848b-98fbfd823193)
- [Compile and build (Visual Studio for Mac)](/visualstudio/mac/compiling-and-building)
- [CMake projects in Visual Studio](/cpp/build/cmake-projects-in-visual-studio)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a6619f3

Please sign in to comment.