-
Notifications
You must be signed in to change notification settings - Fork 347
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
Cross-compile RemoteExecutor #2402
Conversation
The build and publish runtime configurations don't flow across P2Ps, they are part of the "PrepareForRun" step and not included in the targets that assemble the copy local items for P2Ps references. The .deps.json file is also generated separately during publish since it may need to contain different info for build/publish. When packing assemblies via P2Ps i previously resorted to packing publish outputs (see dotnet/sdk#1846 (comment)) or messing with project references so that they can forward their publish output.. see https://github.com/dasMulli/AssemblyInfoGenerationSdk/blob/master/src/DasMulli.AssemblyInfoGeneration.Sdk/sdk-layout.targets (the test project references the SDK project as P2P with a special property - which will do a publish and forward the publish result, with the added complexity of referencing the outer bulid of a multi-targeting project and forwarding a custom layout) |
...et.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj
Outdated
Show resolved
Hide resolved
...et.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj
Outdated
Show resolved
Hide resolved
@ericstj this is ready to go in. awaiting final review :) |
</ItemGroup> | ||
|
||
<Target Name="PackBuildOutputs" DependsOnTargets="ResolveProjectReferences;SatelliteDllsProjectOutputGroup;DebugSymbolsProjectOutputGroup;SatelliteDllsProjectOutputGroupDependencies;ResolveAssemblyReferences"> | ||
<ItemGroup> | ||
<TfmSpecificPackageFile Include="$(OutputPath)Microsoft.DotNet.RemoteExecutorHost.dll" PackagePath="lib\$(TargetFramework)\" /> | ||
<TfmSpecificPackageFile Include="$(OutputPath)Microsoft.DotNet.RemoteExecutorHost.runtimeconfig.json" PackagePath="lib\$(TargetFramework)\" /> | ||
<TfmSpecificPackageFile Include="%(_ResolvedProjectReferencePaths.Identity)" PackagePath="tools\$(TargetFramework)\" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using this private item, you could set OutputItemType on the projectreference. https://blogs.msdn.microsoft.com/kirillosenkov/2015/04/04/how-to-have-a-project-reference-without-referencing-the-actual-binary/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo one minor issue.
ce3fca7
to
c679ad5
Compare
Seems like I'm missing something for the .exe.config copying. Probably a dependent target I need for the manual packaging. |
8c01ac7
to
20c7dea
Compare
Instead of using a single netstandard2.0 tfm and putting tfm specific stuff together (runtimeconfig.json which currently also gets deployed when referencing the package from netfx) cross-compiling both libraries. I still had to manually add a runtimeconfig.json as otherwise it wouldn't get deployed in the ProjectReference with PrivateAssets=All. Also I wasn't able to get the deps.json files also copied over.
@dasMulli any idea with PrivateAssets="All" on a ProjectReference doesn't include the$(TargetName).runtimeconfig.json and the $ (TargetName).deps.json assets?