-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Move corefx onto the .NET Core 2.0 toolset #18035
Changes from all commits
8b471f7
471fe9d
ede99be
cf8620e
9ec28fe
715f447
fd2bd4e
26a2888
cb40a89
ae68e07
d9a6f39
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.27-prerelease-01431-02 | ||
1.0.27-prerelease-01510-01 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.0-preview2-1-003182 | ||
2.0.0-preview1-005724 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,9 @@ | |
|
||
# Restores crossgen and runs it on all tools components. | ||
|
||
__CoreClrVersion=1.1.0 | ||
__CoreClrVersion=2.0.0-preview1-25204-02 | ||
__SharedFxVersion=2.0.0-preview1-001913-00 | ||
__MyGetFeed=https://dotnet.myget.org/F/dotnet-core/api/v3/index.json | ||
|
||
usage() | ||
{ | ||
|
@@ -20,15 +22,16 @@ restore_crossgen() | |
|
||
__pjDir=$__toolsDir/crossgen | ||
mkdir -p $__pjDir | ||
echo "{\"frameworks\":{\"netcoreapp1.1\":{\"dependencies\":{\"Microsoft.NETCore.Runtime.CoreCLR\":\"$__CoreClrVersion\", \"Microsoft.NETCore.Platforms\": \"$__CoreClrVersion\"}}},\"runtimes\":{\"$__rid\":{}}}" > "$__pjDir/project.json" | ||
$__dotnet restore $__pjDir/project.json --packages $__packagesDir | ||
__crossgenInPackage=$__packagesDir/runtime.$__packageRid.Microsoft.NETCore.Runtime.CoreCLR/$__CoreClrVersion/tools/crossgen | ||
echo "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><TargetFramework>netcoreapp2.0</TargetFramework><DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences><RuntimeIdentifiers>$__packageRid</RuntimeIdentifiers></PropertyGroup><ItemGroup><PackageReference Include=\"Microsoft.NETCore.Runtime.CoreCLR\" Version=\"$__CoreClrVersion\" /><PackageReference Include=\"Microsoft.NETCore.Platforms\" Version=\"1.1.0\" /></ItemGroup></Project>" > "$__pjDir/crossgen.csproj" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need this any more? Has crossgen been added to the package yet? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It wasn't when I was using an "older" version of the 2.0 CLI. Let me check again now that this works on a newer version. |
||
$__dotnet restore $__pjDir/crossgen.csproj --packages $__packagesDir --source $__MyGetFeed | ||
__crossgenInPackage=$__packagesDir/runtime.$__packageRid.microsoft.netcore.runtime.coreclr/$__CoreClrVersion/tools/crossgen | ||
if [ ! -e $__crossgenInPackage ]; then | ||
echo "The crossgen executable could not be found at "$__crossgenInPackage". Aborting crossgen.sh." | ||
exit 1 | ||
fi | ||
cp $__crossgenInPackage $__sharedFxDir | ||
__crossgen=$__sharedFxDir/crossgen | ||
chmod +x $__crossgen | ||
} | ||
|
||
crossgen_everything() | ||
|
@@ -50,7 +53,7 @@ crossgen_everything() | |
crossgen_single() | ||
{ | ||
__file=$1 | ||
$__crossgen /Platform_Assemblies_Paths $__toolsDir:$__sharedFxDir /nologo /MissingDependenciesOK $__file > /dev/null | ||
$__crossgen /Platform_Assemblies_Paths $__sharedFxDir:$__toolsDir /nologo /MissingDependenciesOK /ReadyToRun $__file > /dev/null | ||
if [ $? -eq 0 ]; then | ||
__outname="${__file/.dll/.ni.dll}" | ||
__outname="${__outname/.exe/.ni.exe}" | ||
|
@@ -74,7 +77,7 @@ __scriptpath=$(cd "$(dirname "$0")"; pwd -P) | |
__toolsDir=$__scriptpath/../Tools | ||
__dotnet=$__toolsDir/dotnetcli/dotnet | ||
__packagesDir=$__scriptpath/../packages | ||
__sharedFxDir=$__toolsDir/dotnetcli/shared/Microsoft.NETCore.App/$__CoreClrVersion/ | ||
__sharedFxDir=$__toolsDir/dotnetcli/shared/Microsoft.NETCore.App/$__SharedFxVersion/ | ||
__rid=$($__dotnet --info | sed -n -e 's/^.*RID:[[:space:]]*//p') | ||
|
||
if [[ $__rid == *"osx"* ]]; then | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ | |
<AppXRunnerVersion>1.0.3-prerelease-00921-01</AppXRunnerVersion> | ||
<XunitPerfAnalysisPackageVersion>1.0.0-alpha-build0049</XunitPerfAnalysisPackageVersion> | ||
<TraceEventPackageVersion>1.0.0-alpha-experimental</TraceEventPackageVersion> | ||
<XunitNetcoreExtensionsVersion>1.0.1-prerelease-01401-04</XunitNetcoreExtensionsVersion> | ||
</PropertyGroup> | ||
|
||
<!-- Package dependency verification/auto-upgrade configuration. --> | ||
|
@@ -151,7 +152,7 @@ | |
</StaticDependency> | ||
|
||
<StaticDependency Include="Microsoft.xunit.netcore.extensions;Microsoft.DotNet.BuildTools.TestSuite"> | ||
<Version>1.0.1-prerelease-01401-04</Version> | ||
<Version>$(XunitNetcoreExtensionsVersion)</Version> | ||
</StaticDependency> | ||
|
||
<PerformancePackDependency Include="xunit.performance.core" /> | ||
|
@@ -171,11 +172,5 @@ | |
<PackageId>microsoft.xunit.runner.uwp</PackageId> | ||
<Version>$(AppXRunnerVersion)</Version> | ||
</DependencyBuildInfo> | ||
|
||
<!-- project.json files to update --> | ||
<ProjectJsonFiles Include="$(MSBuildThisFileDirectory)external\**\project.json" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, it does. It will only update dependencies.props now, but the properties defined in there are used in the depproj files. |
||
<ProjectJsonFiles Include="$(MSBuildThisFileDirectory)external\**\optional.json" /> | ||
<ProjectJsonFiles Include="$(MSBuildThisFileDirectory)external\**\project.json.template" /> | ||
|
||
</ItemGroup> | ||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,7 +104,7 @@ | |
<DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand> | ||
<DnuRestoreCommand Condition="'$(ParallelRestore)'=='true'">$(DnuRestoreCommand) --parallel</DnuRestoreCommand> | ||
<DnuRestoreCommand Condition="'$(UseNuGetHttpCache)'!='true'">$(DnuRestoreCommand) --no-cache</DnuRestoreCommand> | ||
<DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('/\'.ToCharArray()))" $(DnuRestoreSource)</DnuRestoreCommand> | ||
<DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('/').TrimEnd('\'))" $(DnuRestoreSource)</DnuRestoreCommand> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mm not sure I understood this change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For some reason, MSBuild did not want to call the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was some breaking changes in MSBuild with netcoreapp2.0 caused by the new overload. See dotnet/msbuild#1634. /cc @rainersigwald @AndyGerlicher - in case they want to know about this change for netcoreapp2.0. It feels like a bug. In reply to: 110289282 [](ancestors = 110289282) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Filed dotnet/msbuild#1966 to take a look at this |
||
<DnuRestoreCommand Condition="'$(LockDependencies)' == 'true'">$(DnuRestoreCommand) --lock</DnuRestoreCommand> | ||
<DnuRestoreCommand Condition="'$(NuGetConfigPath)'!=''">$(DnuRestoreCommand) --configfile $(NuGetConfigPath)</DnuRestoreCommand> | ||
</PropertyGroup> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"runtimeOptions": { | ||
"tfm": "netcoreapp1.1", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the tfm option? I'm not sure I've seen that before. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure. It is in the runtimeconfig.json file included in the ILLink nuget package, and this file is copy-pasted from there. I just updated the Microsoft.NETCore.App version below. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new tooling puts this "tfm" in the runtimeconfig. This value is used by the host to do "shared runtime store" probing. See https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/DotNetCore-SharedPackageStore.md for more info. In reply to: 110770450 [](ancestors = 110770450) |
||
"framework": { | ||
"name": "Microsoft.NETCore.App", | ||
"version": "2.0.0-preview1-001913-00" | ||
} | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,11 @@ | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<ProjectJsonTemplate Condition="'$(ProjectJsonTemplate)' == ''">$(MSBuildThisProjectDirectory)project.json.template</ProjectJsonTemplate> | ||
<ProjectJson Condition="Exists('$(ProjectJsonTemplate)')">$(IntermediateOutputPath)project.json</ProjectJson> | ||
<ProjectLockJson Condition="Exists('$(ProjectJsonTemplate)')">$(IntermediateOutputPath)project.lock.json</ProjectLockJson> | ||
</PropertyGroup> | ||
|
||
<Import Project="..\dir.targets" /> | ||
|
||
<PropertyGroup> | ||
<RestorePackages>true</RestorePackages> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these properties still needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe so... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess it won't be needed once we stop doing the restore ourselves and start using the nuget targets for restore. |
||
<PrereleaseResolveNuGetPackages>true</PrereleaseResolveNuGetPackages> | ||
</PropertyGroup> | ||
|
||
<Target | ||
Name="GenerateProjectJsonFromTemplates" | ||
BeforeTargets="RestorePackages" | ||
Inputs="$(ProjectJsonTemplate)" | ||
Outputs="$(ProjectJson)" | ||
Condition="Exists('$(ProjectJsonTemplate)')" | ||
> | ||
<MakeDir Directories="$([System.IO.Path]::GetDirectoryName('$(ProjectJson)'))" /> | ||
<!-- Update project.json template --> | ||
<WriteLinesToFile | ||
File="$(ProjectJson)" | ||
Lines="$([System.IO.File]::ReadAllText('$(ProjectJsonTemplate)').Replace('{RID}', $(NuGetRuntimeIdentifier)).Replace('{TFM}', $(NuGetTargetMoniker)).Replace('{PackageId}', $(TargetingPackNugetPackageId)))" | ||
Overwrite="true" | ||
/> | ||
</Target> | ||
|
||
<!-- Override build and GetTargetPath to return all items deployed --> | ||
<Target Name="Build" | ||
Condition=" '$(_InvalidConfigurationWarning)' != 'true' " | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The duplication of all these version is going to be a maintenance nightmare we need to think about ways of eliminating them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically I can pluck this version out of the string resources of libcoreclr.so. If
crossgen
is included with the shared framework though (which I think is the plan?) then it won't be necessary.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should now be in the the tools folder of the Microsoft.NETCore.App package (so you don't need to restore the Microsoft.NETCore.Runtime.CoreCLR package) but the current plan is to not include it as an exe in the shared framework on disk.
/cc @gkhanna79