Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0 - #48462

Merged
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences
Feb 25, 2021
Merged

Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0#48462
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences

Conversation

@ViktorHofer

@ViktorHoferViktorHofer commented Feb 18, 2021

Copy link
Copy Markdown
Member

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes#48409
Fixes#44578
Fixes#46960

cc @missymessa

@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @ViktorHofer
See info in area-owners.md if you want to be subscribed.

Issue Details

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes https://github.com/dotnet/runtime

cc @missymessa

Author:ViktorHofer
Assignees:ViktorHofer
Labels:

area-Infrastructure

Milestone:6.0.0

Comment threadglobal.json Outdated
Comment threadeng/testing/linker/project.csproj.template Outdated
Comment threadeng/illink.targets Outdated
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Waiting for dotnet/linker#1842 to be merged so that I can consume the newer package.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@jkoritzinsky@hoyosjs can you please take a look at the coreclr error? Seems like the runtime hardcodes the 5.0.0 shared framework somewhere?

@hoyosjs

hoyosjs commented Feb 19, 2021

Copy link
Copy Markdown
Member

@ViktorHofer Yes, there are projects that run on 5.0. Namely:

References to `NetCoreAppToolCurrent`
Directory.Build.props
42: <NetCoreAppToolCurrentVersion>5.0</NetCoreAppToolCurrentVersion>
47: <NetCoreAppToolCurrent>net$(NetCoreAppToolCurrentVersion)</NetCoreAppToolCurrent>
48: <NetCoreAppCurrentToolTargetFrameworkMoniker>$(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppToolCurrentVersion)</NetCoreAppCurrentToolTargetFrameworkMoniker>
67: <AppleAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)'))</AppleAppBuilderDir>
68: <AndroidAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</AndroidAppBuilderDir>
69: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
70: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
71: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/coreclr/crossgen-corelib.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/runtime.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DacTableGen/DacTableGen.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DIALib/DIALib.ilproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/crossgen2/crossgen2.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.Diagnostics/ILCompiler.Diagnostics.csproj
7: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILCompiler.TypeSystem.ReadyToRun.Tests.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkGenerator.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rdump/R2RDump.csproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rtest/R2RTest.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/runincontext/runincontext.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/installer/tests/Directory.Build.props
12: <TestInfraTargetFramework>$(NetCoreAppToolCurrent)</TestInfraTargetFramework>
src/mono/llvm/llvm-init.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/monoaotcross.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/nuget/Microsoft.NET.Runtime.Android.Sample.Mono/Microsoft.NET.Runtime.Android.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_AndroidSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.iOS.Sample.Mono/Microsoft.NET.Runtime.iOS.Sample.Mono.pkgproj
17: <PackageFileInclude="@(_iOSSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/Microsoft.NET.Runtime.wasm.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_wasmSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/sample/Android/AndroidSampleApp.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/HelloWorld/HelloWorld.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/iOS/Program.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/console/ConsoleDelta.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/DeltaHelper/DeltaHelper.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.InTree.props
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.LocalBuild.props
23: <_NetCoreAppToolCurrent>net5.0</_NetCoreAppToolCurrent>
32: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
33: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
34: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(_NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/mono/wasm/wasm.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AotCompilerTask/MonoAOTCompiler.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
29: <FilesToPackageInclude="$(OutputPath)$(NetCoreAppToolCurrent)\$(AssemblyName).dll"TargetPath="tasks" />
src/tasks/AppleAppBuilder/AppleAppBuilder.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
src/tasks/WasmAppBuilder/WasmAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/WasmBuildTasks/WasmBuildTasks.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Coreclr.TestWrapper/Coreclr.TestWrapper.csproj
6: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/dir.sdkbuild.props
9: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Directory.Build.targets
137: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
src/tests/Common/external/external.csproj
15: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies/test_dependencies.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies_fs/test_dependencies.fsproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Directory.Build.props
133: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Directory.Build.targets
359: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
364: Include="$(ArtifactsBinDir)\MonoAOTCompiler\Debug\$(NetCoreAppToolCurrent)\**"
src/tests/JIT/Directed/tailcall/mutual_recursion.fsproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>

Then just a few questions, as I don't know if it's safe to just remap NetCoreAppToolCurrent to net6.0:

  1. Do we want to build and run tools we use for the product against a 6.0 version?
  2. I don't know about a lot of the tools that reference the net5.0 TFM. A bunch of them are mono tasks (AppleAppBuilder, WasmAppBuilder) and samles (like AndroidSampleApp). @directhex are those safe to move to net6.0?
  3. @trylek@davidwrighton@AntonLapounov is it safe to move the crossgen2 and dotnet-pgo projects to net6.0?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Yes, I realized that after posting the comment... The tasks are definitely fine to be upgraded. I think crossgen2 should be fine as well.

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.
Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.
The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Apparently, they way that coreclr uses the pkgproj infrastructure causes these failures. Likely because the props and targets files are imported directly there:

.packages/microsoft.dotnet.build.tasks.packaging/6.0.0-beta.21120.1/build/Packaging.targets(747,5): error MSB4018: (NETCORE_ENGINEERING_TELEMETRY=Build) The "GenerateRuntimeDependencies" task failed unexpectedly.
System.MissingMethodException: Method not found: 'Void NuGet.RuntimeModel.JsonObjectWriter..ctor(Newtonsoft.Json.JsonWriter)'.
at Microsoft.DotNet.Build.Tasks.Packaging.NuGetUtility.WriteRuntimeGraph(String filePath, RuntimeGraph runtimeGraph)
at Microsoft.DotNet.Build.Tasks.Packaging.GenerateRuntimeDependencies.Execute() in /_/src/Microsoft.DotNet.Build.Tasks.Packaging/src/GenerateRuntimeDependencies.cs:line 144
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)

@ericstj can you please help out here? I also updated the NuGet dependencies in Arcade and they already flowed into this PR. The binlog shows that the right assembly with the NuGet breaking change is used. It's unclear to me why there's a MissingMethodException.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

OK I got the fix ready in Arcade, and will update this PR tomorrow.

Comment threadeng/Tools.props
Comment threadsrc/installer/tests/Assets/TestUtils/TestProjects.targets
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@trylek@jkoritzinsky@hoyosjs can someone pls help me figure out why all runtime tests blow up with a 6.0 SDK? I don't even know how to repro this locally. Currently looking into the correlation payloads...

@ViktorHofer

ViktorHofer commented Feb 23, 2021

Copy link
Copy Markdown
MemberAuthor

Oh wow, I just noticed that the SDK value is hardcoded for the runtime tests to 5.0:

<DotNetCliVersion>5.0.0</DotNetCliVersion>

Questions that I have:

  • Why do the runtime tests need a runtime pack to be downloaded? Aren't the runtime tests using the live built shared framework?

@jkoritzinsky

Copy link
Copy Markdown
Member

The runtime tests themselves run on the built shared framework, but the xunit wrappers around the tests run on the CLI we pull down. Otherwise when something breaks that xunit uses, we lose all test coverage, which makes the problem harder to track down.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Thanks Jeremy. I would really love to hear more about what the xunit wrappers are for and why libraries and installer don't need them. Will probably ask about that at some point offline, as this isn't relevant for this PR.

@jkoritzinsky

Copy link
Copy Markdown
Member

The xunit wrappers execute the test and assert the return code matches the expected value. Without them, we wouldn’t have a good way to execute our tests and get an xunit test results file to upload to AzDO. We could use a different runner or create a new one (which we do for onboarding new targets), but the xunit system works well for now.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@safern@akoeplinger I think you guys touched the code that handles the xunit asset publishing with xharness. Can you please take a look at the error?

/__w/1/s/.dotnet/sdk/6.0.100-preview.2.21118.7/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(108,5): error NETSDK1148: Found multiple publish output files with the same relative path: /__w/1/s/artifacts/bin/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/artifacts/obj/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/.packages/xunit.abstractions/2.0.3/lib/netstandard2.0/xunit.abstractions.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.abstractions.dll, /__w/1/s/.packages/xunit.extensibility.core/2.4.1/lib/netstandard1.1/xunit.core.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.core.dll, /__w/1/s/.packages/xunit.extensibility.execution/2.4.1/lib/netstandard1.1/xunit.execution.dotnet.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.execution.dotnet.dll. [/__w/1/s/src/libraries/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj]

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

The remaining issue are duplicated xunit artifacts in mobile builds that @safern is currently looking at. I expect (or better to say hope) that we get this in by EOD.

@safernsafern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me.

@eerhardteerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I still don't understand why we need the empty TestProjects.targets file, but if you think it is valuable, then I'm OK with it.

@ViktorHoferViktorHofer changed the title Remove duplicated ILLink PackageReferenceRemove duplicated ILLink PackageReference and update target version of the SDK to 6.0Feb 24, 2021
@ghost

Copy link
Copy Markdown

Hello @ViktorHofer!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

DNS failures are #48751

@ViktorHofer
ViktorHofer merged commit 653b310 into dotnet:masterFeb 25, 2021
@ViktorHofer
ViktorHofer deleted the ILLinkFixPkgReferences branch February 25, 2021 10:23
@sdmaclea

Copy link
Copy Markdown
Contributor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

The march rollout updates the SDK's minimum required version (the sdk entry in the repo's global.json file). msbuild checks that version when its being invoked (including VS). The target version that was being updated as part of this PR is used for bootstrapping the repo local SDK.

@ghostghost locked as resolved and limited conversation to collaborators Mar 27, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

7 participants

@ViktorHofer@hoyosjs@jkoritzinsky@sdmaclea@eerhardt@joperezr@safern
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0 - #48462

Merged
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences
Feb 25, 2021
Merged

Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0#48462
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences

Conversation

@ViktorHofer

@ViktorHoferViktorHofer commented Feb 18, 2021

Copy link
Copy Markdown
Member

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes#48409
Fixes#44578
Fixes#46960

cc @missymessa

@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @ViktorHofer
See info in area-owners.md if you want to be subscribed.

Issue Details

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes https://github.com/dotnet/runtime

cc @missymessa

Author:ViktorHofer
Assignees:ViktorHofer
Labels:

area-Infrastructure

Milestone:6.0.0

Comment threadglobal.json Outdated
Comment threadeng/testing/linker/project.csproj.template Outdated
Comment threadeng/illink.targets Outdated
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Waiting for dotnet/linker#1842 to be merged so that I can consume the newer package.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@jkoritzinsky@hoyosjs can you please take a look at the coreclr error? Seems like the runtime hardcodes the 5.0.0 shared framework somewhere?

@hoyosjs

hoyosjs commented Feb 19, 2021

Copy link
Copy Markdown
Member

@ViktorHofer Yes, there are projects that run on 5.0. Namely:

References to `NetCoreAppToolCurrent`
Directory.Build.props
42: <NetCoreAppToolCurrentVersion>5.0</NetCoreAppToolCurrentVersion>
47: <NetCoreAppToolCurrent>net$(NetCoreAppToolCurrentVersion)</NetCoreAppToolCurrent>
48: <NetCoreAppCurrentToolTargetFrameworkMoniker>$(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppToolCurrentVersion)</NetCoreAppCurrentToolTargetFrameworkMoniker>
67: <AppleAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)'))</AppleAppBuilderDir>
68: <AndroidAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</AndroidAppBuilderDir>
69: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
70: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
71: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/coreclr/crossgen-corelib.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/runtime.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DacTableGen/DacTableGen.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DIALib/DIALib.ilproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/crossgen2/crossgen2.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.Diagnostics/ILCompiler.Diagnostics.csproj
7: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILCompiler.TypeSystem.ReadyToRun.Tests.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkGenerator.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rdump/R2RDump.csproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rtest/R2RTest.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/runincontext/runincontext.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/installer/tests/Directory.Build.props
12: <TestInfraTargetFramework>$(NetCoreAppToolCurrent)</TestInfraTargetFramework>
src/mono/llvm/llvm-init.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/monoaotcross.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/nuget/Microsoft.NET.Runtime.Android.Sample.Mono/Microsoft.NET.Runtime.Android.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_AndroidSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.iOS.Sample.Mono/Microsoft.NET.Runtime.iOS.Sample.Mono.pkgproj
17: <PackageFileInclude="@(_iOSSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/Microsoft.NET.Runtime.wasm.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_wasmSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/sample/Android/AndroidSampleApp.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/HelloWorld/HelloWorld.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/iOS/Program.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/console/ConsoleDelta.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/DeltaHelper/DeltaHelper.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.InTree.props
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.LocalBuild.props
23: <_NetCoreAppToolCurrent>net5.0</_NetCoreAppToolCurrent>
32: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
33: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
34: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(_NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/mono/wasm/wasm.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AotCompilerTask/MonoAOTCompiler.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
29: <FilesToPackageInclude="$(OutputPath)$(NetCoreAppToolCurrent)\$(AssemblyName).dll"TargetPath="tasks" />
src/tasks/AppleAppBuilder/AppleAppBuilder.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
src/tasks/WasmAppBuilder/WasmAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/WasmBuildTasks/WasmBuildTasks.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Coreclr.TestWrapper/Coreclr.TestWrapper.csproj
6: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/dir.sdkbuild.props
9: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Directory.Build.targets
137: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
src/tests/Common/external/external.csproj
15: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies/test_dependencies.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies_fs/test_dependencies.fsproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Directory.Build.props
133: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Directory.Build.targets
359: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
364: Include="$(ArtifactsBinDir)\MonoAOTCompiler\Debug\$(NetCoreAppToolCurrent)\**"
src/tests/JIT/Directed/tailcall/mutual_recursion.fsproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>

Then just a few questions, as I don't know if it's safe to just remap NetCoreAppToolCurrent to net6.0:

  1. Do we want to build and run tools we use for the product against a 6.0 version?
  2. I don't know about a lot of the tools that reference the net5.0 TFM. A bunch of them are mono tasks (AppleAppBuilder, WasmAppBuilder) and samles (like AndroidSampleApp). @directhex are those safe to move to net6.0?
  3. @trylek@davidwrighton@AntonLapounov is it safe to move the crossgen2 and dotnet-pgo projects to net6.0?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Yes, I realized that after posting the comment... The tasks are definitely fine to be upgraded. I think crossgen2 should be fine as well.

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.
Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.
The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Apparently, they way that coreclr uses the pkgproj infrastructure causes these failures. Likely because the props and targets files are imported directly there:

.packages/microsoft.dotnet.build.tasks.packaging/6.0.0-beta.21120.1/build/Packaging.targets(747,5): error MSB4018: (NETCORE_ENGINEERING_TELEMETRY=Build) The "GenerateRuntimeDependencies" task failed unexpectedly.
System.MissingMethodException: Method not found: 'Void NuGet.RuntimeModel.JsonObjectWriter..ctor(Newtonsoft.Json.JsonWriter)'.
at Microsoft.DotNet.Build.Tasks.Packaging.NuGetUtility.WriteRuntimeGraph(String filePath, RuntimeGraph runtimeGraph)
at Microsoft.DotNet.Build.Tasks.Packaging.GenerateRuntimeDependencies.Execute() in /_/src/Microsoft.DotNet.Build.Tasks.Packaging/src/GenerateRuntimeDependencies.cs:line 144
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)

@ericstj can you please help out here? I also updated the NuGet dependencies in Arcade and they already flowed into this PR. The binlog shows that the right assembly with the NuGet breaking change is used. It's unclear to me why there's a MissingMethodException.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

OK I got the fix ready in Arcade, and will update this PR tomorrow.

Comment threadeng/Tools.props
Comment threadsrc/installer/tests/Assets/TestUtils/TestProjects.targets
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@trylek@jkoritzinsky@hoyosjs can someone pls help me figure out why all runtime tests blow up with a 6.0 SDK? I don't even know how to repro this locally. Currently looking into the correlation payloads...

@ViktorHofer

ViktorHofer commented Feb 23, 2021

Copy link
Copy Markdown
MemberAuthor

Oh wow, I just noticed that the SDK value is hardcoded for the runtime tests to 5.0:

<DotNetCliVersion>5.0.0</DotNetCliVersion>

Questions that I have:

  • Why do the runtime tests need a runtime pack to be downloaded? Aren't the runtime tests using the live built shared framework?

@jkoritzinsky

Copy link
Copy Markdown
Member

The runtime tests themselves run on the built shared framework, but the xunit wrappers around the tests run on the CLI we pull down. Otherwise when something breaks that xunit uses, we lose all test coverage, which makes the problem harder to track down.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Thanks Jeremy. I would really love to hear more about what the xunit wrappers are for and why libraries and installer don't need them. Will probably ask about that at some point offline, as this isn't relevant for this PR.

@jkoritzinsky

Copy link
Copy Markdown
Member

The xunit wrappers execute the test and assert the return code matches the expected value. Without them, we wouldn’t have a good way to execute our tests and get an xunit test results file to upload to AzDO. We could use a different runner or create a new one (which we do for onboarding new targets), but the xunit system works well for now.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@safern@akoeplinger I think you guys touched the code that handles the xunit asset publishing with xharness. Can you please take a look at the error?

/__w/1/s/.dotnet/sdk/6.0.100-preview.2.21118.7/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(108,5): error NETSDK1148: Found multiple publish output files with the same relative path: /__w/1/s/artifacts/bin/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/artifacts/obj/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/.packages/xunit.abstractions/2.0.3/lib/netstandard2.0/xunit.abstractions.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.abstractions.dll, /__w/1/s/.packages/xunit.extensibility.core/2.4.1/lib/netstandard1.1/xunit.core.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.core.dll, /__w/1/s/.packages/xunit.extensibility.execution/2.4.1/lib/netstandard1.1/xunit.execution.dotnet.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.execution.dotnet.dll. [/__w/1/s/src/libraries/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj]

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

The remaining issue are duplicated xunit artifacts in mobile builds that @safern is currently looking at. I expect (or better to say hope) that we get this in by EOD.

@safernsafern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me.

@eerhardteerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I still don't understand why we need the empty TestProjects.targets file, but if you think it is valuable, then I'm OK with it.

@ViktorHoferViktorHofer changed the title Remove duplicated ILLink PackageReferenceRemove duplicated ILLink PackageReference and update target version of the SDK to 6.0Feb 24, 2021
@ghost

Copy link
Copy Markdown

Hello @ViktorHofer!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

DNS failures are #48751

@ViktorHofer
ViktorHofer merged commit 653b310 into dotnet:masterFeb 25, 2021
@ViktorHofer
ViktorHofer deleted the ILLinkFixPkgReferences branch February 25, 2021 10:23
@sdmaclea

Copy link
Copy Markdown
Contributor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

The march rollout updates the SDK's minimum required version (the sdk entry in the repo's global.json file). msbuild checks that version when its being invoked (including VS). The target version that was being updated as part of this PR is used for bootstrapping the repo local SDK.

@ghostghost locked as resolved and limited conversation to collaborators Mar 27, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

7 participants

@ViktorHofer@hoyosjs@jkoritzinsky@sdmaclea@eerhardt@joperezr@safern
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0 - #48462

Merged
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences
Feb 25, 2021
Merged

Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0#48462
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences

Conversation

@ViktorHofer

@ViktorHoferViktorHofer commented Feb 18, 2021

Copy link
Copy Markdown
Member

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes#48409
Fixes#44578
Fixes#46960

cc @missymessa

@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @ViktorHofer
See info in area-owners.md if you want to be subscribed.

Issue Details

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes https://github.com/dotnet/runtime

cc @missymessa

Author:ViktorHofer
Assignees:ViktorHofer
Labels:

area-Infrastructure

Milestone:6.0.0

Comment threadglobal.json Outdated
Comment threadeng/testing/linker/project.csproj.template Outdated
Comment threadeng/illink.targets Outdated
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Waiting for dotnet/linker#1842 to be merged so that I can consume the newer package.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@jkoritzinsky@hoyosjs can you please take a look at the coreclr error? Seems like the runtime hardcodes the 5.0.0 shared framework somewhere?

@hoyosjs

hoyosjs commented Feb 19, 2021

Copy link
Copy Markdown
Member

@ViktorHofer Yes, there are projects that run on 5.0. Namely:

References to `NetCoreAppToolCurrent`
Directory.Build.props
42: <NetCoreAppToolCurrentVersion>5.0</NetCoreAppToolCurrentVersion>
47: <NetCoreAppToolCurrent>net$(NetCoreAppToolCurrentVersion)</NetCoreAppToolCurrent>
48: <NetCoreAppCurrentToolTargetFrameworkMoniker>$(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppToolCurrentVersion)</NetCoreAppCurrentToolTargetFrameworkMoniker>
67: <AppleAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)'))</AppleAppBuilderDir>
68: <AndroidAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</AndroidAppBuilderDir>
69: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
70: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
71: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/coreclr/crossgen-corelib.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/runtime.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DacTableGen/DacTableGen.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DIALib/DIALib.ilproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/crossgen2/crossgen2.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.Diagnostics/ILCompiler.Diagnostics.csproj
7: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILCompiler.TypeSystem.ReadyToRun.Tests.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkGenerator.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rdump/R2RDump.csproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rtest/R2RTest.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/runincontext/runincontext.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/installer/tests/Directory.Build.props
12: <TestInfraTargetFramework>$(NetCoreAppToolCurrent)</TestInfraTargetFramework>
src/mono/llvm/llvm-init.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/monoaotcross.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/nuget/Microsoft.NET.Runtime.Android.Sample.Mono/Microsoft.NET.Runtime.Android.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_AndroidSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.iOS.Sample.Mono/Microsoft.NET.Runtime.iOS.Sample.Mono.pkgproj
17: <PackageFileInclude="@(_iOSSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/Microsoft.NET.Runtime.wasm.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_wasmSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/sample/Android/AndroidSampleApp.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/HelloWorld/HelloWorld.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/iOS/Program.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/console/ConsoleDelta.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/DeltaHelper/DeltaHelper.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.InTree.props
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.LocalBuild.props
23: <_NetCoreAppToolCurrent>net5.0</_NetCoreAppToolCurrent>
32: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
33: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
34: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(_NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/mono/wasm/wasm.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AotCompilerTask/MonoAOTCompiler.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
29: <FilesToPackageInclude="$(OutputPath)$(NetCoreAppToolCurrent)\$(AssemblyName).dll"TargetPath="tasks" />
src/tasks/AppleAppBuilder/AppleAppBuilder.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
src/tasks/WasmAppBuilder/WasmAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/WasmBuildTasks/WasmBuildTasks.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Coreclr.TestWrapper/Coreclr.TestWrapper.csproj
6: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/dir.sdkbuild.props
9: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Directory.Build.targets
137: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
src/tests/Common/external/external.csproj
15: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies/test_dependencies.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies_fs/test_dependencies.fsproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Directory.Build.props
133: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Directory.Build.targets
359: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
364: Include="$(ArtifactsBinDir)\MonoAOTCompiler\Debug\$(NetCoreAppToolCurrent)\**"
src/tests/JIT/Directed/tailcall/mutual_recursion.fsproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>

Then just a few questions, as I don't know if it's safe to just remap NetCoreAppToolCurrent to net6.0:

  1. Do we want to build and run tools we use for the product against a 6.0 version?
  2. I don't know about a lot of the tools that reference the net5.0 TFM. A bunch of them are mono tasks (AppleAppBuilder, WasmAppBuilder) and samles (like AndroidSampleApp). @directhex are those safe to move to net6.0?
  3. @trylek@davidwrighton@AntonLapounov is it safe to move the crossgen2 and dotnet-pgo projects to net6.0?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Yes, I realized that after posting the comment... The tasks are definitely fine to be upgraded. I think crossgen2 should be fine as well.

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.
Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.
The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Apparently, they way that coreclr uses the pkgproj infrastructure causes these failures. Likely because the props and targets files are imported directly there:

.packages/microsoft.dotnet.build.tasks.packaging/6.0.0-beta.21120.1/build/Packaging.targets(747,5): error MSB4018: (NETCORE_ENGINEERING_TELEMETRY=Build) The "GenerateRuntimeDependencies" task failed unexpectedly.
System.MissingMethodException: Method not found: 'Void NuGet.RuntimeModel.JsonObjectWriter..ctor(Newtonsoft.Json.JsonWriter)'.
at Microsoft.DotNet.Build.Tasks.Packaging.NuGetUtility.WriteRuntimeGraph(String filePath, RuntimeGraph runtimeGraph)
at Microsoft.DotNet.Build.Tasks.Packaging.GenerateRuntimeDependencies.Execute() in /_/src/Microsoft.DotNet.Build.Tasks.Packaging/src/GenerateRuntimeDependencies.cs:line 144
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)

@ericstj can you please help out here? I also updated the NuGet dependencies in Arcade and they already flowed into this PR. The binlog shows that the right assembly with the NuGet breaking change is used. It's unclear to me why there's a MissingMethodException.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

OK I got the fix ready in Arcade, and will update this PR tomorrow.

Comment threadeng/Tools.props
Comment threadsrc/installer/tests/Assets/TestUtils/TestProjects.targets
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@trylek@jkoritzinsky@hoyosjs can someone pls help me figure out why all runtime tests blow up with a 6.0 SDK? I don't even know how to repro this locally. Currently looking into the correlation payloads...

@ViktorHofer

ViktorHofer commented Feb 23, 2021

Copy link
Copy Markdown
MemberAuthor

Oh wow, I just noticed that the SDK value is hardcoded for the runtime tests to 5.0:

<DotNetCliVersion>5.0.0</DotNetCliVersion>

Questions that I have:

  • Why do the runtime tests need a runtime pack to be downloaded? Aren't the runtime tests using the live built shared framework?

@jkoritzinsky

Copy link
Copy Markdown
Member

The runtime tests themselves run on the built shared framework, but the xunit wrappers around the tests run on the CLI we pull down. Otherwise when something breaks that xunit uses, we lose all test coverage, which makes the problem harder to track down.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Thanks Jeremy. I would really love to hear more about what the xunit wrappers are for and why libraries and installer don't need them. Will probably ask about that at some point offline, as this isn't relevant for this PR.

@jkoritzinsky

Copy link
Copy Markdown
Member

The xunit wrappers execute the test and assert the return code matches the expected value. Without them, we wouldn’t have a good way to execute our tests and get an xunit test results file to upload to AzDO. We could use a different runner or create a new one (which we do for onboarding new targets), but the xunit system works well for now.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@safern@akoeplinger I think you guys touched the code that handles the xunit asset publishing with xharness. Can you please take a look at the error?

/__w/1/s/.dotnet/sdk/6.0.100-preview.2.21118.7/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(108,5): error NETSDK1148: Found multiple publish output files with the same relative path: /__w/1/s/artifacts/bin/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/artifacts/obj/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/.packages/xunit.abstractions/2.0.3/lib/netstandard2.0/xunit.abstractions.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.abstractions.dll, /__w/1/s/.packages/xunit.extensibility.core/2.4.1/lib/netstandard1.1/xunit.core.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.core.dll, /__w/1/s/.packages/xunit.extensibility.execution/2.4.1/lib/netstandard1.1/xunit.execution.dotnet.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.execution.dotnet.dll. [/__w/1/s/src/libraries/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj]

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

The remaining issue are duplicated xunit artifacts in mobile builds that @safern is currently looking at. I expect (or better to say hope) that we get this in by EOD.

@safernsafern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me.

@eerhardteerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I still don't understand why we need the empty TestProjects.targets file, but if you think it is valuable, then I'm OK with it.

@ViktorHoferViktorHofer changed the title Remove duplicated ILLink PackageReferenceRemove duplicated ILLink PackageReference and update target version of the SDK to 6.0Feb 24, 2021
@ghost

Copy link
Copy Markdown

Hello @ViktorHofer!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

DNS failures are #48751

@ViktorHofer
ViktorHofer merged commit 653b310 into dotnet:masterFeb 25, 2021
@ViktorHofer
ViktorHofer deleted the ILLinkFixPkgReferences branch February 25, 2021 10:23
@sdmaclea

Copy link
Copy Markdown
Contributor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

The march rollout updates the SDK's minimum required version (the sdk entry in the repo's global.json file). msbuild checks that version when its being invoked (including VS). The target version that was being updated as part of this PR is used for bootstrapping the repo local SDK.

@ghostghost locked as resolved and limited conversation to collaborators Mar 27, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

7 participants

@ViktorHofer@hoyosjs@jkoritzinsky@sdmaclea@eerhardt@joperezr@safern
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0 - #48462

Merged
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences
Feb 25, 2021
Merged

Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0#48462
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences

Conversation

@ViktorHofer

@ViktorHoferViktorHofer commented Feb 18, 2021

Copy link
Copy Markdown
Member

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes#48409
Fixes#44578
Fixes#46960

cc @missymessa

@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @ViktorHofer
See info in area-owners.md if you want to be subscribed.

Issue Details

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes https://github.com/dotnet/runtime

cc @missymessa

Author:ViktorHofer
Assignees:ViktorHofer
Labels:

area-Infrastructure

Milestone:6.0.0

Comment threadglobal.json Outdated
Comment threadeng/testing/linker/project.csproj.template Outdated
Comment threadeng/illink.targets Outdated
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Waiting for dotnet/linker#1842 to be merged so that I can consume the newer package.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@jkoritzinsky@hoyosjs can you please take a look at the coreclr error? Seems like the runtime hardcodes the 5.0.0 shared framework somewhere?

@hoyosjs

hoyosjs commented Feb 19, 2021

Copy link
Copy Markdown
Member

@ViktorHofer Yes, there are projects that run on 5.0. Namely:

References to `NetCoreAppToolCurrent`
Directory.Build.props
42: <NetCoreAppToolCurrentVersion>5.0</NetCoreAppToolCurrentVersion>
47: <NetCoreAppToolCurrent>net$(NetCoreAppToolCurrentVersion)</NetCoreAppToolCurrent>
48: <NetCoreAppCurrentToolTargetFrameworkMoniker>$(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppToolCurrentVersion)</NetCoreAppCurrentToolTargetFrameworkMoniker>
67: <AppleAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)'))</AppleAppBuilderDir>
68: <AndroidAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</AndroidAppBuilderDir>
69: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
70: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
71: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/coreclr/crossgen-corelib.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/runtime.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DacTableGen/DacTableGen.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DIALib/DIALib.ilproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/crossgen2/crossgen2.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.Diagnostics/ILCompiler.Diagnostics.csproj
7: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILCompiler.TypeSystem.ReadyToRun.Tests.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkGenerator.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rdump/R2RDump.csproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rtest/R2RTest.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/runincontext/runincontext.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/installer/tests/Directory.Build.props
12: <TestInfraTargetFramework>$(NetCoreAppToolCurrent)</TestInfraTargetFramework>
src/mono/llvm/llvm-init.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/monoaotcross.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/nuget/Microsoft.NET.Runtime.Android.Sample.Mono/Microsoft.NET.Runtime.Android.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_AndroidSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.iOS.Sample.Mono/Microsoft.NET.Runtime.iOS.Sample.Mono.pkgproj
17: <PackageFileInclude="@(_iOSSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/Microsoft.NET.Runtime.wasm.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_wasmSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/sample/Android/AndroidSampleApp.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/HelloWorld/HelloWorld.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/iOS/Program.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/console/ConsoleDelta.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/DeltaHelper/DeltaHelper.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.InTree.props
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.LocalBuild.props
23: <_NetCoreAppToolCurrent>net5.0</_NetCoreAppToolCurrent>
32: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
33: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
34: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(_NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/mono/wasm/wasm.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AotCompilerTask/MonoAOTCompiler.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
29: <FilesToPackageInclude="$(OutputPath)$(NetCoreAppToolCurrent)\$(AssemblyName).dll"TargetPath="tasks" />
src/tasks/AppleAppBuilder/AppleAppBuilder.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
src/tasks/WasmAppBuilder/WasmAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/WasmBuildTasks/WasmBuildTasks.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Coreclr.TestWrapper/Coreclr.TestWrapper.csproj
6: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/dir.sdkbuild.props
9: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Directory.Build.targets
137: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
src/tests/Common/external/external.csproj
15: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies/test_dependencies.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies_fs/test_dependencies.fsproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Directory.Build.props
133: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Directory.Build.targets
359: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
364: Include="$(ArtifactsBinDir)\MonoAOTCompiler\Debug\$(NetCoreAppToolCurrent)\**"
src/tests/JIT/Directed/tailcall/mutual_recursion.fsproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>

Then just a few questions, as I don't know if it's safe to just remap NetCoreAppToolCurrent to net6.0:

  1. Do we want to build and run tools we use for the product against a 6.0 version?
  2. I don't know about a lot of the tools that reference the net5.0 TFM. A bunch of them are mono tasks (AppleAppBuilder, WasmAppBuilder) and samles (like AndroidSampleApp). @directhex are those safe to move to net6.0?
  3. @trylek@davidwrighton@AntonLapounov is it safe to move the crossgen2 and dotnet-pgo projects to net6.0?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Yes, I realized that after posting the comment... The tasks are definitely fine to be upgraded. I think crossgen2 should be fine as well.

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.
Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.
The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Apparently, they way that coreclr uses the pkgproj infrastructure causes these failures. Likely because the props and targets files are imported directly there:

.packages/microsoft.dotnet.build.tasks.packaging/6.0.0-beta.21120.1/build/Packaging.targets(747,5): error MSB4018: (NETCORE_ENGINEERING_TELEMETRY=Build) The "GenerateRuntimeDependencies" task failed unexpectedly.
System.MissingMethodException: Method not found: 'Void NuGet.RuntimeModel.JsonObjectWriter..ctor(Newtonsoft.Json.JsonWriter)'.
at Microsoft.DotNet.Build.Tasks.Packaging.NuGetUtility.WriteRuntimeGraph(String filePath, RuntimeGraph runtimeGraph)
at Microsoft.DotNet.Build.Tasks.Packaging.GenerateRuntimeDependencies.Execute() in /_/src/Microsoft.DotNet.Build.Tasks.Packaging/src/GenerateRuntimeDependencies.cs:line 144
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)

@ericstj can you please help out here? I also updated the NuGet dependencies in Arcade and they already flowed into this PR. The binlog shows that the right assembly with the NuGet breaking change is used. It's unclear to me why there's a MissingMethodException.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

OK I got the fix ready in Arcade, and will update this PR tomorrow.

Comment threadeng/Tools.props
Comment threadsrc/installer/tests/Assets/TestUtils/TestProjects.targets
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@trylek@jkoritzinsky@hoyosjs can someone pls help me figure out why all runtime tests blow up with a 6.0 SDK? I don't even know how to repro this locally. Currently looking into the correlation payloads...

@ViktorHofer

ViktorHofer commented Feb 23, 2021

Copy link
Copy Markdown
MemberAuthor

Oh wow, I just noticed that the SDK value is hardcoded for the runtime tests to 5.0:

<DotNetCliVersion>5.0.0</DotNetCliVersion>

Questions that I have:

  • Why do the runtime tests need a runtime pack to be downloaded? Aren't the runtime tests using the live built shared framework?

@jkoritzinsky

Copy link
Copy Markdown
Member

The runtime tests themselves run on the built shared framework, but the xunit wrappers around the tests run on the CLI we pull down. Otherwise when something breaks that xunit uses, we lose all test coverage, which makes the problem harder to track down.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Thanks Jeremy. I would really love to hear more about what the xunit wrappers are for and why libraries and installer don't need them. Will probably ask about that at some point offline, as this isn't relevant for this PR.

@jkoritzinsky

Copy link
Copy Markdown
Member

The xunit wrappers execute the test and assert the return code matches the expected value. Without them, we wouldn’t have a good way to execute our tests and get an xunit test results file to upload to AzDO. We could use a different runner or create a new one (which we do for onboarding new targets), but the xunit system works well for now.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@safern@akoeplinger I think you guys touched the code that handles the xunit asset publishing with xharness. Can you please take a look at the error?

/__w/1/s/.dotnet/sdk/6.0.100-preview.2.21118.7/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(108,5): error NETSDK1148: Found multiple publish output files with the same relative path: /__w/1/s/artifacts/bin/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/artifacts/obj/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/.packages/xunit.abstractions/2.0.3/lib/netstandard2.0/xunit.abstractions.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.abstractions.dll, /__w/1/s/.packages/xunit.extensibility.core/2.4.1/lib/netstandard1.1/xunit.core.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.core.dll, /__w/1/s/.packages/xunit.extensibility.execution/2.4.1/lib/netstandard1.1/xunit.execution.dotnet.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.execution.dotnet.dll. [/__w/1/s/src/libraries/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj]

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

The remaining issue are duplicated xunit artifacts in mobile builds that @safern is currently looking at. I expect (or better to say hope) that we get this in by EOD.

@safernsafern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me.

@eerhardteerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I still don't understand why we need the empty TestProjects.targets file, but if you think it is valuable, then I'm OK with it.

@ViktorHoferViktorHofer changed the title Remove duplicated ILLink PackageReferenceRemove duplicated ILLink PackageReference and update target version of the SDK to 6.0Feb 24, 2021
@ghost

Copy link
Copy Markdown

Hello @ViktorHofer!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

DNS failures are #48751

@ViktorHofer
ViktorHofer merged commit 653b310 into dotnet:masterFeb 25, 2021
@ViktorHofer
ViktorHofer deleted the ILLinkFixPkgReferences branch February 25, 2021 10:23
@sdmaclea

Copy link
Copy Markdown
Contributor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

The march rollout updates the SDK's minimum required version (the sdk entry in the repo's global.json file). msbuild checks that version when its being invoked (including VS). The target version that was being updated as part of this PR is used for bootstrapping the repo local SDK.

@ghostghost locked as resolved and limited conversation to collaborators Mar 27, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

7 participants

@ViktorHofer@hoyosjs@jkoritzinsky@sdmaclea@eerhardt@joperezr@safern
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0 - #48462

Merged
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences
Feb 25, 2021
Merged

Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0#48462
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences

Conversation

@ViktorHofer

@ViktorHoferViktorHofer commented Feb 18, 2021

Copy link
Copy Markdown
Member

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes#48409
Fixes#44578
Fixes#46960

cc @missymessa

@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @ViktorHofer
See info in area-owners.md if you want to be subscribed.

Issue Details

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes https://github.com/dotnet/runtime

cc @missymessa

Author:ViktorHofer
Assignees:ViktorHofer
Labels:

area-Infrastructure

Milestone:6.0.0

Comment threadglobal.json Outdated
Comment threadeng/testing/linker/project.csproj.template Outdated
Comment threadeng/illink.targets Outdated
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Waiting for dotnet/linker#1842 to be merged so that I can consume the newer package.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@jkoritzinsky@hoyosjs can you please take a look at the coreclr error? Seems like the runtime hardcodes the 5.0.0 shared framework somewhere?

@hoyosjs

hoyosjs commented Feb 19, 2021

Copy link
Copy Markdown
Member

@ViktorHofer Yes, there are projects that run on 5.0. Namely:

References to `NetCoreAppToolCurrent`
Directory.Build.props
42: <NetCoreAppToolCurrentVersion>5.0</NetCoreAppToolCurrentVersion>
47: <NetCoreAppToolCurrent>net$(NetCoreAppToolCurrentVersion)</NetCoreAppToolCurrent>
48: <NetCoreAppCurrentToolTargetFrameworkMoniker>$(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppToolCurrentVersion)</NetCoreAppCurrentToolTargetFrameworkMoniker>
67: <AppleAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)'))</AppleAppBuilderDir>
68: <AndroidAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</AndroidAppBuilderDir>
69: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
70: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
71: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/coreclr/crossgen-corelib.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/runtime.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DacTableGen/DacTableGen.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DIALib/DIALib.ilproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/crossgen2/crossgen2.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.Diagnostics/ILCompiler.Diagnostics.csproj
7: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILCompiler.TypeSystem.ReadyToRun.Tests.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkGenerator.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rdump/R2RDump.csproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rtest/R2RTest.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/runincontext/runincontext.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/installer/tests/Directory.Build.props
12: <TestInfraTargetFramework>$(NetCoreAppToolCurrent)</TestInfraTargetFramework>
src/mono/llvm/llvm-init.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/monoaotcross.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/nuget/Microsoft.NET.Runtime.Android.Sample.Mono/Microsoft.NET.Runtime.Android.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_AndroidSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.iOS.Sample.Mono/Microsoft.NET.Runtime.iOS.Sample.Mono.pkgproj
17: <PackageFileInclude="@(_iOSSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/Microsoft.NET.Runtime.wasm.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_wasmSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/sample/Android/AndroidSampleApp.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/HelloWorld/HelloWorld.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/iOS/Program.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/console/ConsoleDelta.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/DeltaHelper/DeltaHelper.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.InTree.props
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.LocalBuild.props
23: <_NetCoreAppToolCurrent>net5.0</_NetCoreAppToolCurrent>
32: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
33: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
34: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(_NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/mono/wasm/wasm.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AotCompilerTask/MonoAOTCompiler.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
29: <FilesToPackageInclude="$(OutputPath)$(NetCoreAppToolCurrent)\$(AssemblyName).dll"TargetPath="tasks" />
src/tasks/AppleAppBuilder/AppleAppBuilder.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
src/tasks/WasmAppBuilder/WasmAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/WasmBuildTasks/WasmBuildTasks.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Coreclr.TestWrapper/Coreclr.TestWrapper.csproj
6: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/dir.sdkbuild.props
9: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Directory.Build.targets
137: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
src/tests/Common/external/external.csproj
15: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies/test_dependencies.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies_fs/test_dependencies.fsproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Directory.Build.props
133: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Directory.Build.targets
359: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
364: Include="$(ArtifactsBinDir)\MonoAOTCompiler\Debug\$(NetCoreAppToolCurrent)\**"
src/tests/JIT/Directed/tailcall/mutual_recursion.fsproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>

Then just a few questions, as I don't know if it's safe to just remap NetCoreAppToolCurrent to net6.0:

  1. Do we want to build and run tools we use for the product against a 6.0 version?
  2. I don't know about a lot of the tools that reference the net5.0 TFM. A bunch of them are mono tasks (AppleAppBuilder, WasmAppBuilder) and samles (like AndroidSampleApp). @directhex are those safe to move to net6.0?
  3. @trylek@davidwrighton@AntonLapounov is it safe to move the crossgen2 and dotnet-pgo projects to net6.0?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Yes, I realized that after posting the comment... The tasks are definitely fine to be upgraded. I think crossgen2 should be fine as well.

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.
Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.
The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Apparently, they way that coreclr uses the pkgproj infrastructure causes these failures. Likely because the props and targets files are imported directly there:

.packages/microsoft.dotnet.build.tasks.packaging/6.0.0-beta.21120.1/build/Packaging.targets(747,5): error MSB4018: (NETCORE_ENGINEERING_TELEMETRY=Build) The "GenerateRuntimeDependencies" task failed unexpectedly.
System.MissingMethodException: Method not found: 'Void NuGet.RuntimeModel.JsonObjectWriter..ctor(Newtonsoft.Json.JsonWriter)'.
at Microsoft.DotNet.Build.Tasks.Packaging.NuGetUtility.WriteRuntimeGraph(String filePath, RuntimeGraph runtimeGraph)
at Microsoft.DotNet.Build.Tasks.Packaging.GenerateRuntimeDependencies.Execute() in /_/src/Microsoft.DotNet.Build.Tasks.Packaging/src/GenerateRuntimeDependencies.cs:line 144
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)

@ericstj can you please help out here? I also updated the NuGet dependencies in Arcade and they already flowed into this PR. The binlog shows that the right assembly with the NuGet breaking change is used. It's unclear to me why there's a MissingMethodException.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

OK I got the fix ready in Arcade, and will update this PR tomorrow.

Comment threadeng/Tools.props
Comment threadsrc/installer/tests/Assets/TestUtils/TestProjects.targets
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@trylek@jkoritzinsky@hoyosjs can someone pls help me figure out why all runtime tests blow up with a 6.0 SDK? I don't even know how to repro this locally. Currently looking into the correlation payloads...

@ViktorHofer

ViktorHofer commented Feb 23, 2021

Copy link
Copy Markdown
MemberAuthor

Oh wow, I just noticed that the SDK value is hardcoded for the runtime tests to 5.0:

<DotNetCliVersion>5.0.0</DotNetCliVersion>

Questions that I have:

  • Why do the runtime tests need a runtime pack to be downloaded? Aren't the runtime tests using the live built shared framework?

@jkoritzinsky

Copy link
Copy Markdown
Member

The runtime tests themselves run on the built shared framework, but the xunit wrappers around the tests run on the CLI we pull down. Otherwise when something breaks that xunit uses, we lose all test coverage, which makes the problem harder to track down.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Thanks Jeremy. I would really love to hear more about what the xunit wrappers are for and why libraries and installer don't need them. Will probably ask about that at some point offline, as this isn't relevant for this PR.

@jkoritzinsky

Copy link
Copy Markdown
Member

The xunit wrappers execute the test and assert the return code matches the expected value. Without them, we wouldn’t have a good way to execute our tests and get an xunit test results file to upload to AzDO. We could use a different runner or create a new one (which we do for onboarding new targets), but the xunit system works well for now.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@safern@akoeplinger I think you guys touched the code that handles the xunit asset publishing with xharness. Can you please take a look at the error?

/__w/1/s/.dotnet/sdk/6.0.100-preview.2.21118.7/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(108,5): error NETSDK1148: Found multiple publish output files with the same relative path: /__w/1/s/artifacts/bin/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/artifacts/obj/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/.packages/xunit.abstractions/2.0.3/lib/netstandard2.0/xunit.abstractions.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.abstractions.dll, /__w/1/s/.packages/xunit.extensibility.core/2.4.1/lib/netstandard1.1/xunit.core.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.core.dll, /__w/1/s/.packages/xunit.extensibility.execution/2.4.1/lib/netstandard1.1/xunit.execution.dotnet.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.execution.dotnet.dll. [/__w/1/s/src/libraries/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj]

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

The remaining issue are duplicated xunit artifacts in mobile builds that @safern is currently looking at. I expect (or better to say hope) that we get this in by EOD.

@safernsafern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me.

@eerhardteerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I still don't understand why we need the empty TestProjects.targets file, but if you think it is valuable, then I'm OK with it.

@ViktorHoferViktorHofer changed the title Remove duplicated ILLink PackageReferenceRemove duplicated ILLink PackageReference and update target version of the SDK to 6.0Feb 24, 2021
@ghost

Copy link
Copy Markdown

Hello @ViktorHofer!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

DNS failures are #48751

@ViktorHofer
ViktorHofer merged commit 653b310 into dotnet:masterFeb 25, 2021
@ViktorHofer
ViktorHofer deleted the ILLinkFixPkgReferences branch February 25, 2021 10:23
@sdmaclea

Copy link
Copy Markdown
Contributor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

The march rollout updates the SDK's minimum required version (the sdk entry in the repo's global.json file). msbuild checks that version when its being invoked (including VS). The target version that was being updated as part of this PR is used for bootstrapping the repo local SDK.

@ghostghost locked as resolved and limited conversation to collaborators Mar 27, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

7 participants

@ViktorHofer@hoyosjs@jkoritzinsky@sdmaclea@eerhardt@joperezr@safern
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0 - #48462

Merged
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences
Feb 25, 2021
Merged

Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0#48462
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences

Conversation

@ViktorHofer

@ViktorHoferViktorHofer commented Feb 18, 2021

Copy link
Copy Markdown
Member

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes#48409
Fixes#44578
Fixes#46960

cc @missymessa

@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @ViktorHofer
See info in area-owners.md if you want to be subscribed.

Issue Details

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes https://github.com/dotnet/runtime

cc @missymessa

Author:ViktorHofer
Assignees:ViktorHofer
Labels:

area-Infrastructure

Milestone:6.0.0

Comment threadglobal.json Outdated
Comment threadeng/testing/linker/project.csproj.template Outdated
Comment threadeng/illink.targets Outdated
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Waiting for dotnet/linker#1842 to be merged so that I can consume the newer package.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@jkoritzinsky@hoyosjs can you please take a look at the coreclr error? Seems like the runtime hardcodes the 5.0.0 shared framework somewhere?

@hoyosjs

hoyosjs commented Feb 19, 2021

Copy link
Copy Markdown
Member

@ViktorHofer Yes, there are projects that run on 5.0. Namely:

References to `NetCoreAppToolCurrent`
Directory.Build.props
42: <NetCoreAppToolCurrentVersion>5.0</NetCoreAppToolCurrentVersion>
47: <NetCoreAppToolCurrent>net$(NetCoreAppToolCurrentVersion)</NetCoreAppToolCurrent>
48: <NetCoreAppCurrentToolTargetFrameworkMoniker>$(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppToolCurrentVersion)</NetCoreAppCurrentToolTargetFrameworkMoniker>
67: <AppleAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)'))</AppleAppBuilderDir>
68: <AndroidAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</AndroidAppBuilderDir>
69: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
70: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
71: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/coreclr/crossgen-corelib.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/runtime.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DacTableGen/DacTableGen.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DIALib/DIALib.ilproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/crossgen2/crossgen2.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.Diagnostics/ILCompiler.Diagnostics.csproj
7: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILCompiler.TypeSystem.ReadyToRun.Tests.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkGenerator.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rdump/R2RDump.csproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rtest/R2RTest.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/runincontext/runincontext.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/installer/tests/Directory.Build.props
12: <TestInfraTargetFramework>$(NetCoreAppToolCurrent)</TestInfraTargetFramework>
src/mono/llvm/llvm-init.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/monoaotcross.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/nuget/Microsoft.NET.Runtime.Android.Sample.Mono/Microsoft.NET.Runtime.Android.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_AndroidSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.iOS.Sample.Mono/Microsoft.NET.Runtime.iOS.Sample.Mono.pkgproj
17: <PackageFileInclude="@(_iOSSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/Microsoft.NET.Runtime.wasm.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_wasmSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/sample/Android/AndroidSampleApp.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/HelloWorld/HelloWorld.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/iOS/Program.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/console/ConsoleDelta.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/DeltaHelper/DeltaHelper.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.InTree.props
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.LocalBuild.props
23: <_NetCoreAppToolCurrent>net5.0</_NetCoreAppToolCurrent>
32: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
33: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
34: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(_NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/mono/wasm/wasm.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AotCompilerTask/MonoAOTCompiler.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
29: <FilesToPackageInclude="$(OutputPath)$(NetCoreAppToolCurrent)\$(AssemblyName).dll"TargetPath="tasks" />
src/tasks/AppleAppBuilder/AppleAppBuilder.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
src/tasks/WasmAppBuilder/WasmAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/WasmBuildTasks/WasmBuildTasks.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Coreclr.TestWrapper/Coreclr.TestWrapper.csproj
6: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/dir.sdkbuild.props
9: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Directory.Build.targets
137: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
src/tests/Common/external/external.csproj
15: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies/test_dependencies.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies_fs/test_dependencies.fsproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Directory.Build.props
133: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Directory.Build.targets
359: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
364: Include="$(ArtifactsBinDir)\MonoAOTCompiler\Debug\$(NetCoreAppToolCurrent)\**"
src/tests/JIT/Directed/tailcall/mutual_recursion.fsproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>

Then just a few questions, as I don't know if it's safe to just remap NetCoreAppToolCurrent to net6.0:

  1. Do we want to build and run tools we use for the product against a 6.0 version?
  2. I don't know about a lot of the tools that reference the net5.0 TFM. A bunch of them are mono tasks (AppleAppBuilder, WasmAppBuilder) and samles (like AndroidSampleApp). @directhex are those safe to move to net6.0?
  3. @trylek@davidwrighton@AntonLapounov is it safe to move the crossgen2 and dotnet-pgo projects to net6.0?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Yes, I realized that after posting the comment... The tasks are definitely fine to be upgraded. I think crossgen2 should be fine as well.

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.
Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.
The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Apparently, they way that coreclr uses the pkgproj infrastructure causes these failures. Likely because the props and targets files are imported directly there:

.packages/microsoft.dotnet.build.tasks.packaging/6.0.0-beta.21120.1/build/Packaging.targets(747,5): error MSB4018: (NETCORE_ENGINEERING_TELEMETRY=Build) The "GenerateRuntimeDependencies" task failed unexpectedly.
System.MissingMethodException: Method not found: 'Void NuGet.RuntimeModel.JsonObjectWriter..ctor(Newtonsoft.Json.JsonWriter)'.
at Microsoft.DotNet.Build.Tasks.Packaging.NuGetUtility.WriteRuntimeGraph(String filePath, RuntimeGraph runtimeGraph)
at Microsoft.DotNet.Build.Tasks.Packaging.GenerateRuntimeDependencies.Execute() in /_/src/Microsoft.DotNet.Build.Tasks.Packaging/src/GenerateRuntimeDependencies.cs:line 144
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)

@ericstj can you please help out here? I also updated the NuGet dependencies in Arcade and they already flowed into this PR. The binlog shows that the right assembly with the NuGet breaking change is used. It's unclear to me why there's a MissingMethodException.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

OK I got the fix ready in Arcade, and will update this PR tomorrow.

Comment threadeng/Tools.props
Comment threadsrc/installer/tests/Assets/TestUtils/TestProjects.targets
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@trylek@jkoritzinsky@hoyosjs can someone pls help me figure out why all runtime tests blow up with a 6.0 SDK? I don't even know how to repro this locally. Currently looking into the correlation payloads...

@ViktorHofer

ViktorHofer commented Feb 23, 2021

Copy link
Copy Markdown
MemberAuthor

Oh wow, I just noticed that the SDK value is hardcoded for the runtime tests to 5.0:

<DotNetCliVersion>5.0.0</DotNetCliVersion>

Questions that I have:

  • Why do the runtime tests need a runtime pack to be downloaded? Aren't the runtime tests using the live built shared framework?

@jkoritzinsky

Copy link
Copy Markdown
Member

The runtime tests themselves run on the built shared framework, but the xunit wrappers around the tests run on the CLI we pull down. Otherwise when something breaks that xunit uses, we lose all test coverage, which makes the problem harder to track down.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Thanks Jeremy. I would really love to hear more about what the xunit wrappers are for and why libraries and installer don't need them. Will probably ask about that at some point offline, as this isn't relevant for this PR.

@jkoritzinsky

Copy link
Copy Markdown
Member

The xunit wrappers execute the test and assert the return code matches the expected value. Without them, we wouldn’t have a good way to execute our tests and get an xunit test results file to upload to AzDO. We could use a different runner or create a new one (which we do for onboarding new targets), but the xunit system works well for now.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@safern@akoeplinger I think you guys touched the code that handles the xunit asset publishing with xharness. Can you please take a look at the error?

/__w/1/s/.dotnet/sdk/6.0.100-preview.2.21118.7/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(108,5): error NETSDK1148: Found multiple publish output files with the same relative path: /__w/1/s/artifacts/bin/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/artifacts/obj/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/.packages/xunit.abstractions/2.0.3/lib/netstandard2.0/xunit.abstractions.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.abstractions.dll, /__w/1/s/.packages/xunit.extensibility.core/2.4.1/lib/netstandard1.1/xunit.core.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.core.dll, /__w/1/s/.packages/xunit.extensibility.execution/2.4.1/lib/netstandard1.1/xunit.execution.dotnet.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.execution.dotnet.dll. [/__w/1/s/src/libraries/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj]

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

The remaining issue are duplicated xunit artifacts in mobile builds that @safern is currently looking at. I expect (or better to say hope) that we get this in by EOD.

@safernsafern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me.

@eerhardteerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I still don't understand why we need the empty TestProjects.targets file, but if you think it is valuable, then I'm OK with it.

@ViktorHoferViktorHofer changed the title Remove duplicated ILLink PackageReferenceRemove duplicated ILLink PackageReference and update target version of the SDK to 6.0Feb 24, 2021
@ghost

Copy link
Copy Markdown

Hello @ViktorHofer!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

DNS failures are #48751

@ViktorHofer
ViktorHofer merged commit 653b310 into dotnet:masterFeb 25, 2021
@ViktorHofer
ViktorHofer deleted the ILLinkFixPkgReferences branch February 25, 2021 10:23
@sdmaclea

Copy link
Copy Markdown
Contributor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

The march rollout updates the SDK's minimum required version (the sdk entry in the repo's global.json file). msbuild checks that version when its being invoked (including VS). The target version that was being updated as part of this PR is used for bootstrapping the repo local SDK.

@ghostghost locked as resolved and limited conversation to collaborators Mar 27, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

7 participants

@ViktorHofer@hoyosjs@jkoritzinsky@sdmaclea@eerhardt@joperezr@safern
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0 - #48462

Merged
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences
Feb 25, 2021
Merged

Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0#48462
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences

Conversation

@ViktorHofer

@ViktorHoferViktorHofer commented Feb 18, 2021

Copy link
Copy Markdown
Member

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes#48409
Fixes#44578
Fixes#46960

cc @missymessa

@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @ViktorHofer
See info in area-owners.md if you want to be subscribed.

Issue Details

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes https://github.com/dotnet/runtime

cc @missymessa

Author:ViktorHofer
Assignees:ViktorHofer
Labels:

area-Infrastructure

Milestone:6.0.0

Comment threadglobal.json Outdated
Comment threadeng/testing/linker/project.csproj.template Outdated
Comment threadeng/illink.targets Outdated
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Waiting for dotnet/linker#1842 to be merged so that I can consume the newer package.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@jkoritzinsky@hoyosjs can you please take a look at the coreclr error? Seems like the runtime hardcodes the 5.0.0 shared framework somewhere?

@hoyosjs

