Skip to content

Conversation

@safern
Copy link
Member

@safern safern commented May 12, 2020

This uses the SDK to publish tests as self contained apps before building the app bundle using the built runtime pack.

I moved the RunTests.sh output path to BundleDir as whenever we start sending to helix, there is no need to .zip up the whole OutDir as we can just send the bundle + RunTests.sh script.

@ghost
Copy link

ghost commented May 12, 2020

Tagging subscribers to this area: @ViktorHofer
Notify danmosemsft if you want to be subscribed.

<AppleAppBuilderTask
Arch="$(TargetArchitecture)"
ProjectName="$(AssemblyName)"
MonoRuntimeHeaders="$(RuntimePackNativeDir)\include\mono-2.0"
Copy link
Member Author

Choose a reason for hiding this comment

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

@akoeplinger you said you were going to clean these \ up in a follow up PR since you're touching files, but since I'm touching them here, do you want me to do it instead?

Copy link
Member

Choose a reason for hiding this comment

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

let's get this in and I'll do the cleanup, I will need to touch this whole file anyway.

Copy link
Member

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

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

This uses the SDK to publish tests as self contained apps before building the app bundle using the built runtime pack.

Where are you using the SDK to publish the tests as self contained apps?

@steveisok steveisok requested a review from marek-safar May 12, 2020 08:28
<SelfContained>true</SelfContained>
<EnableTargetingPackDownload>false</EnableTargetingPackDownload>
<PlatformManifestFile />
</PropertyGroup>
Copy link
Member

Choose a reason for hiding this comment

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

Is it too early to enable PublishTrimmed here?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I did try that in my branch and you'll need to disable trimming on corelib or it crashes at startup. Let's do that in a separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not disable it but fix it instead.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah of course, but still in another PR :)

@safern
Copy link
Member Author

safern commented May 12, 2020

Where are you using the SDK to publish the tests as self contained apps?

By setting SelfContained = true and the RuntimeIdentifier. Then I intercept the ResolvedRuntimePack and update them to point to the directory where we built them.

I didn’t use the publish target because I spoke with @dsplaisted and he said that when you have SelfContained = true and RID set the build output and the publish output are the same for console apps.

I don’t know if when we want to publish as trimmed if we will need to use the Publish target. Anyway it will be a simple change by just adding Publish to the DependsOnTargets of PublishAsSelfContained. I had that initially and it work fine.

@ViktorHofer
Copy link
Member

for console apps.

I assume you mean for executables that only use the Microsoft.NETCore.App shared framework and probably also for class libraries?

@safern
Copy link
Member Author

safern commented May 12, 2020

Right. For web apps the output is indeed different.

The reason why I relied on the build output was to avoid having to folders that where the same on the output dir. @dsplaisted if we want to enable trimmed publish we will need to call publish, right?

@steveisok
Copy link
Member

Where are you using the SDK to publish the tests as self contained apps?

By setting SelfContained = true and the RuntimeIdentifier. Then I intercept the ResolvedRuntimePack and update them to point to the directory where we built them.

I didn’t use the publish target because I spoke with @dsplaisted and he said that when you have SelfContained = true and RID set the build output and the publish output are the same for console apps.

I don’t know if when we want to publish as trimmed if we will need to use the Publish target. Anyway it will be a simple change by just adding Publish to the DependsOnTargets of PublishAsSelfContained. I had that initially and it work fine.

I think we're going to have to do that b/c enabling PublishTrimmed in its current form does not do anything.

@safern
Copy link
Member Author

safern commented May 12, 2020

I’ll put up a PR in a few mins so that we can publish trimmed.

@safern safern deleted the PublishSelfContainedTests branch May 12, 2020 16:28
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants