-
Notifications
You must be signed in to change notification settings - Fork 571
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
Generate nuget package for System.Device.Gpio #28
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,56 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project> | ||
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" /> | ||
|
||
<!-- Crosstargeting for RIDs --> | ||
<PropertyGroup Condition="'$(RuntimeIdentifiers)' != '' And '$(RuntimeIdentifier)' == ''"> | ||
<IsCrossTargetingRIDs>true</IsCrossTargetingRIDs> | ||
<IsCrossTargetingRIDs>true</IsCrossTargetingRIDs> | ||
</PropertyGroup> | ||
<Choose> | ||
<When Condition="'$(IsCrossTargetingRIDs)' == 'true'"> | ||
<PropertyGroup> | ||
<CrossTargetingRIDTargetsPath>$(MSBuildThisFileDirectory)eng\CrosstargetingRIDs.targets</CrossTargetingRIDTargetsPath> | ||
</PropertyGroup> | ||
</When> | ||
</Choose> | ||
<Import Project="$(CrossTargetingRIDTargetsPath)" Condition="Exists('$(CrossTargetingRIDTargetsPath)')" /> | ||
<When Condition="'$(IsCrossTargetingRIDs)' == 'true'"> | ||
<PropertyGroup> | ||
<CrossTargetingRIDTargetsPath>$(MSBuildThisFileDirectory)eng\CrosstargetingRIDs.targets</CrossTargetingRIDTargetsPath> | ||
</PropertyGroup> | ||
</When> | ||
</Choose> | ||
<Import Project="$(CrossTargetingRIDTargetsPath)" Condition="Exists('$(CrossTargetingRIDTargetsPath)')" /> | ||
|
||
<!-- Packaging Targets --> | ||
<PropertyGroup> | ||
<IncludeRIDSpecificBuildOutput Condition="'$(IncludeRIDSpecificBuildOutput)' == '' And '$(RuntimeIdentifiers)' != ''">true</IncludeRIDSpecificBuildOutput> | ||
<TargetsForTfmSpecificContentInPackage Condition="'$(IncludeRIDSpecificBuildOutput)' == 'true'">$(TargetsForTfmSpecificContentInPackage);_WalkEachRIDForBuildOutput;_GetReferenceAssemblyForPackage</TargetsForTfmSpecificContentInPackage> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<_RuntimeIdentifiers Include="$(RuntimeIdentifiers)" /> | ||
</ItemGroup> | ||
|
||
<Target Name="_WalkEachRIDForBuildOutput"> | ||
<MSBuild | ||
Condition="'$(IncludeRIDSpecificBuildOutput)' == 'true'" | ||
Projects="$(MSBuildProjectFullPath)" | ||
Targets="_GetBuildOutputWithRID" | ||
Properties="RuntimeIdentifier=%(_RuntimeIdentifiers.Identity)"> | ||
|
||
<Output | ||
TaskParameter="TargetOutputs" | ||
ItemName="TfmSpecificPackageFile" /> | ||
</MSBuild> | ||
</Target> | ||
|
||
<Target Name="_GetReferenceAssemblyForPackage"> | ||
<ItemGroup> | ||
<TfmSpecificPackageFile Include="$(TargetRefPath)"> | ||
<PackagePath>ref/$(TargetFramework)</PackagePath> | ||
</TfmSpecificPackageFile> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<Target Name="_GetBuildOutputWithRID" Returns="@(RIDSpecificPackageFile)"> | ||
<ItemGroup> | ||
<RIDSpecificPackageFile Include="$(TargetPath)"> | ||
<PackagePath>runtimes/$(RuntimeIdentifier)/lib/$(TargetFramework)</PackagePath> | ||
</RIDSpecificPackageFile> | ||
</ItemGroup> | ||
</Target> | ||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<VersionPrefix>1.0.0</VersionPrefix> | ||
<PreReleaseVersionLabel>prerelease</PreReleaseVersionLabel> | ||
</PropertyGroup> | ||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Project> | ||
<!-- Packaging related properties --> | ||
<PropertyGroup> | ||
<MajorVersion>0</MajorVersion> | ||
<MinorVersion>1</MinorVersion> | ||
<Description>This experimental package allows projects to access GPIO pins for the BCM2835 as used on Raspberry Pi.</Description> | ||
<Copyright>Microsoft Corporation, All rights reserved.</Copyright> | ||
<IncludeBuildOutput>false</IncludeBuildOutput> | ||
<PackageTags>.NET Core GPIO Pins BCM2835 Raspberry Pi IoT</PackageTags> | ||
</PropertyGroup> | ||
|
||
<Import Project="..\..\Directory.Build.props" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We typically import this one at the beginning to respect the sdk convention in hierarchy There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem is that that one will import the arcade sdk, which will set the Version of the package, so I want to set Major and Minor version first. |
||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<Description>This experimental package allows projects to access GPIO pins for the BCM2835 as used on Raspberry Pi.</Description> | ||
<Copyright>Microsoft Corporation, All rights reserved.</Copyright> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<RuntimeIdentifiers>win;linux-x64</RuntimeIdentifiers> | ||
<RuntimeIdentifiers>win;linux</RuntimeIdentifiers> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<PackageTags>.NET Core GPIO Pins BCM2835 Raspberry Pi IoT</PackageTags> | ||
<LangVersion>7.3</LangVersion> | ||
<!-- Only produce reference assembly in one of our inner builds --> | ||
<ProduceReferenceAssembly Condition="'$(TargetsWindows)' == 'true'">true</ProduceReferenceAssembly> | ||
<TargetRefPath>$(OutputPath)$(TargetFramework)\$(MSBuildProjectName).dll</TargetRefPath> | ||
<IsPackable>true</IsPackable> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought you had to set a IncludeBuildOutput property and set it to false so that it doesn't include it in the package. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is set in the Directory.Build.props of this project. I wanted to move all the packaging related things over there, except for this property so that when we look at the project we know that this project will generate a package. |
||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Remove="winmd\**" /> | ||
|
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.
Are you planning on sharing a version across packages?
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.
this is to set the package version. It will also set the Assembly version for now but that is fine because I also want that to be 0.1.0.0. Once we ship a different version of assembly this will change.