hoyosjs commented Feb 19, 2021

Copy link
Copy Markdown
Member

@ViktorHofer Yes, there are projects that run on 5.0. Namely:

References to `NetCoreAppToolCurrent`
Directory.Build.props
42: <NetCoreAppToolCurrentVersion>5.0</NetCoreAppToolCurrentVersion>
47: <NetCoreAppToolCurrent>net$(NetCoreAppToolCurrentVersion)</NetCoreAppToolCurrent>
48: <NetCoreAppCurrentToolTargetFrameworkMoniker>$(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppToolCurrentVersion)</NetCoreAppCurrentToolTargetFrameworkMoniker>
67: <AppleAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)'))</AppleAppBuilderDir>
68: <AndroidAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</AndroidAppBuilderDir>
69: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
70: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
71: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/coreclr/crossgen-corelib.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/runtime.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DacTableGen/DacTableGen.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DIALib/DIALib.ilproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/crossgen2/crossgen2.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.Diagnostics/ILCompiler.Diagnostics.csproj
7: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILCompiler.TypeSystem.ReadyToRun.Tests.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkGenerator.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rdump/R2RDump.csproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rtest/R2RTest.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/runincontext/runincontext.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/installer/tests/Directory.Build.props
12: <TestInfraTargetFramework>$(NetCoreAppToolCurrent)</TestInfraTargetFramework>
src/mono/llvm/llvm-init.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/monoaotcross.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/nuget/Microsoft.NET.Runtime.Android.Sample.Mono/Microsoft.NET.Runtime.Android.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_AndroidSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.iOS.Sample.Mono/Microsoft.NET.Runtime.iOS.Sample.Mono.pkgproj
17: <PackageFileInclude="@(_iOSSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/Microsoft.NET.Runtime.wasm.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_wasmSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/sample/Android/AndroidSampleApp.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/HelloWorld/HelloWorld.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/iOS/Program.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/console/ConsoleDelta.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/DeltaHelper/DeltaHelper.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.InTree.props
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.LocalBuild.props
23: <_NetCoreAppToolCurrent>net5.0</_NetCoreAppToolCurrent>
32: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
33: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
34: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(_NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/mono/wasm/wasm.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AotCompilerTask/MonoAOTCompiler.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
29: <FilesToPackageInclude="$(OutputPath)$(NetCoreAppToolCurrent)\$(AssemblyName).dll"TargetPath="tasks" />
src/tasks/AppleAppBuilder/AppleAppBuilder.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
src/tasks/WasmAppBuilder/WasmAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/WasmBuildTasks/WasmBuildTasks.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Coreclr.TestWrapper/Coreclr.TestWrapper.csproj
6: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/dir.sdkbuild.props
9: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Directory.Build.targets
137: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
src/tests/Common/external/external.csproj
15: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies/test_dependencies.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies_fs/test_dependencies.fsproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Directory.Build.props
133: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Directory.Build.targets
359: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
364: Include="$(ArtifactsBinDir)\MonoAOTCompiler\Debug\$(NetCoreAppToolCurrent)\**"
src/tests/JIT/Directed/tailcall/mutual_recursion.fsproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>

Then just a few questions, as I don't know if it's safe to just remap NetCoreAppToolCurrent to net6.0:

  1. Do we want to build and run tools we use for the product against a 6.0 version?
  2. I don't know about a lot of the tools that reference the net5.0 TFM. A bunch of them are mono tasks (AppleAppBuilder, WasmAppBuilder) and samles (like AndroidSampleApp). @directhex are those safe to move to net6.0?
  3. @trylek@davidwrighton@AntonLapounov is it safe to move the crossgen2 and dotnet-pgo projects to net6.0?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Yes, I realized that after posting the comment... The tasks are definitely fine to be upgraded. I think crossgen2 should be fine as well.

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.
Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.
The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Apparently, they way that coreclr uses the pkgproj infrastructure causes these failures. Likely because the props and targets files are imported directly there:

.packages/microsoft.dotnet.build.tasks.packaging/6.0.0-beta.21120.1/build/Packaging.targets(747,5): error MSB4018: (NETCORE_ENGINEERING_TELEMETRY=Build) The "GenerateRuntimeDependencies" task failed unexpectedly.
System.MissingMethodException: Method not found: 'Void NuGet.RuntimeModel.JsonObjectWriter..ctor(Newtonsoft.Json.JsonWriter)'.
at Microsoft.DotNet.Build.Tasks.Packaging.NuGetUtility.WriteRuntimeGraph(String filePath, RuntimeGraph runtimeGraph)
at Microsoft.DotNet.Build.Tasks.Packaging.GenerateRuntimeDependencies.Execute() in /_/src/Microsoft.DotNet.Build.Tasks.Packaging/src/GenerateRuntimeDependencies.cs:line 144
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)

@ericstj can you please help out here? I also updated the NuGet dependencies in Arcade and they already flowed into this PR. The binlog shows that the right assembly with the NuGet breaking change is used. It's unclear to me why there's a MissingMethodException.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

OK I got the fix ready in Arcade, and will update this PR tomorrow.

Comment threadeng/Tools.props
Comment threadsrc/installer/tests/Assets/TestUtils/TestProjects.targets
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@trylek@jkoritzinsky@hoyosjs can someone pls help me figure out why all runtime tests blow up with a 6.0 SDK? I don't even know how to repro this locally. Currently looking into the correlation payloads...

@ViktorHofer

ViktorHofer commented Feb 23, 2021

Copy link
Copy Markdown
MemberAuthor

Oh wow, I just noticed that the SDK value is hardcoded for the runtime tests to 5.0:

<DotNetCliVersion>5.0.0</DotNetCliVersion>

Questions that I have:

  • Why do the runtime tests need a runtime pack to be downloaded? Aren't the runtime tests using the live built shared framework?

@jkoritzinsky

Copy link
Copy Markdown
Member

The runtime tests themselves run on the built shared framework, but the xunit wrappers around the tests run on the CLI we pull down. Otherwise when something breaks that xunit uses, we lose all test coverage, which makes the problem harder to track down.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Thanks Jeremy. I would really love to hear more about what the xunit wrappers are for and why libraries and installer don't need them. Will probably ask about that at some point offline, as this isn't relevant for this PR.

@jkoritzinsky

Copy link
Copy Markdown
Member

The xunit wrappers execute the test and assert the return code matches the expected value. Without them, we wouldn’t have a good way to execute our tests and get an xunit test results file to upload to AzDO. We could use a different runner or create a new one (which we do for onboarding new targets), but the xunit system works well for now.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@safern@akoeplinger I think you guys touched the code that handles the xunit asset publishing with xharness. Can you please take a look at the error?

/__w/1/s/.dotnet/sdk/6.0.100-preview.2.21118.7/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(108,5): error NETSDK1148: Found multiple publish output files with the same relative path: /__w/1/s/artifacts/bin/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/artifacts/obj/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/.packages/xunit.abstractions/2.0.3/lib/netstandard2.0/xunit.abstractions.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.abstractions.dll, /__w/1/s/.packages/xunit.extensibility.core/2.4.1/lib/netstandard1.1/xunit.core.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.core.dll, /__w/1/s/.packages/xunit.extensibility.execution/2.4.1/lib/netstandard1.1/xunit.execution.dotnet.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.execution.dotnet.dll. [/__w/1/s/src/libraries/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj]

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

The remaining issue are duplicated xunit artifacts in mobile builds that @safern is currently looking at. I expect (or better to say hope) that we get this in by EOD.

@safernsafern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me.

@eerhardteerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I still don't understand why we need the empty TestProjects.targets file, but if you think it is valuable, then I'm OK with it.

@ViktorHoferViktorHofer changed the title Remove duplicated ILLink PackageReferenceRemove duplicated ILLink PackageReference and update target version of the SDK to 6.0Feb 24, 2021
@ghost

Copy link
Copy Markdown

Hello @ViktorHofer!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

DNS failures are #48751

@ViktorHofer
ViktorHofer merged commit 653b310 into dotnet:masterFeb 25, 2021
@ViktorHofer
ViktorHofer deleted the ILLinkFixPkgReferences branch February 25, 2021 10:23
@sdmaclea

Copy link
Copy Markdown
Contributor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

The march rollout updates the SDK's minimum required version (the sdk entry in the repo's global.json file). msbuild checks that version when its being invoked (including VS). The target version that was being updated as part of this PR is used for bootstrapping the repo local SDK.

@ghostghost locked as resolved and limited conversation to collaborators Mar 27, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

7 participants

@ViktorHofer@hoyosjs@jkoritzinsky@sdmaclea@eerhardt@joperezr@safern
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0 - #48462

Merged
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences
Feb 25, 2021
Merged

Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0#48462
ViktorHofer merged 14 commits into
dotnet:masterfrom
ViktorHofer:ILLinkFixPkgReferences

Conversation

@ViktorHofer

@ViktorHoferViktorHofer commented Feb 18, 2021

Copy link
Copy Markdown
Member

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes#48409
Fixes#44578
Fixes#46960

cc @missymessa

@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @ViktorHofer
See info in area-owners.md if you want to be subscribed.

Issue Details

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

Fixes https://github.com/dotnet/runtime

cc @missymessa

Author:ViktorHofer
Assignees:ViktorHofer
Labels:

area-Infrastructure

Milestone:6.0.0

Comment threadglobal.json Outdated
Comment threadeng/testing/linker/project.csproj.template Outdated
Comment threadeng/illink.targets Outdated
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Waiting for dotnet/linker#1842 to be merged so that I can consume the newer package.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@jkoritzinsky@hoyosjs can you please take a look at the coreclr error? Seems like the runtime hardcodes the 5.0.0 shared framework somewhere?

@hoyosjs

hoyosjs commented Feb 19, 2021

Copy link
Copy Markdown
Member

@ViktorHofer Yes, there are projects that run on 5.0. Namely:

References to `NetCoreAppToolCurrent`
Directory.Build.props
42: <NetCoreAppToolCurrentVersion>5.0</NetCoreAppToolCurrentVersion>
47: <NetCoreAppToolCurrent>net$(NetCoreAppToolCurrentVersion)</NetCoreAppToolCurrent>
48: <NetCoreAppCurrentToolTargetFrameworkMoniker>$(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppToolCurrentVersion)</NetCoreAppCurrentToolTargetFrameworkMoniker>
67: <AppleAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)'))</AppleAppBuilderDir>
68: <AndroidAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</AndroidAppBuilderDir>
69: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
70: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
71: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/coreclr/crossgen-corelib.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/runtime.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DacTableGen/DacTableGen.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/ToolBox/SOS/DIALib/DIALib.ilproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/crossgen2/crossgen2.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.Diagnostics/ILCompiler.Diagnostics.csproj
7: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILCompiler.TypeSystem.ReadyToRun.Tests.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/Common/JitInterface/ThunkGenerator/ThunkGenerator.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rdump/R2RDump.csproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/r2rtest/R2RTest.csproj
6: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/coreclr/tools/runincontext/runincontext.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/installer/tests/Directory.Build.props
12: <TestInfraTargetFramework>$(NetCoreAppToolCurrent)</TestInfraTargetFramework>
src/mono/llvm/llvm-init.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/monoaotcross.proj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/nuget/Microsoft.NET.Runtime.Android.Sample.Mono/Microsoft.NET.Runtime.Android.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_AndroidSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.iOS.Sample.Mono/Microsoft.NET.Runtime.iOS.Sample.Mono.pkgproj
17: <PackageFileInclude="@(_iOSSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/nuget/Microsoft.NET.Runtime.wasm.Sample.Mono/Microsoft.NET.Runtime.wasm.Sample.Mono.pkgproj
14: <PackageFileInclude="@(_wasmSampleFiles)"TargetPath="tools\$(NetCoreAppToolCurrent)\" />
src/mono/sample/Android/AndroidSampleApp.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/HelloWorld/HelloWorld.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/iOS/Program.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/console/ConsoleDelta.csproj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/sample/mbr/DeltaHelper/DeltaHelper.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.InTree.props
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/mono/wasm/build/WasmApp.LocalBuild.props
23: <_NetCoreAppToolCurrent>net5.0</_NetCoreAppToolCurrent>
32: <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir>
33: <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(_NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
34: <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(_NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
src/mono/wasm/wasm.proj
4: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AndroidAppBuilder/AndroidAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/AotCompilerTask/MonoAOTCompiler.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
29: <FilesToPackageInclude="$(OutputPath)$(NetCoreAppToolCurrent)\$(AssemblyName).dll"TargetPath="tasks" />
src/tasks/AppleAppBuilder/AppleAppBuilder.csproj
3: <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
src/tasks/WasmAppBuilder/WasmAppBuilder.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tasks/WasmBuildTasks/WasmBuildTasks.csproj
3: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Coreclr.TestWrapper/Coreclr.TestWrapper.csproj
6: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj
8: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/dir.sdkbuild.props
9: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/Directory.Build.targets
137: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
src/tests/Common/external/external.csproj
15: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies/test_dependencies.csproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Common/test_dependencies_fs/test_dependencies.fsproj
5: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
src/tests/Directory.Build.props
133: <NuGetTargetMonikerShort>$(NetCoreAppToolCurrent)</NuGetTargetMonikerShort>
src/tests/Directory.Build.targets
359: Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\publish\**"
364: Include="$(ArtifactsBinDir)\MonoAOTCompiler\Debug\$(NetCoreAppToolCurrent)\**"
src/tests/JIT/Directed/tailcall/mutual_recursion.fsproj
10: <TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>

Then just a few questions, as I don't know if it's safe to just remap NetCoreAppToolCurrent to net6.0:

  1. Do we want to build and run tools we use for the product against a 6.0 version?
  2. I don't know about a lot of the tools that reference the net5.0 TFM. A bunch of them are mono tasks (AppleAppBuilder, WasmAppBuilder) and samles (like AndroidSampleApp). @directhex are those safe to move to net6.0?
  3. @trylek@davidwrighton@AntonLapounov is it safe to move the crossgen2 and dotnet-pgo projects to net6.0?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Yes, I realized that after posting the comment... The tasks are definitely fine to be upgraded. I think crossgen2 should be fine as well.

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.
Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.
The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Apparently, they way that coreclr uses the pkgproj infrastructure causes these failures. Likely because the props and targets files are imported directly there:

.packages/microsoft.dotnet.build.tasks.packaging/6.0.0-beta.21120.1/build/Packaging.targets(747,5): error MSB4018: (NETCORE_ENGINEERING_TELEMETRY=Build) The "GenerateRuntimeDependencies" task failed unexpectedly.
System.MissingMethodException: Method not found: 'Void NuGet.RuntimeModel.JsonObjectWriter..ctor(Newtonsoft.Json.JsonWriter)'.
at Microsoft.DotNet.Build.Tasks.Packaging.NuGetUtility.WriteRuntimeGraph(String filePath, RuntimeGraph runtimeGraph)
at Microsoft.DotNet.Build.Tasks.Packaging.GenerateRuntimeDependencies.Execute() in /_/src/Microsoft.DotNet.Build.Tasks.Packaging/src/GenerateRuntimeDependencies.cs:line 144
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)

@ericstj can you please help out here? I also updated the NuGet dependencies in Arcade and they already flowed into this PR. The binlog shows that the right assembly with the NuGet breaking change is used. It's unclear to me why there's a MissingMethodException.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

OK I got the fix ready in Arcade, and will update this PR tomorrow.

Comment threadeng/Tools.props
Comment threadsrc/installer/tests/Assets/TestUtils/TestProjects.targets
@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@trylek@jkoritzinsky@hoyosjs can someone pls help me figure out why all runtime tests blow up with a 6.0 SDK? I don't even know how to repro this locally. Currently looking into the correlation payloads...

@ViktorHofer

ViktorHofer commented Feb 23, 2021

Copy link
Copy Markdown
MemberAuthor

Oh wow, I just noticed that the SDK value is hardcoded for the runtime tests to 5.0:

<DotNetCliVersion>5.0.0</DotNetCliVersion>

Questions that I have:

  • Why do the runtime tests need a runtime pack to be downloaded? Aren't the runtime tests using the live built shared framework?

@jkoritzinsky

Copy link
Copy Markdown
Member

The runtime tests themselves run on the built shared framework, but the xunit wrappers around the tests run on the CLI we pull down. Otherwise when something breaks that xunit uses, we lose all test coverage, which makes the problem harder to track down.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

Thanks Jeremy. I would really love to hear more about what the xunit wrappers are for and why libraries and installer don't need them. Will probably ask about that at some point offline, as this isn't relevant for this PR.

@jkoritzinsky

Copy link
Copy Markdown
Member

The xunit wrappers execute the test and assert the return code matches the expected value. Without them, we wouldn’t have a good way to execute our tests and get an xunit test results file to upload to AzDO. We could use a different runner or create a new one (which we do for onboarding new targets), but the xunit system works well for now.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

@safern@akoeplinger I think you guys touched the code that handles the xunit asset publishing with xharness. Can you please take a look at the error?

/__w/1/s/.dotnet/sdk/6.0.100-preview.2.21118.7/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(108,5): error NETSDK1148: Found multiple publish output files with the same relative path: /__w/1/s/artifacts/bin/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/artifacts/obj/Microsoft.XmlSerializer.Generator.Tests/net6.0-Release/browser-wasm/Microsoft.XmlSerializer.Generator.Tests.deps.json, /__w/1/s/.packages/xunit.abstractions/2.0.3/lib/netstandard2.0/xunit.abstractions.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.abstractions.dll, /__w/1/s/.packages/xunit.extensibility.core/2.4.1/lib/netstandard1.1/xunit.core.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.core.dll, /__w/1/s/.packages/xunit.extensibility.execution/2.4.1/lib/netstandard1.1/xunit.execution.dotnet.dll, /__w/1/s/artifacts/bin/WasmTestRunner/net6.0-Release/xunit.execution.dotnet.dll. [/__w/1/s/src/libraries/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj]

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

The remaining issue are duplicated xunit artifacts in mobile builds that @safern is currently looking at. I expect (or better to say hope) that we get this in by EOD.

@safernsafern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me.

@eerhardteerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I still don't understand why we need the empty TestProjects.targets file, but if you think it is valuable, then I'm OK with it.

@ViktorHoferViktorHofer changed the title Remove duplicated ILLink PackageReferenceRemove duplicated ILLink PackageReference and update target version of the SDK to 6.0Feb 24, 2021
@ghost

Copy link
Copy Markdown

Hello @ViktorHofer!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

DNS failures are #48751

@ViktorHofer
ViktorHofer merged commit 653b310 into dotnet:masterFeb 25, 2021
@ViktorHofer
ViktorHofer deleted the ILLinkFixPkgReferences branch February 25, 2021 10:23
@sdmaclea

Copy link
Copy Markdown
Contributor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

@ViktorHofer

Copy link
Copy Markdown
MemberAuthor

I thought this was supposed to wait until the March infras rollout. Or am I missing something?

The march rollout updates the SDK's minimum required version (the sdk entry in the repo's global.json file). msbuild checks that version when its being invoked (including VS). The target version that was being updated as part of this PR is used for bootstrapping the repo local SDK.

@ghostghost locked as resolved and limited conversation to collaborators Mar 27, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

7 participants

@ViktorHofer@hoyosjs@jkoritzinsky@sdmaclea@eerhardt@joperezr@safern