提交 7dba8af2 编写于 作者: A Andy Gocke 提交者: vsadov

Unify Microsoft.NETCore.Csc and Micrososft.NETCore.Vbc into Micrososft.NETCore.Compilers

上级 a18e7c28
......@@ -3,16 +3,24 @@
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Always use the local build task, even if we just shell out to an exe in case there are
new properties in the local build task. -->
<UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.Csc"
AssemblyFile="$(MSBuildThisFileDirectory)..\tools\Microsoft.Build.Tasks.CodeAnalysis.dll" />
<UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.Vbc"
AssemblyFile="$(MSBuildThisFileDirectory)..\tools\Microsoft.Build.Tasks.CodeAnalysis.dll" />
<PropertyGroup>
<CSharpCoreTargetsPath>$(MSBuildThisFileDirectory)..\tools\Microsoft.CSharp.Core.targets</CSharpCoreTargetsPath>
<BasicCoreTargetsPath>$(MSBuildThisFileDirectory)..\tools\Microsoft.VisualBasic.Core.targets</BasicCoreTargetsPath>
</PropertyGroup>
<!-- If we're not using the compiler server, set ToolPath/Exe to direct to
the exes in this package -->
<PropertyGroup Condition="'$(UseSharedCompilation)' != 'true'">
<!-- Set ToolPath/Exe to direct to the exes in this package -->
<PropertyGroup>
<!-- Compiler server is not currently supported on CoreCLR -->
<UseSharedCompilation>false</UseSharedCompilation>
<CscToolPath>$(MSBuildThisFileDirectory)..\tools</CscToolPath>
<CscToolExe Condition="'$(OS)' == 'Windows_NT'">RunCsc.cmd</CscToolExe>
<CscToolExe Condition="'$(OS)' != 'Windows_NT'">RunCsc</CscToolExe>
<VbcToolPath>$(MSBuildThisFileDirectory)..\tools</VbcToolPath>
<VbcToolExe>RunVbc</VbcToolExe>
<VbcToolExe Condition="'$(OS)' == 'Windows_NT'">RunVbc.cmd</VbcToolExe>
<VbcToolExe Condition="'$(OS)' != 'Windows_NT'">RunVbc</VbcToolExe>
</PropertyGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!-- 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 ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Always use the local build task, even if we just shell out to an exe in case there are
new properties in the local build task. -->
<UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.Csc"
AssemblyFile="$(MSBuildThisFileDirectory)..\tools\Microsoft.Build.Tasks.CodeAnalysis.dll" />
<PropertyGroup>
<CSharpCoreTargetsPath>$(MSBuildThisFileDirectory)..\tools\Microsoft.CSharp.Core.targets</CSharpCoreTargetsPath>
</PropertyGroup>
<!-- If we're not using the compiler server, set ToolPath/Exe to direct to
the exes in this package -->
<PropertyGroup Condition="'$(UseSharedCompilation)' != 'true'">
<CscToolPath>$(MSBuildThisFileDirectory)..\tools</CscToolPath>
<CscToolExe>RunCsc</CscToolExe>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -75,14 +75,6 @@ var IsCoreBuild = File.Exists(Path.Combine(ToolsetPath, "corerun"));
#endregion
var NuGetAdditionalFilesPath = Path.Combine(SolutionRoot, "build/NuGetAdditionalFiles");
var ThirdPartyNoticesPath = Path.Combine(NuGetAdditionalFilesPath, "ThirdPartyNotices.rtf");
var NetCompilersPropsPath = Path.Combine(NuGetAdditionalFilesPath, "Microsoft.Net.Compilers.props");
var NetcoreCscPropsPath = Path.Combine(NuGetAdditionalFilesPath, "Microsoft.NETCore.Csc.props");
var RunCscShPath = Path.Combine(NuGetAdditionalFilesPath, "RunCsc");
var RunCscCmdPath = Path.Combine(NuGetAdditionalFilesPath, "RunCsc.cmd");
var NetCoreVbcPropsPath = Path.Combine(NuGetAdditionalFilesPath, "Microsoft.NETCore.Vbc.props");
var RunVbcShPath = Path.Combine(NuGetAdditionalFilesPath, "RunVbc");
var RunVbcCmdPath = Path.Combine(NuGetAdditionalFilesPath, "RunVbc.cmd");
string[] RedistPackageNames = {
"Microsoft.CodeAnalysis",
......@@ -116,8 +108,7 @@ string[] NonRedistPackageNames = {
"Microsoft.Net.Compilers",
"Microsoft.Net.Compilers.netcore",
"Microsoft.Net.CSharp.Interactive.netcore",
"Microsoft.NETCore.Csc",
"Microsoft.NETCore.Vbc",
"Microsoft.NETCore.Compilers",
"Microsoft.VisualStudio.IntegrationTest.Utilities",
"Microsoft.VisualStudio.LanguageServices.Razor.RemoteClient",
};
......@@ -135,8 +126,7 @@ var PreReleaseOnlyPackages = new HashSet<string>
"Microsoft.CodeAnalysis.VisualBasic.Scripting",
"Microsoft.Net.Compilers.netcore",
"Microsoft.Net.CSharp.Interactive.netcore",
"Microsoft.NETCore.Csc",
"Microsoft.NETCore.Vbc",
"Microsoft.NETCore.Compilers",
"Microsoft.CodeAnalysis.Remote.Razor.ServiceHub",
"Microsoft.CodeAnalysis.Remote.ServiceHub",
"Microsoft.CodeAnalysis.Remote.Workspaces",
......@@ -213,15 +203,8 @@ int PackFiles(string[] nuspecFiles, string licenseUrl)
{ "authors", Authors },
{ "projectURL", ProjectURL },
{ "tags", Tags },
{ "thirdPartyNoticesPath", ThirdPartyNoticesPath },
{ "netCompilersPropsPath", NetCompilersPropsPath },
{ "emptyDirPath", emptyDir },
{ "netcoreCscPropsPath", NetcoreCscPropsPath },
{ "runCscShPath", RunCscShPath },
{ "runCscCmdPath", RunCscCmdPath },
{ "netcoreVbcPropsPath", NetCoreVbcPropsPath },
{ "runVbcShPath", RunVbcShPath },
{ "runVbcCmdPath", RunVbcCmdPath }
{ "additionalFilesPath", NuGetAdditionalFilesPath }
};
foreach (var dependencyVersion in dependencyVersions)
......
......@@ -28,6 +28,6 @@
<tags>$tags$</tags>
</metadata>
<files>
<file src="$thirdPartyNoticesPath$" target="" />
<file src="$additionalFilesPath$/ThirdPartyNotices.rtf" target="" />
</files>
</package>
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Microsoft.NETCore.Csc</id>
<id>Microsoft.NETCore.Compilers</id>
<description>
CoreCLR-compatible version of the C# compiler for use in MSBuild.
CoreCLR-compatible versions of the C# and VB compilers for use in MSBuild.
</description>
<language>en-US</language>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
......@@ -16,16 +16,23 @@
<developmentDependency>true</developmentDependency>
</metadata>
<files>
<file src="$netcoreCscPropsPath$" target="build/Microsoft.NETCore.Csc.props" />
<file src="$additionalFilesPath$/Microsoft.NETCore.Compilers.props" target="build" />
<file src="Dlls/CodeAnalysis/Microsoft.CodeAnalysis.dll" target="tools" />
<file src="Dlls/CSharpCodeAnalysis/Microsoft.CodeAnalysis.CSharp.dll" target="tools" />
<file src="Exes/CscCore/csc.exe" target="tools" />
<file src="Exes/CscCore/csc.deps.json" target="tools" />
<file src="Exes/CscCore/csc.runtimeconfig.json" target="tools" />
<file src="$runCscShPath$" target="tools/RunCsc" />
<file src="$runCscCmdPath$" target="tools" />
<file src="$additionalFilesPath$/RunCsc" target="tools/RunCsc" />
<file src="$additionalFilesPath$/RunCsc.cmd" target="tools" />
<file src="Dlls/BasicCodeAnalysis/Microsoft.CodeAnalysis.VisualBasic.dll" target="tools" />
<file src="Exes/VbcCore/vbc.exe" target="tools" />
<file src="Exes/VbcCore/vbc.deps.json" target="tools" />
<file src="Exes/VbcCore/vbc.runtimeconfig.json" target="tools" />
<file src="$additionalFilesPath$/RunVbc" target="tools/RunVbc" />
<file src="$additionalFilesPath$/RunVbc.cmd" target="tools" />
<file src="Dlls/MSBuildTask/Microsoft.Build.Tasks.CodeAnalysis.dll" target="tools" />
<file src="Dlls/MSbuildTask/Microsoft.CSharp.Core.targets" target="tools" />
<file src="Dlls/MSbuildTask/Microsoft.VisualBasic.Core.targets" target="tools" />
<!-- References that are either not in the target framework or are a higher version -->
<file src="Exes/CscCore/System.Collections.Immutable.dll" target="tools" />
......
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Microsoft.NETCore.Vbc</id>
<description>
CoreCLR-compatible version of the Visual Basic.NET compiler for use in MSBuild.
</description>
<language>en-US</language>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<version>$version$</version>
<authors>$authors$</authors>
<licenseUrl>$licenseUrl$</licenseUrl>
<projectUrl>$projectUrl$</projectUrl>
<tags>$tags$</tags>
<serviceable>true</serviceable>
<developmentDependency>true</developmentDependency>
</metadata>
<files>
<file src="$netcoreVbcPropsPath$" target="build/Microsoft.NETCore.Vbc.props" />
<file src="Dlls/CodeAnalysis/Microsoft.CodeAnalysis.dll" target="tools" />
<file src="Dlls/BasicCodeAnalysis/Microsoft.CodeAnalysis.VisualBasic.dll" target="tools" />
<file src="Exes/VbcCore/vbc.exe" target="tools" />
<file src="Exes/VbcCore/vbc.deps.json" target="tools" />
<file src="Exes/VbcCore/vbc.runtimeconfig.json" target="tools" />
<file src="$runVbcShPath$" target="tools/RunVbc" />
<file src="$runVbcCmdPath$" target="tools" />
<file src="Dlls/MSBuildTask/Microsoft.Build.Tasks.CodeAnalysis.dll" target="tools" />
<file src="Dlls/MSbuildTask/Microsoft.VisualBasic.Core.targets" target="tools" />
<!-- References that are either not in the target framework or are a higher version -->
<file src="Exes/VbcCore/System.Collections.Immutable.dll" target="tools" />
<file src="Exes/VbcCore/System.Reflection.Metadata.dll" target="tools" />
<file src="Exes/VbcCore/System.ValueTuple.dll" target="tools" />
<file src="Exes/VbcCore/System.Xml.XmlDocument.dll" target="tools" />
<file src="Exes/VbcCore/System.Xml.XPath.dll" target="tools" />
<file src="Exes/VbcCore/System.Xml.XPath.XDocument.dll" target="tools" />
</files>
</package>
......@@ -18,8 +18,8 @@
<developmentDependency>true</developmentDependency>
</metadata>
<files>
<file src="$netCompilersPropsPath$" target="build\Microsoft.Net.Compilers.props" />
<file src="$thirdPartyNoticesPath$" target="" />
<file src="$additionalFilesPath$/Microsoft.Net.Compilers.props" target="build" />
<file src="$additionalFilesPath$/ThirdPartyNotices.rtf" target="" />
<!-- The Roslyn built binaries must be taken from these locations because this is
the location where signing occurs -->
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册