提交 891272e6 编写于 作者: T Tomas Matousek

Clean up NuGet packages.

上级 b0f234d1
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata minClientVersion="3.3">
<id>$PackageId$</id>
<description>$PackageDescription$</description>
<version>$Version$</version>
<authors>$Authors$</authors>
<requireLicenseAcceptance>$RequireLicenseAcceptance$</requireLicenseAcceptance>
<licenseUrl>$PackageLicenseUrl$</licenseUrl>
<projectUrl>$PackageProjectUrl$</projectUrl>
<copyright>$Copyright$</copyright>
<developmentDependency>$DevelopmentDependency$</developmentDependency>
<tags>$PackageTags$</tags>
<serviceable>$Serviceable$</serviceable>
<repository type="$RepositoryType$" url="$RepositoryUrl$" commit="$RepositoryCommit$" />
<dependencies>
<group targetFramework="netstandard2.0">
<dependency id="Microsoft.CodeAnalysis.Common" version="[$version$]" />
<dependency id="System.Composition" version="$SystemCompositionVersion$" />
</group>
<group targetFramework="net472">
<dependency id="Microsoft.CodeAnalysis.Common" version="[$version$]" />
<dependency id="System.Composition" version="$SystemCompositionVersion$" />
<dependency id="SQLitePCLRaw.bundle_green" version="$SQLitePCLRawbundle_greenVersion$" />
</group>
</dependencies>
</metadata>
<files>
<file src="$ThirdPartyNoticesFilePath$" target="" />
<!-- Include PDB unless embedded into DLL -->
<file src="Dlls\Microsoft.CodeAnalysis.Workspaces.Desktop\Microsoft.CodeAnalysis.Workspaces.Desktop.dll" target="lib\net472" />
<file src="Dlls\Microsoft.CodeAnalysis.Workspaces.Desktop\Microsoft.CodeAnalysis.Workspaces.Desktop.xml" target="lib\net472" />
<file src="Dlls\Microsoft.CodeAnalysis.Workspaces.Desktop\Microsoft.CodeAnalysis.Workspaces.Desktop.pdb*" target="lib\net472" />
<file src="Dlls\Microsoft.CodeAnalysis.Workspaces\Microsoft.CodeAnalysis.Workspaces.dll" target="lib\net472" />
<file src="Dlls\Microsoft.CodeAnalysis.Workspaces\Microsoft.CodeAnalysis.Workspaces.xml" target="lib\net472" />
<file src="Dlls\Microsoft.CodeAnalysis.Workspaces\Microsoft.CodeAnalysis.Workspaces.pdb*" target="lib\net472" />
<file src="Dlls\Microsoft.CodeAnalysis.Workspaces\Microsoft.CodeAnalysis.Workspaces.dll" target="lib\netstandard2.0" />
<file src="Dlls\Microsoft.CodeAnalysis.Workspaces\Microsoft.CodeAnalysis.Workspaces.xml" target="lib\netstandard2.0" />
<file src="Dlls\Microsoft.CodeAnalysis.Workspaces\Microsoft.CodeAnalysis.Workspaces.pdb*" target="lib\netstandard2.0" />
<!-- Satellite assemblies -->
<file src="Dlls\Microsoft.CodeAnalysis.Workspaces.Desktop\**\Microsoft.CodeAnalysis.Workspaces.Desktop.resources.dll" target="lib\net472" />
<file src="Dlls\Microsoft.CodeAnalysis.Workspaces\**\Microsoft.CodeAnalysis.Workspaces.resources.dll" target="lib\net472" />
<file src="Dlls\Microsoft.CodeAnalysis.Workspaces\**\Microsoft.CodeAnalysis.Workspaces.resources.dll" target="lib\netstandard2.0" />
</files>
</package>
\ No newline at end of file
......@@ -2,63 +2,18 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputType>Library</OutputType>
<RootNamespace>Microsoft.CodeAnalysis</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFramework>net472</TargetFramework>
<DefineConstants>$(DefineConstants);WORKSPACE_DESKTOP</DefineConstants>
<!-- NuGet -->
<IsPackable>true</IsPackable>
<PackageDescription>
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
</PackageDescription>
<!--
TODO: https://github.com/dotnet/roslyn/issues/29292
We package Microsoft.CodeAnalysis.Workspaces and Microsoft.CodeAnalysis.Workspaces.Desktop in the same package,
which is an unusal pattern that's not supported by NuGet Pack. We need to employ a trick to build the package this way.
Workspaces project sets its PackageId used for Restore to Microsoft.CodeAnalysis.Workspaces.Common.
Here we use NuspecPackageId instead, which the Arcade toolset uses to set the PackageId just for Pack build phase, but not the Restore phase
(setting it for Restore phase would produce duplicate PackageId because we already used the same value in Workspaces project).
This way all projects that depend on Workspaces will produce packages depending on Microsoft.CodeAnalysis.Workspaces.Common package
(using the Restore PackageId), but they do not need to depend on Workspaces.Desktop project to do so.
We also need to use hand-written NuSpec file in order to add netstandard1.3 dependency group without multi-targeting this project.
-->
<NuspecPackageId>Microsoft.CodeAnalysis.Workspaces.Common</NuspecPackageId>
<NuspecFile>$(NuspecPackageId).nuspec</NuspecFile>
<NuspecBasePath>$(ArtifactsConfigurationDir)</NuspecBasePath>
<!-- SQLLite package imports content files. Do not include these in the package. -->
<IncludeContentInPack>false</IncludeContentInPack>
</PropertyGroup>
<ItemGroup>
<NuspecProperty Include="ThirdPartyNoticesFilePath=$(ThirdPartyNoticesFilePath)" />
<NuspecProperty Include="SQLitePCLRawbundle_greenVersion=$(SQLitePCLRawbundle_greenVersion)" />
<NuspecProperty Include="SystemCompositionVersion=$(SystemCompositionVersion)" />
<NuspecProperty Include="SystemDiagnosticsContractsVersion=$(SystemDiagnosticsContractsVersion)" />
<NuspecProperty Include="SystemLinqParallelVersion=$(SystemLinqParallelVersion)" />
<NuspecProperty Include="SystemObjectModelVersion=$(SystemObjectModelVersion)" />
<NuspecProperty Include="SystemTextRegularExpressionsVersion=$(SystemTextRegularExpressionsVersion)" />
<NuspecProperty Include="SystemThreadingTasksParallelVersion=$(SystemThreadingTasksParallelVersion)" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'" />
<ItemGroup>
<Reference Include="System.ComponentModel.Composition" />
</ItemGroup>
<ItemGroup>
<Compile Update="WorkspaceDesktopResources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>WorkspaceDesktopResources.resx</DependentUpon>
</Compile>
<ProjectReference Include="..\..\..\Compilers\Core\Portable\Microsoft.CodeAnalysis.csproj" />
<ProjectReference Include="..\Portable\Microsoft.CodeAnalysis.Workspaces.csproj" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="Microsoft.CodeAnalysis.CSharp.EditorFeatures" />
......@@ -104,20 +59,8 @@
<InternalsVisibleTo Include="RoslynTaoActions" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" Key="$(MoqPublicKey)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Compilers\Core\Portable\Microsoft.CodeAnalysis.csproj" />
<!-- Use PrivateAssets=all to avoid creating circular dependency. -->
<ProjectReference Include="..\Portable\Microsoft.CodeAnalysis.Workspaces.csproj" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<PublicAPI Include="PublicAPI.Shipped.txt" />
<PublicAPI Include="PublicAPI.Unshipped.txt" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="WorkspaceDesktopResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>WorkspaceDesktopResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -10,23 +10,26 @@
<TargetFramework>netstandard2.0</TargetFramework>
<DefineConstants>$(DefineConstants);WORKSPACE</DefineConstants>
<!--
NuGet
TODO: https://github.com/dotnet/roslyn/issues/29292
We package Microsoft.CodeAnalysis.Workspaces and Microsoft.CodeAnalysis.Workspaces.Desktop in the same package,
which is an unusal pattern that's not supported by NuGet Pack and needs a custom NuSpec file.
Setting the PackageId causes Restore target to use this name as a project name in assets.json.
This is then used by Pack target when generating dependencies in NuSpec.
-->
<!-- NuGet -->
<IsPackable>true</IsPackable>
<PackageId>Microsoft.CodeAnalysis.Workspaces.Common</PackageId>
<PackageDescription>
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
Do not install this package manually, it will be added as a prerequisite by other packages that require it.
</PackageDescription>
<!-- SQLLite package imports content files. Do not include these in the package. -->
<IncludeContentInPack>false</IncludeContentInPack>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'" />
<ItemGroup>
<ProjectReference Include="..\..\..\Compilers\Core\Portable\Microsoft.CodeAnalysis.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="$(SQLitePCLRawbundle_greenVersion)" PrivateAssets="all" />
<PackageReference Include="System.Composition" Version="$(SystemCompositionVersion)" />
</ItemGroup>
<ItemGroup Label="Linked Files">
<Compile Include="..\..\..\CodeStyle\Core\CodeFixes\FixAllContextHelper.cs" Link="CodeFixes\FixAllOccurrences\FixAllContextHelper.cs" />
<Compile Include="..\..\..\Compilers\Shared\DesktopAnalyzerAssemblyLoader.cs">
......@@ -342,9 +345,5 @@
<PublicAPI Include="PublicAPI.Shipped.txt" />
<PublicAPI Include="PublicAPI.Unshipped.txt" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="$(SQLitePCLRawbundle_greenVersion)" PrivateAssets="all" />
<PackageReference Include="System.Composition" Version="$(SystemCompositionVersion)" />
</ItemGroup>
<Import Project="..\..\..\Dependencies\PooledObjects\Microsoft.CodeAnalysis.PooledObjects.projitems" Label="Shared" />
</Project>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册