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

Re-add a NETCore-targeted Compilers NuGet package (#20079)

This reverts commit 8a1ca479 and moves
publish earlier in the build pipeline (before signing) to prevent
published binaries from overwriting already built and signed binaries.
上级 0a0d8f2e
......@@ -16,10 +16,10 @@
<PropertyGroup>
<!-- Compiler server is not currently supported on CoreCLR -->
<UseSharedCompilation>false</UseSharedCompilation>
<CscToolPath>$(MSBuildThisFileDirectory)..\tools</CscToolPath>
<CscToolPath>$(MSBuildThisFileDirectory)..\tools\bincore</CscToolPath>
<CscToolExe Condition="'$(OS)' == 'Windows_NT'">RunCsc.cmd</CscToolExe>
<CscToolExe Condition="'$(OS)' != 'Windows_NT'">RunCsc</CscToolExe>
<VbcToolPath>$(MSBuildThisFileDirectory)..\tools</VbcToolPath>
<VbcToolPath>$(MSBuildThisFileDirectory)..\tools\bincore</VbcToolPath>
<VbcToolExe Condition="'$(OS)' == 'Windows_NT'">RunVbc.cmd</VbcToolExe>
<VbcToolExe Condition="'$(OS)' != 'Windows_NT'">RunVbc</VbcToolExe>
</PropertyGroup>
......
......@@ -2,4 +2,4 @@
THISDIR=$(dirname $0)
dotnet $THISDIR/csc.exe "$@"
dotnet $THISDIR/csc.dll "$@"
echo off
dotnet %~dp0\csc.exe %*
\ No newline at end of file
dotnet %~dp0\csc.dll %*
......@@ -2,4 +2,4 @@
THISDIR=$(dirname $0)
dotnet $THISDIR/vbc.exe "$@"
dotnet $THISDIR/vbc.dll "$@"
echo off
dotnet %~dp0\vbc.exe %*
\ No newline at end of file
dotnet %~dp0\vbc.dll %*
......@@ -518,4 +518,20 @@
<Content Remove="@(Content)" Condition="'%(Filename)%(Extension)' == 'xunit.abstractions.dll'" />
</ItemGroup>
</Target>
<!-- We need to run publish on our CoreCLR executables (CscCore and VbcCore) without rebuilding
since a rebuild may overwrite signed binaries in the output directory with unsigned binaries
from the intermediate output directory. -->
<Target Name="PublishWithoutBuilding"
DependsOnTargets="PreventProjectReferencesFromBuilding;
ResolveReferences;
ComputeAndCopyFilesToPublishDirectory;
GeneratePublishDependencyFile;
GeneratePublishRuntimeConfigurationFile" />
<Target Name="PreventProjectReferencesFromBuilding">
<PropertyGroup>
<BuildProjectReferences>false</BuildProjectReferences>
</PropertyGroup>
</Target>
</Project>
......@@ -5,7 +5,6 @@
<PropertyGroup>
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
<PlatformTarget>AnyCPU</PlatformTarget>
<RuntimeIdentifier>x64</RuntimeIdentifier>
<ProjectGuid>{8CE3A581-2969-4864-A803-013E9D977C3A}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Microsoft.CodeAnalysis.VisualBasic.CommandLine</RootNamespace>
......
......@@ -17,29 +17,29 @@
</metadata>
<files>
<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.dll" target="tools" />
<file src="Exes/CscCore/csc.deps.json" target="tools" />
<file src="Exes/CscCore/csc.runtimeconfig.json" 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.dll" 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" />
<!-- Targets and task files -->
<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" />
<!-- Compiler exe files -->
<file src="Dlls/CodeAnalysis/Microsoft.CodeAnalysis.dll" target="tools/bincore" />
<file src="Dlls/CSharpCodeAnalysis/Microsoft.CodeAnalysis.CSharp.dll" target="tools/bincore" />
<file src="Exes/CscCore/publish/csc.dll" target="tools/bincore" />
<file src="Exes/CscCore/publish/csc.deps.json" target="tools/bincore" />
<file src="Exes/CscCore/publish/csc.runtimeconfig.json" target="tools/bincore" />
<file src="$additionalFilesPath$/RunCsc" target="tools/bincore/RunCsc" />
<file src="$additionalFilesPath$/RunCsc.cmd" target="tools/bincore" />
<file src="Dlls/BasicCodeAnalysis/Microsoft.CodeAnalysis.VisualBasic.dll" target="tools/bincore" />
<file src="Exes/VbcCore/publish/vbc.dll" target="tools/bincore" />
<file src="Exes/VbcCore/publish/vbc.deps.json" target="tools/bincore" />
<file src="Exes/VbcCore/publish/vbc.runtimeconfig.json" target="tools/bincore" />
<file src="$additionalFilesPath$/RunVbc" target="tools/bincore/RunVbc" />
<file src="$additionalFilesPath$/RunVbc.cmd" target="tools/bincore" />
<!-- References that are either not in the target framework or are a higher version -->
<file src="Exes/Toolset/System.Collections.Immutable.dll" target="tools" />
<file src="Exes/Toolset/System.Reflection.Metadata.dll" target="tools" />
<file src="Exes/Toolset/System.ValueTuple.dll" target="tools" />
<file src="Exes/Toolset/System.Xml.XmlDocument.dll" target="tools" />
<file src="Exes/Toolset/System.Xml.XPath.dll" target="tools" />
<file src="Exes/Toolset/System.Xml.XPath.XDocument.dll" target="tools" />
<file src="Exes\CscCore\publish\System.*.dll" target="tools\bincore" />
<file src="Exes\CscCore\publish\runtimes\**" target="tools\bincore\runtimes" />
</files>
</package>
use vs
package name=PortableFacades
version=1.3.0.0
version=1.4.0.0
folder InstallDir:\Common7\IDE\PrivateAssemblies
file source="$(NuGetPackageRoot)\System.AppContext\4.3.0\lib\net46\System.AppContext.dll" vs.file.ngen=yes
......
......@@ -20,7 +20,15 @@
<PowerShellScriptsToCopy Include="PowerShell\*.ps1" />
</ItemGroup>
<ItemGroup>
<CoreClrProject Include="$(MSBuildThisFileDirectory)..\Compilers\CSharp\CscCore\CscCore.csproj" />
<CoreClrProject Include="$(MSBuildThisFileDirectory)..\Compilers\VisualBasic\VbcCore\VbcCore.csproj" />
</ItemGroup>
<Target Name="Build">
<!-- Publish the CoreClr projects (CscCore and VbcCore) and dependencies for later NuGet packaging. -->
<MSBuild BuildInParallel="true" Projects="@(CoreClrProject)" Targets="PublishWithoutBuilding" />
<!-- We build these serially to work around https://github.com/dotnet/roslyn/issues/11856,
where building multiple projects that produce VSIXes larger than 10MB will race against each other -->
<MSBuild Projects="@(Project)" Targets="Build" BuildInParallel="false" />
......@@ -40,4 +48,5 @@
<Target Name="Rebuild">
<MSBuild Projects="@(Project)" Targets="Rebuild" BuildInParallel="false" />
</Target>
</Project>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册