Skip to content

Integrate Crossgen2 pack infrastructure into the shared framework tooling in Arcade #1867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dagood opened this issue Jan 17, 2020 · 6 comments

Comments

@dagood
Copy link
Member

dagood commented Jan 17, 2020

#1859 adds some additions to the shared framework infrastructure to make crossgen2 packs:

<!--
Use framework pack tooling to support building RID-specific crossgen2 packs.
Consider porting to central infrastructure: https://github.com/dotnet/runtime/issues/1867
-->
<PropertyGroup>
<FrameworkPackType>crossgen2</FrameworkPackType>
<BuildRidSpecificPacks>true</BuildRidSpecificPacks>
</PropertyGroup>
<!--
Get installer properties, in particular for MSIs.
Consider porting to central infrastructure: https://github.com/dotnet/runtime/issues/1867
-->
<Target Name="GetCrossgen2PackInstallerProperties"
Condition="'$(FrameworkPackType)' == 'crossgen2'"
BeforeTargets="GetInstallerProperties">
<PropertyGroup>
<InstallerName>$(ShortFrameworkName)-crossgen2-pack</InstallerName>
<WixProductMoniker>$(Crossgen2PackBrandName)</WixProductMoniker>
<VSInsertionShortComponentName>Crossgen2Pack</VSInsertionShortComponentName>
</PropertyGroup>
</Target>

These should be ported into dotnet/arcade once the name is decided between Crossgen or Crossgen2, so that shared framework tooling maintenance can happen without as much coordination between repos.

@dagood
Copy link
Member Author

dagood commented Jan 21, 2020

Note, this currently produces .msi files, but they're not needed and should be disabled when porting for simplicity. The acquisition for crossgen2 will be along the lines of the runtime packs: nuget only. (See #1985.)

@NikolaMilosavljevic NikolaMilosavljevic removed the untriaged New issue has not been triaged by the area owner label Feb 28, 2020
@NikolaMilosavljevic NikolaMilosavljevic added this to the Future milestone Feb 28, 2020
@NikolaMilosavljevic
Copy link
Member

This is not a must-have for .NET 5 but it would ensure Crossgen2 generation doesn't get broken.

There's no anticipated sharing of this code.

@am11
Copy link
Member

am11 commented Oct 7, 2020

Looks like Crossgen2 package has not been published for 5.0:

$ dotnet --version
5.0.100-rtm.20506.2

$ dotnet new console -n r2rtest; cd r2rtest
The template "Console Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on r2rtest/r2rtest.csproj...
  Determining projects to restore...
  Restored /Users/am11/projects/r2rtest/r2rtest.csproj (in 78 ms).
Restore succeeded.

$ dotnet publish -p:PublishReadyToRun=True -p:PublishReadyToRunUseCrossgen2=True -c Release -r osx-x64
Microsoft (R) Build Engine version 16.8.0-preview-20473-01+250161603 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
/Users/am11/.dotnet/sdk/5.0.100-rtm.20506.2/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(63,5): error NETSDK1094: Unable to optimize assemblies for performance: a valid runtime package was not found. Either set the PublishReadyToRun property to false, or use a supported runtime identifier when publishing. [/Users/am11/projects/r2rtest/r2rtest.csproj]

@dagood
Copy link
Member Author

dagood commented Oct 7, 2020

Looks like Crossgen2 package has not been published for 5.0:

This issue is about infra quality, and wouldn't be related to this. Can you post a new issue so it can be routed/answered correctly?

I'd also include where you got that SDK and what NuGet feeds you have set up, but that's just intuition, not really knowing likely causes of this error. 😄

@NikolaMilosavljevic
Copy link
Member

[Triage] @jkoritzinsky was this done as part of SharedFX refactoring?

@jkoritzinsky
Copy link
Member

Yes, the tooling was integrated.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants