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

pkg consumes facades and other binaries #153

Merged
merged 1 commit into from Dec 5, 2018

Conversation

Projects
None yet
4 participants
@zsd4yr
Member

zsd4yr commented Dec 4, 2018

No description provided.

@zsd4yr zsd4yr requested review from Shyam-Gupta and AdamYoblick Dec 4, 2018

@zsd4yr zsd4yr requested a review from dotnet/dotnet-winforms as a code owner Dec 4, 2018

@zsd4yr zsd4yr requested a review from ericstj Dec 4, 2018

@zsd4yr

This comment has been minimized.

Member

zsd4yr commented Dec 4, 2018

fixes #93

@zsd4yr

This comment has been minimized.

Member

zsd4yr commented Dec 4, 2018

New package:

image

@ericstj

ericstj approved these changes Dec 5, 2018

<PackagePath Condition="$([System.String]::Copy('%(TfmSpecificPackageFile.OriginalItemSpec)').EndsWith('Ref.csproj'))">ref/$(TargetFramework)</PackagePath>
<!-- If the reference ends with Facade.csproj, it's a facade binary, so put it under both lib and ref -->
<PackagePath Condition="$([System.String]::Copy('%(TfmSpecificPackageFile.OriginalItemSpec)').EndsWith('Facade.csproj'))">lib/$(TargetFramework);ref/$(TargetFramework)</PackagePath>

This comment has been minimized.

@ericstj

ericstj Dec 5, 2018

Member

Nit: if you wanted to avoid the duplicate EndsWith here and in AddRelativePackageFiles you could add metadata to the TfmSpecificPackageFile items.

EG:

<ItemGroup>
  <TfmSpecificPackageFile>
    <IsReference>$([System.String]::Copy('%(TfmSpecificPackageFile.OriginalItemSpec)').EndsWith('Ref.csproj'))</IsReference>
    <IsFacade>$([System.String]::Copy('%(TfmSpecificPackageFile.OriginalItemSpec)').EndsWith('Facade.csproj'))</IsFacade>
  </TfmSpecificPackageFile>
</ItemGroup>

Then later on you could use

        <PackagePath Condition="'%(TfmSpecificPackageFile.IsReference)' == 'true'">ref/$(TargetFramework)</PackagePath>
        <!-- If the reference ends with Facade.csproj, it's a facade binary, so put it under both lib and ref  -->
        <PackagePath Condition="'%(TfmSpecificPackageFile.IsFacade)' == 'true'">lib/$(TargetFramework);ref/$(TargetFramework)</PackagePath>

...
      <_isReferenceAssembly>%(TfmSpecificPackageFile.IsReference)</_isReferenceAssembly>
      <_isFacadeAssembly>%(TfmSpecificPackageFile.IsFacade)</_isFacadeAssembly>

If this becomes much more involved you may want to consider a different target in all the referenced CSProjs so that they can flow whatever custom metadata they want rather than trying to encode that in the project file name 😄

This comment has been minimized.

@zsd4yr

zsd4yr Dec 5, 2018

Member

Making these changes in #166 since this one was already merged to unblock Devendar

I agree this is a more organized way to do things

@AdamYoblick AdamYoblick merged commit 7622779 into master Dec 5, 2018

1 check passed

license/cla All CLA requirements met.
Details

@AdamYoblick AdamYoblick deleted the dev/zadanz/packaging branch Dec 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment