提交 ae034955 编写于 作者: T Tomáš Matoušek 提交者: GitHub

Use project.json to generate DevDiv dependencies (#13039)

Use nuget restore to determine the exact dependencies we need to insert into VS.
上级 8c3ff5b3
......@@ -3,6 +3,7 @@
set RoslynRoot=%~dp0
set NuGetAdditionalCommandLineArgs=-verbosity quiet -configfile "%RoslynRoot%nuget.config" -Project2ProjectTimeOut 1200
set DevDivPackages=%RoslynRoot%src\Setup\DevDivPackages
:ParseArguments
if /I "%1" == "/?" goto :Usage
......@@ -53,6 +54,11 @@ call "%NugetExe%" restore "%RoslynRoot%src\Setup\Templates\Templates.sln" %NuGet
echo Restoring packages: Roslyn (this may take some time)
call "%NugetExe%" restore "%RoslynSolution%" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
echo Restoring packages: DevDiv tools
call %NugetExe% restore "%RoslynRoot%src\Setup\DevDivInsertionFiles\DevDivInsertionFiles.sln" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
call %NugetExe% restore "%DevDivPackages%\Roslyn\project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
call %NugetExe% restore "%DevDivPackages%\Debugger\project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
exit /b 0
:CleanFailed
......
......@@ -2,7 +2,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--Generated file, do not directly edit. Run "RepoUtil change" to regenerate-->
<PropertyGroup>
<ManagedEsentVersion>1.9.2</ManagedEsentVersion>
<ManagedEsentVersion>1.9.4</ManagedEsentVersion>
<MicrosoftCodeAnalysisAnalyzersVersion>1.1.0</MicrosoftCodeAnalysisAnalyzersVersion>
<MicrosoftCompositionVersion>1.0.27</MicrosoftCompositionVersion>
<MicrosoftDiagnosticsRuntimeVersion>0.8.31-beta</MicrosoftDiagnosticsRuntimeVersion>
......@@ -31,6 +31,7 @@
<SystemLinqVersion>4.1.0</SystemLinqVersion>
<SystemLinqExpressionsVersion>4.1.0</SystemLinqExpressionsVersion>
<SystemNetNameResolutionVersion>4.0.0</SystemNetNameResolutionVersion>
<SystemNetSecurityVersion>4.0.0</SystemNetSecurityVersion>
<SystemNetSocketsVersion>4.1.0</SystemNetSocketsVersion>
<SystemReflectionVersion>4.1.0</SystemReflectionVersion>
<SystemReflectionExtensionsVersion>4.0.1</SystemReflectionExtensionsVersion>
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="Settings">
<ImportGroup>
<Import Project="..\..\..\build\Targets\VSL.Settings.targets" />
</ImportGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5FE910A9-E7C9-40E1-AAF1-6C6C7DD61B67}</ProjectGuid>
<OutputType>Exe</OutputType>
<StartupObject>Sub Main</StartupObject>
<RootNamespace>Roslyn.BuildDevDivInsertionFiles</RootNamespace>
<AssemblyName>Roslyn.BuildDevDivInsertionFiles</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Console</MyType>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">.\</SolutionDir>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DocumentationFile>Roslyn.BuildDevDivInsertionFiles.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>Roslyn.BuildDevDivInsertionFiles.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
......@@ -63,12 +50,9 @@
<Compile Include="My Project\AssemblyInfo.vb" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="project.json" />
</ItemGroup>
<ImportGroup Label="Targets">
<ImportGroup>
<Import Project="..\..\..\build\Targets\VSL.Imports.targets" />
</ImportGroup>
<Target Name="AfterBuild">
<Exec Command="&quot;$(TargetPath)&quot; &quot;$(OutDir)\&quot; $(AssemblyVersion) $(PublicKeyToken)" WorkingDirectory="$(MSBuildThisFileDirectory)" LogStandardErrorAsError="true" />
</Target>
</Project>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
</packages>
{
"dependencies": {
"Newtonsoft.Json": "8.0.3",
"System.Reflection.Metadata": "1.4.1-beta-24410-02"
},
"frameworks": {
"net46": {}
},
"runtimes": {
"win7": {}
}
}
{
"dependencies": {
"Microsoft.DiaSymReader.PortablePdb": "1.2.0-beta1-60723-01",
"System.Diagnostics.Process": "4.1.0",
"System.IO.FileSystem": "4.0.1",
"System.IO.FileSystem.Primitives": "4.0.1",
"System.Net.Security": "4.0.0",
"System.Net.Sockets": "4.1.0",
"System.Reflection.TypeExtensions": "4.1.0",
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0",
"System.Security.Cryptography.X509Certificates": "4.1.0",
"System.Threading.Thread": "4.0.0"
},
"frameworks": {
"net461": {}
},
"runtimes": {
"win": {}
}
}
......@@ -8,55 +8,13 @@
</PropertyGroup>
<ItemGroup>
<!--
We create new CoreXT packages here for two reasons:
1) Package exists on NuGet but has a different structure than what DevDiv projects expect (External=true)
2) Package doesn't exist on NuGet, the content is built from Roslyn repo (External=false)
TODO:
The goal is to remove all these packages. We need to update DevDiv projects that reference the binaries
and/or move the source for the packages to separate repos.
TODO: Remove (use nuget built from interactive-window repo)
-->
<NuSpec Include="Microsoft.VisualStudio.InteractiveWindow">
<Version>$(MicrosoftVisualStudioInteractiveWindowVersion)-beta-$(BuildNumberFiveDigitDateStamp)-$(BuildNumberBuildOfTheDayPadded)</Version>
<External>false</External>
<SubDirectory>ManagedDependencies</SubDirectory>
</NuSpec>
<NuSpec Include="System.Collections.Immutable">
<Version>$(SystemCollectionsImmutableVersion)</Version>
<External>true</External>
<SubDirectory>ManagedDependencies</SubDirectory>
</NuSpec>
<NuSpec Include="System.Reflection.Metadata">
<Version>$(SystemReflectionMetadataVersion)</Version>
<External>true</External>
<SubDirectory>ManagedDependencies</SubDirectory>
</NuSpec>
<NuSpec Include="ManagedEsent">
<!--
ManagedEsent version specified in its nuspec doesn't match the nupkg name.
Nuget doesn't complain but VSO tooling does. Until the package is fixed we need to recreate it.
-->
<Version>$(ManagedEsentVersion)</Version>
<External>true</External>
<SubDirectory>ManagedDependencies</SubDirectory>
</NuSpec>
</ItemGroup>
<ItemGroup>
<!--
Packages that exist on NuGet and already have structure compatible with DevDiv.
-->
<NuPkg Include="$(NuGetPackageRoot)\Microsoft.DiaSymReader\$(MicrosoftDiaSymReaderVersion)\*.nupkg">
<SubDirectory>ManagedDependencies</SubDirectory>
</NuPkg>
<NuPkg Include="$(NuGetPackageRoot)\Microsoft.DiaSymReader.PortablePdb\$(MicrosoftDiaSymReaderPortablePdbVersion)\*.nupkg">
<SubDirectory>ManagedDependencies</SubDirectory>
</NuPkg>
<NuPkg Include="$(NuGetPackageRoot)\Microsoft.DiaSymReader.Native\$(MicrosoftDiaSymReaderNativeVersion)\*.nupkg">
<SubDirectory>NativeDependencies</SubDirectory>
</NuPkg>
<NuPkg Include="$(NuGetPackageRoot)\Microsoft.CodeAnalysis.Elfie\$(MicrosoftCodeAnalysisElfieVersion)\*.nupkg">
<SubDirectory>ManagedDependencies</SubDirectory>
</NuPkg>
</ItemGroup>
<Target Name="Build" Inputs="@(NuSpec)" Outputs="@(NuSpec->$(PackagesOutDir)\%(NuSpec.SubDirectory)\VS.ExternalAPIs.%(NuSpec.Identity).%(Version).nupkg">
<MakeDir Directories="$(PackagesOutDir)\%(NuSpec.SubDirectory)" />
......
{
"dependencies": {
"Microsoft.DiaSymReader": "1.1.0-beta1-60625-03",
"Microsoft.DiaSymReader.Native": "1.5.0-beta1",
"Microsoft.CodeAnalysis.Elfie": "0.10.6-rc2",
"System.Collections.Immutable": "1.2.0",
"System.Reflection.Metadata": "1.4.1-beta-24410-02",
"ManagedEsent": "1.9.4",
"System.AppContext": "4.1.0",
"System.Console": "4.0.0",
"System.Diagnostics.StackTrace": "4.0.1",
"System.IO.FileSystem": "4.0.1",
"System.IO.FileSystem.Primitives": "4.0.1"
},
"frameworks": {
"net461": {}
},
"runtimes": {
"win": {}
}
}
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>VS.ExternalAPIs.ManagedEsent</id>
<summary>CoreXT package for the VS build.</summary>
<description>CoreXT package for the VS build.</description>
<authors>Managed Languages</authors>
<version>0.0</version>
</metadata>
<files>
<file src="lib\net40\Esent.Interop.dll" target="lib\net40" />
</files>
</package>
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>VS.ExternalAPIs.Microsoft.DiaSymReader.PortablePdb</id>
<summary>CoreXT package for the VS build.</summary>
<description>CoreXT package for the VS build.</description>
<authors>Managed Languages</authors>
<version>0.0</version>
</metadata>
<files>
<file src="Microsoft.DiaSymReader.PortablePdb.dll" target="lib\portable-net45+win8" />
<file src="Microsoft.DiaSymReader.PortablePdb.xml" target="lib\portable-net45+win8" />
</files>
</package>
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>VS.ExternalAPIs.System.Collections.Immutable</id>
<summary>CoreXT package for the VS build.</summary>
<description>CoreXT package for the VS build.</description>
<authors>Managed Languages</authors>
<version>0.0</version>
</metadata>
<files>
<file src="lib\netstandard1.0\System.Collections.Immutable.dll" target="lib\dotnet5.1" />
<file src="lib\netstandard1.0\System.Collections.Immutable.dll" target="lib\netstandard1.0" />
</files>
</package>
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>VS.ExternalAPIs.System.Reflection.Metadata</id>
<summary>CoreXT package for the VS build.</summary>
<description>CoreXT package for the VS build.</description>
<authors>Managed Languages</authors>
<version>0.0</version>
</metadata>
<files>
<file src="lib\netstandard1.1\System.Reflection.Metadata.dll" target="lib\dotnet5.2" />
<file src="lib\netstandard1.1\System.Reflection.Metadata.dll" target="lib\netstandard1.1" />
</files>
</package>
......@@ -6,12 +6,13 @@
<Target Name="Build">
<!-- Build CoreXT packages for insertion into DevDiv (order of the following actions matters) -->
<MSBuild Projects="DevDivPackages\Dependencies.proj" />
<MSBuild Projects="DevDivInsertionFiles\DevDivInsertionFiles.sln" />
<Exec Command='"$(OutDir)Roslyn.BuildDevDivInsertionFiles.exe" "$(OutDir)\" "$(MSBuildThisFileDirectory)\" "$(NuGetPackageRoot)" $(AssemblyVersion) $(MicrosoftVisualStudioInteractiveWindowVersion)-beta-$(BuildNumberFiveDigitDateStamp)-$(BuildNumberBuildOfTheDayPadded)' LogStandardErrorAsError="true" />
<MSBuild Projects="DevDivPackages\Dependencies.proj" />
<MSBuild Projects="DevDivPackages\Roslyn.proj" />
<MSBuild Projects="DevDivVsix\CompilersPackage\Microsoft.CodeAnalysis.Compilers.vsmanproj" />
<MSBuild Projects="DevDivVsix\MicrosoftCodeAnalysisLanguageServices\Microsoft.CodeAnalysis.LanguageServices.vsmanproj" />
<!-- Dependencies -->
<!-- <MSBuild Projects="..\..\..\Closed\Test\Resources\TestResourcesProprietary.csproj" /> -->
......
{
"dependencies": {
"ManagedEsent": "1.9.2",
"ManagedEsent": "1.9.4",
"Microsoft.CodeAnalysis.Elfie": "0.10.6-rc2",
"Microsoft.VisualStudio.Shell.14.0": {
"version": "14.3.25407",
......
{
"dependencies": {
"ManagedEsent": "1.9.2"
"ManagedEsent": "1.9.4"
},
"frameworks": {
"net46": { }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册