Update and reorganize extension documentation (#605)
This commit is contained in:
Родитель
29580acdc5
Коммит
c2b38597b9
|
@ -1,14 +1,20 @@
|
|||
## Extensibility
|
||||
# Extensibility <!-- omit in toc -->
|
||||
|
||||
The Upgrade Assistant has an extension system that make it easy for users to customize many of the upgrade steps (or add new upgrade steps) without having to rebuild the tool. Extensibility points include:
|
||||
The Upgrade Assistant has an extension system that make it easy for users to customize many of the upgrade steps (or add new upgrade steps) without having to rebuild the tool. There are both code and non-code ways of extending the tool.
|
||||
|
||||
1. Source updates (via Roslyn analyzers and code fix providers)
|
||||
2. NuGet package updates (by explicitly mapping certain packages to their replacements)
|
||||
3. Custom template files (files that should be added to upgraded projects)
|
||||
4. Config file updates (components that update the project based on the contents of app.config and web.config)
|
||||
5. Custom upgrade steps (allowing complete freedom to add whatever behaviors are necessary to the upgrade process)
|
||||
- [Create Extension](#create-extension)
|
||||
- [Extension Service Providers](#extension-service-providers)
|
||||
- [Registering Services Configuration](#registering-services-configuration)
|
||||
- [Accessing extension files](#accessing-extension-files)
|
||||
- [Mapping custom configuration to files](#mapping-custom-configuration-to-files)
|
||||
- [Steps](#steps)
|
||||
- [Analyzers/code fixers](#analyzerscode-fixers)
|
||||
- [Updaters](#updaters)
|
||||
- [Dependency analyzers](#dependency-analyzers)
|
||||
- [Templates](#templates)
|
||||
|
||||
To create an Upgrade Assistant extension, you will need to start with a manifest file called "ExtensionManifest.json". The manifest file contains pointers to the paths (relative to the manifest file) where the different extension items can be found. The extension manifest is required, but all of its elements are optional and it is only necessary to include the ones that are useful for the extension the manifest is describing. An outline of possible extension manifest elements is:
|
||||
## Create Extension
|
||||
To create an Upgrade Assistant extension, you will need to start with a manifest file called `ExtensionManifest.json`. The manifest file contains pointers to the paths (relative to the manifest file) where the different extension items can be found. The extension manifest is required, but all of its elements are optional and it is only necessary to include the ones that are useful for the extension the manifest is describing. An outline of possible extension manifest elements is:
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -17,6 +23,7 @@ To create an Upgrade Assistant extension, you will need to start with a manifest
|
|||
"PackageUpdater": {
|
||||
"PackageMapPath": "PackageMaps"
|
||||
},
|
||||
|
||||
"TemplateInserter": {
|
||||
"TemplatePath": "Templates"
|
||||
},
|
||||
|
@ -27,19 +34,41 @@ To create an Upgrade Assistant extension, you will need to start with a manifest
|
|||
}
|
||||
```
|
||||
|
||||
To use an extension at runtime, either use the `--extension` argument to point to the extension's manifest file (or directory where the manifest file is located) or set the environment variable "UpgradeAssistantExtensionPaths" to a semicolon-delimited list of paths to probe for extensions.
|
||||
An extension can be available as:
|
||||
|
||||
### Custom upgrade steps, source updaters, and config updaters
|
||||
- Just the `ExtensionManifest.json`
|
||||
- A directory containing `ExtensionManifest.json`
|
||||
- A zip file containing a `ExtensionManifest.json`
|
||||
|
||||
The ExtensionServiceProviders element of the extension manifest contains an array of assemblies that the Upgrade Assistant should look in for implementations of `Microsoft.DotNet.UpgradeAssistant.Extensions.IExtensionServiceProvider`. At runtime, Upgrade Assistant will load any assemblies listed in the ExtensionServiceProviders array (paths are relative to the extension manifest's location) and instantiate an public implementations of `IExtensionServiceProvider` found in those assemblies. The `IExtensionServiceProvider` instances will then be used to register services in Upgrade Assistant's dependency injection container. Common services that an extension might register include:
|
||||
To use an extension at runtime, you may either:
|
||||
|
||||
1. Custom upgrade steps (inheriting from `UpgradeStep`). Any upgrade steps registered by an `IExtensionServiceProvider` in an assembly listed in the ExtensionServiceProviders array will be included in the upgrade steps the Upgrade Assistant executes. In this way, extenders can add their own custom steps to the upgrade pipeline.
|
||||
2. Roslyn analyzers and code fix providers. Upgrade Assistant's source updater step looks in the dependency injection container for any analyzers with associated code fix providers and will include them in the sub-steps to the source updater step. So, by registering their own Roslyn analyzers and code fix providers, extenders can customize the source update steps used by Upgrade Assistant.
|
||||
3. `IConfigUpdater` implementations. Upgrade Assistant's config updater step uses any registered `IConfigUpdater` services to make project updates based on config files (app.config, web.config). Therefore, by registering their own `IConfigUpdater` implementations, extenders can customize how config-related upgrades are made by Upgrade Assistant.
|
||||
4. `IPackageReferencesAnalyzer` implementations. For more information on how the package updater step works, see the next section of this document. If providing custom package mapping configuration is insufficient, however, extenders can register their own implementations of `IPackageReferenceAnalzyer` to more completely customize how NuGet package references are updated.
|
||||
5. Any other services that might be needed by Upgrade Assistant steps (either the default steps or those added by extensions). Extenders can register services that their own upgrade steps will need or services that will be used by other upgrade steps and Upgrade Assistant will make sure any services registered in an `IExtensionServiceProvider` implementation will be made available at runtime.
|
||||
- Use the `--extension` argument on the commandline
|
||||
- Set the environment variable `UpgradeAssistantExtensionPaths` to a semicolon-delimited list of paths to probe for extensions.
|
||||
|
||||
### Registering Custom Configuration
|
||||
The `ExtensionServiceProviders` element of the extension manifest contains an array of assemblies that the Upgrade Assistant should look in for implementations of `Microsoft.DotNet.UpgradeAssistant.Extensions.IExtensionServiceProvider`. At runtime, Upgrade Assistant will load any assemblies listed in the ExtensionServiceProviders array (paths are relative to the extension manifest's location) and instantiate an public implementations of `IExtensionServiceProvider` found in those assemblies. The `IExtensionServiceProvider` instances will then be used to register services in Upgrade Assistant's dependency injection container. Common services that an extension might register include will be detailed below.
|
||||
|
||||
When building a project, you can reference the Upgrade Assistants abstractions via
|
||||
|
||||
```
|
||||
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Abstractions" Version="*" />
|
||||
```
|
||||
|
||||
This will also augment the build process so that the project will publish on builds. That publish directory is what should be used when adding an extension to Upgrade Assistant.
|
||||
|
||||
## Extension Service Providers
|
||||
Any other services that might be needed by Upgrade Assistant steps (either the default steps or those added by extensions) can be registered. Extensions can register services that their own upgrade steps will need or services that will be used by other upgrade steps and Upgrade Assistant will make sure any services registered in an `IExtensionServiceProvider` implementation will be made available at runtime:
|
||||
|
||||
```csharp
|
||||
public class TestExtension : IExtensionServiceProvider
|
||||
{
|
||||
public void AddServices(IExtensionServiceCollection services)
|
||||
{
|
||||
services.Services.AddSingleton<SomeService>();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Registering Services Configuration
|
||||
|
||||
An extension can register configuration options that can then be added to by other extensions. This can be done similar to the following:
|
||||
|
||||
|
@ -155,17 +184,51 @@ namespace Microsoft.DotNet.UpgradeAssistant
|
|||
|
||||
There is no way to access a single option, but only a collection of all the options from all the extensions. As stated above, if `SomeOtherOption : IFileOption`, then it would have access to a scoped file provider for that extension.
|
||||
|
||||
### Custom NuGet package mapping configuration
|
||||
## Steps
|
||||
Custom upgrade steps (inheriting from `UpgradeStep`) can be added to the process. Any upgrade steps registered by an `IExtensionServiceProvider` in an assembly listed in the ExtensionServiceProviders array will be included in the upgrade steps the Upgrade Assistant executes. In this way, extenders can add their own custom steps to the upgrade pipeline.
|
||||
|
||||
The Package updater step of the Upgrade Assistant attempts to update NuGet package references to versions that will work with .NET 5.0. There are a few rules the upgrade step uses to make those updates:
|
||||
## Analyzers/code fixers
|
||||
Roslyn analyzers and code fix providers. Upgrade Assistant's source updater step looks in the dependency injection container for any analyzers with associated code fix providers and will include them in the sub-steps to the source updater step. So, by registering their own Roslyn analyzers and code fix providers, extenders can customize the source update steps used by Upgrade Assistant.
|
||||
|
||||
1. It removes packages that other referenced packages depend on (transitive dependencies). [Try-convert](https://github.com/dotnet/try-convert) moves all packages from packages.config to PackageReference references, but PackageReference-style references only need to include top level packages. The NuGet package updater step removes package references that appear to be transitive so that only top-level dependencies are included in the csproj.
|
||||
## Updaters
|
||||
Various services may request an implementation of `IUpdater<TUpdater>` which provides a way to update an object of type `TUpdater`. An example is a `IUpdater<ConfigFile>` that will provide updates for configuration files (`app.config`, `web.config`).
|
||||
|
||||
This generic parameter can be extended by any other service to provide a custom way of defining an updater. An example of this is for configuration updaters:
|
||||
|
||||
```csharp
|
||||
public class UnsupportedSectionConfigUpdater : IUpdater<ConfigFile>
|
||||
{
|
||||
public string Id => typeof(UnsupportedSectionConfigUpdater).FullName!;
|
||||
|
||||
public string Title => "Title of updater";
|
||||
|
||||
public string Description => "Description of updater";
|
||||
|
||||
public BuildBreakRisk Risk => BuildBreakRisk.Low;
|
||||
|
||||
public Task<IUpdaterResult> ApplyAsync(IUpgradeContext context, ImmutableArray<ConfigFile> inputs, CancellationToken token)
|
||||
{
|
||||
...
|
||||
}
|
||||
|
||||
public Task<IUpdaterResult> IsApplicableAsync(IUpgradeContext context, ImmutableArray<ConfigFile> inputs, CancellationToken token)
|
||||
{
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Dependency analyzers
|
||||
Dependency analysis can be extended in multiple ways, including code and simple configuration.
|
||||
|
||||
Some built-in dependency analyzers perform the following actions:
|
||||
1. Removes packages that other referenced packages depend on (transitive dependencies). PackageReference-style references only need to include top level packages so this analyzer removes package references that appear to be transitive so that only top-level dependencies are included in the csproj.
|
||||
2. If a referenced NuGet package isn't compatible with the target .NET version but a newer version of the NuGet package is, the package updater step automatically updates the version to the first major version that will work.
|
||||
3. The package updater step will replace NuGet references based on specific replacement packages listed in configuration files. For example, there's a config setting that specifically indicates System.Threading.Tasks.Dataflow should replace TPL.Dataflow.
|
||||
3. If a `PackageMap` is defined, NuGet references will be replaced based on specific packages listed in configuration files. For example, there's a config setting that specifically indicates `System.Threading.Tasks.Dataflow` should replace `TPL.Dataflow`.
|
||||
|
||||
This third type of NuGet package replacement can be customized by users. An extension's PackageMapPath path can contain json files that map old packages to new ones. In each set, there are old (.NET Framework) package references which should be removed and new (.NET 5.0/Standard) package references which should be added. If a project being upgraded by the tool contains references to any of the 'NetFrameworkPackages' references from a set, those references will be removed and all of the 'NetCorePackages' references from that same set will be added. If old (NetFrameworkPackage) package references specify a version, then the references will only be replaced if the referenced version is less than or equal to that version.
|
||||
Package maps are one of the non-code ways to extend the dependency analysis step. An extension's `PackageMapPath` path can contain json files that map old packages to new ones. In each set, there are old (.NET Framework) package references which should be removed and new (.NET 5.0/Standard) package references which should be added. If a project being upgraded by the tool contains references to any of the 'NetFrameworkPackages' references from a set, those references will be removed and all of the 'NetCorePackages' references from that same set will be added. If old (NetFrameworkPackage) package references specify a version, then the references will only be replaced if the referenced version is less than or equal to that version.
|
||||
|
||||
By adding package map files, users can supply customized rules about which NuGet package references should be removed from upgraded projects and which NuGet package references (if any) should replace them.
|
||||
By adding package map files, users can supply customized rules about which dependencies (ie NuGet package references, assembly references, etc) should be removed from upgraded projects and which dependency (if any) should replace them.
|
||||
|
||||
An example package map files looks like this:
|
||||
|
||||
|
@ -189,15 +252,14 @@ An example package map files looks like this:
|
|||
]
|
||||
```
|
||||
|
||||
### Custom template files
|
||||
|
||||
## Templates
|
||||
The template inserter step of the Upgrade Assistant adds necessary template files to the project being upgraded. For example, when upgrading a web app, this step will add Program.cs and Startup.cs files to the project to enable ASP.NET Core startup paths. The TemplatePath property of the extension manifest points to a directory that will be probed for TemplateConfig.json files. The files define files that should be added to upgraded projects.
|
||||
|
||||
A template config file is a json file containing the following properties:
|
||||
|
||||
1. An array of template items which lists the template files to be inserted. Each of these template items will have a path (relative to the config file) where the template file can be found, and what MSBuild 'type' of item it is (compile, content, etc.). The folder structure of template files will be preserved, so the inserted file's location relative to the project root will be the same as the template file's location relative to the config file. Each template item can also optionally include a list of keywords which are present in the template file. This list is used by the Upgrade Assistant to determine whether the template file (or an acceptable equivalent) is already present in the project. If a file with the same name as the template file is already present in the project, the template inserter step will look to see whether the already present file contains all of the listed keywords. If it does, then the file is left unchanged. If any keywords are missing, then the file is assumed to not be from the template and it will be renamed (with the pattern {filename}.old.{ext}) and the template file will be inserted instead.
|
||||
1. A dictionary of replacements. Each item in this dictionary is a key/value pair of tokens that should be replaced in the template file to customize it for the particular project it's being inserted into. MSBuild properties can be used as values for these replacements. For example, many template configurations replace 'WebApplication1' (or some similar string) with '$(RootNamespace)' so that the namespace in template files is replaced with the root namespace of the project being upgraded.
|
||||
1. A boolean called UpdateWebAppsOnly that indicates whether these templates only apply to web app scenarios. Many templates that users want inserted are only needed for web apps and not for class libraries or other project types. If this boolean is true, then the template updater step will try to determine the type of project being upgraded and only include the template files if the project is a web app.
|
||||
1. There are various fields that can be used to identify the applicable language, project types, and output types so that the templates will only be applied where it matters.
|
||||
|
||||
If multiple template configurations attempt to insert files with the same path, the template configuration listed last (or in the last added extension) will override earlier ones and its template file will be the one inserted.
|
||||
|
||||
|
@ -236,6 +298,12 @@ An example TemplateConfig.json file looks like this:
|
|||
"Keywords": []
|
||||
}
|
||||
],
|
||||
"UpdateWebAppsOnly": true
|
||||
"TemplateOutputType": [
|
||||
"Exe"
|
||||
],
|
||||
"TemplateLanguage": "CSharp",
|
||||
"TemplateAppliesTo": [
|
||||
"AspNetCore"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
|
|
@ -46,4 +46,8 @@
|
|||
<Version>5.0.0</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="build\*" Pack="true" PackagePath="" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,2 @@
|
|||
<Project>
|
||||
</Project>
|
|
@ -0,0 +1,204 @@
|
|||
<Project>
|
||||
|
||||
<!--
|
||||
This is a list of all the host-supplied files that should not be contained within an extension.
|
||||
|
||||
To create a new list, go to the output of the CLI and run the following sommand in PowerShell:
|
||||
|
||||
Get-ChildItem *.dll -Recurse -Exclude extensions `
|
||||
|% { $_.FullName.Replace("$pwd\", "") } `
|
||||
|% { "<_UpgradeExtensionExclude Include=`"$_`" />" } `
|
||||
| Set-Clipboard
|
||||
|
||||
An updated list will now be on the clipboard and can be pasted below.
|
||||
-->
|
||||
<ItemGroup>
|
||||
<_UpgradeExtensionExclude Include="cs\Microsoft.CodeAnalysis.CSharp.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="cs\Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="cs\Microsoft.CodeAnalysis.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="cs\Microsoft.CodeAnalysis.VisualBasic.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="cs\Microsoft.CodeAnalysis.VisualBasic.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="cs\Microsoft.CodeAnalysis.Workspaces.MSBuild.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="cs\Microsoft.CodeAnalysis.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="cs\System.CommandLine.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="de\Microsoft.CodeAnalysis.CSharp.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="de\Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="de\Microsoft.CodeAnalysis.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="de\Microsoft.CodeAnalysis.VisualBasic.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="de\Microsoft.CodeAnalysis.VisualBasic.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="de\Microsoft.CodeAnalysis.Workspaces.MSBuild.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="de\Microsoft.CodeAnalysis.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="de\System.CommandLine.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="es\Microsoft.CodeAnalysis.CSharp.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="es\Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="es\Microsoft.CodeAnalysis.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="es\Microsoft.CodeAnalysis.VisualBasic.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="es\Microsoft.CodeAnalysis.VisualBasic.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="es\Microsoft.CodeAnalysis.Workspaces.MSBuild.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="es\Microsoft.CodeAnalysis.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="es\System.CommandLine.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="fr\Microsoft.CodeAnalysis.CSharp.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="fr\Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="fr\Microsoft.CodeAnalysis.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="fr\Microsoft.CodeAnalysis.VisualBasic.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="fr\Microsoft.CodeAnalysis.VisualBasic.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="fr\Microsoft.CodeAnalysis.Workspaces.MSBuild.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="fr\Microsoft.CodeAnalysis.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="fr\System.CommandLine.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="it\Microsoft.CodeAnalysis.CSharp.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="it\Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="it\Microsoft.CodeAnalysis.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="it\Microsoft.CodeAnalysis.VisualBasic.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="it\Microsoft.CodeAnalysis.VisualBasic.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="it\Microsoft.CodeAnalysis.Workspaces.MSBuild.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="it\Microsoft.CodeAnalysis.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="it\System.CommandLine.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ja\Microsoft.CodeAnalysis.CSharp.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ja\Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ja\Microsoft.CodeAnalysis.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ja\Microsoft.CodeAnalysis.VisualBasic.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ja\Microsoft.CodeAnalysis.VisualBasic.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ja\Microsoft.CodeAnalysis.Workspaces.MSBuild.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ja\Microsoft.CodeAnalysis.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ja\System.CommandLine.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ko\Microsoft.CodeAnalysis.CSharp.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ko\Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ko\Microsoft.CodeAnalysis.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ko\Microsoft.CodeAnalysis.VisualBasic.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ko\Microsoft.CodeAnalysis.VisualBasic.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ko\Microsoft.CodeAnalysis.Workspaces.MSBuild.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ko\Microsoft.CodeAnalysis.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ko\System.CommandLine.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pl\Microsoft.CodeAnalysis.CSharp.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pl\Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pl\Microsoft.CodeAnalysis.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pl\Microsoft.CodeAnalysis.VisualBasic.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pl\Microsoft.CodeAnalysis.VisualBasic.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pl\Microsoft.CodeAnalysis.Workspaces.MSBuild.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pl\Microsoft.CodeAnalysis.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pl\System.CommandLine.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pt-BR\Microsoft.CodeAnalysis.CSharp.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pt-BR\Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pt-BR\Microsoft.CodeAnalysis.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pt-BR\Microsoft.CodeAnalysis.VisualBasic.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pt-BR\Microsoft.CodeAnalysis.VisualBasic.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pt-BR\Microsoft.CodeAnalysis.Workspaces.MSBuild.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pt-BR\Microsoft.CodeAnalysis.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="pt-BR\System.CommandLine.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ru\Microsoft.CodeAnalysis.CSharp.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ru\Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ru\Microsoft.CodeAnalysis.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ru\Microsoft.CodeAnalysis.VisualBasic.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ru\Microsoft.CodeAnalysis.VisualBasic.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ru\Microsoft.CodeAnalysis.Workspaces.MSBuild.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ru\Microsoft.CodeAnalysis.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="ru\System.CommandLine.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="runtimes\win\lib\netcoreapp2.0\System.Diagnostics.EventLog.dll" />
|
||||
<_UpgradeExtensionExclude Include="tr\Microsoft.CodeAnalysis.CSharp.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="tr\Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="tr\Microsoft.CodeAnalysis.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="tr\Microsoft.CodeAnalysis.VisualBasic.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="tr\Microsoft.CodeAnalysis.VisualBasic.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="tr\Microsoft.CodeAnalysis.Workspaces.MSBuild.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="tr\Microsoft.CodeAnalysis.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="tr\System.CommandLine.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hans\Microsoft.CodeAnalysis.CSharp.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hans\Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hans\Microsoft.CodeAnalysis.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hans\Microsoft.CodeAnalysis.VisualBasic.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hans\Microsoft.CodeAnalysis.VisualBasic.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hans\Microsoft.CodeAnalysis.Workspaces.MSBuild.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hans\Microsoft.CodeAnalysis.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hans\System.CommandLine.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hant\Microsoft.CodeAnalysis.CSharp.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hant\Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hant\Microsoft.CodeAnalysis.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hant\Microsoft.CodeAnalysis.VisualBasic.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hant\Microsoft.CodeAnalysis.VisualBasic.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hant\Microsoft.CodeAnalysis.Workspaces.MSBuild.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hant\Microsoft.CodeAnalysis.Workspaces.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="zh-Hant\System.CommandLine.resources.dll" />
|
||||
<_UpgradeExtensionExclude Include="Autofac.dll" />
|
||||
<_UpgradeExtensionExclude Include="Autofac.Extensions.DependencyInjection.dll" />
|
||||
<_UpgradeExtensionExclude Include="AutoMapper.dll" />
|
||||
<_UpgradeExtensionExclude Include="Humanizer.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Bcl.AsyncInterfaces.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Bcl.HashCode.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Build.Locator.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.CodeAnalysis.CSharp.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.CodeAnalysis.CSharp.Workspaces.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.CodeAnalysis.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.CodeAnalysis.VisualBasic.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.CodeAnalysis.Workspaces.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.CodeAnalysis.Workspaces.MSBuild.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.DotNet.UpgradeAssistant.Abstractions.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.DotNet.UpgradeAssistant.Cli.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.DotNet.UpgradeAssistant.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.DotNet.UpgradeAssistant.Extensions.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.DotNet.UpgradeAssistant.MSBuild.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Configuration.Abstractions.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Configuration.Binder.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Configuration.CommandLine.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Configuration.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Configuration.EnvironmentVariables.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Configuration.FileExtensions.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Configuration.Json.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Configuration.UserSecrets.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.DependencyInjection.Abstractions.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.DependencyInjection.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.FileProviders.Abstractions.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.FileProviders.Physical.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.FileSystemGlobbing.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Hosting.Abstractions.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Hosting.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Logging.Abstractions.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Logging.Configuration.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Logging.Console.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Logging.Debug.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Logging.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Logging.EventLog.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Logging.EventSource.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Options.ConfigurationExtensions.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Options.DataAnnotations.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Options.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.Extensions.Primitives.dll" />
|
||||
<_UpgradeExtensionExclude Include="Microsoft.VisualStudio.Setup.Configuration.Interop.dll" />
|
||||
<_UpgradeExtensionExclude Include="Serilog.dll" />
|
||||
<_UpgradeExtensionExclude Include="Serilog.Extensions.Hosting.dll" />
|
||||
<_UpgradeExtensionExclude Include="Serilog.Extensions.Logging.dll" />
|
||||
<_UpgradeExtensionExclude Include="Serilog.Sinks.Console.dll" />
|
||||
<_UpgradeExtensionExclude Include="Serilog.Sinks.File.dll" />
|
||||
<_UpgradeExtensionExclude Include="System.CommandLine.dll" />
|
||||
<_UpgradeExtensionExclude Include="System.Composition.AttributedModel.dll" />
|
||||
<_UpgradeExtensionExclude Include="System.Composition.Convention.dll" />
|
||||
<_UpgradeExtensionExclude Include="System.Composition.Hosting.dll" />
|
||||
<_UpgradeExtensionExclude Include="System.Composition.Runtime.dll" />
|
||||
<_UpgradeExtensionExclude Include="System.Composition.TypedParts.dll" />
|
||||
<_UpgradeExtensionExclude Include="System.Diagnostics.EventLog.dll" />
|
||||
<_UpgradeExtensionExclude Include="System.IO.Pipelines.dll" />
|
||||
<_UpgradeExtensionExclude Include="System.Linq.Async.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Ensure the extension is published on build -->
|
||||
<Target Name="PublishUpgradeAssistant" AfterTargets="Build" DependsOnTargets="Publish" />
|
||||
|
||||
<!-- Remove host supplied assemblies -->
|
||||
<Target Name="RemoveUpgradeAssistantHostProvidedAssemblies"
|
||||
AfterTargets="ComputeFilesToPublish">
|
||||
|
||||
<ItemGroup>
|
||||
<_ExtensionArtifactsByRelativePath Include="%(ResolvedFileToPublish.RelativePath)">
|
||||
<OriginalIdentity>%(Identity)</OriginalIdentity>
|
||||
</_ExtensionArtifactsByRelativePath>
|
||||
<_ExtensionArtifactsByRelativePath Remove="@(_UpgradeExtensionExclude)" />
|
||||
|
||||
<_ResolvedFileToPublish Include="%(_ExtensionArtifactsByRelativePath.OriginalIdentity)" />
|
||||
<_ToRemove Include="@(ResolvedFileToPublish)" Exclude="@(_ResolvedFileToPublish)" />
|
||||
|
||||
<ResolvedFileToPublish Remove="@(_ToRemove)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Target>
|
||||
|
||||
</Project>
|
Загрузка…
Ссылка в новой задаче