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) |
|
@ericstj this is ready to go in. awaiting final review :) |
| <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.
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/
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?