Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

System.IO.Ports native package#35126

Merged
krwq merged 10 commits intodotnet:masterfrom
krwq:system.io.ports_pkg
Feb 14, 2019
Merged

System.IO.Ports native package#35126
krwq merged 10 commits intodotnet:masterfrom
krwq:system.io.ports_pkg

Conversation

@krwq
Copy link
Member

@krwq krwq commented Feb 6, 2019

Contributes to #33374
(technically fixes but there is some follow up)

Remaining work:

  • test package
  • remove native component from the framework

@krwq krwq requested review from ericstj and joperezr February 6, 2019 05:27
@krwq
Copy link
Member Author

krwq commented Feb 7, 2019

test UWP CoreCLR x64 Debug Build

ericstj
ericstj previously requested changes Feb 7, 2019
Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

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

You shouldn’t be generating the runtime.json yourself. If you have a project reference to a runtime-specific pkgproj we will generate in the pkgproj tooling.

I don’t think the runtime package will build correctly as it is. We need something similar to how we build the framework packages.

We shouldn’t even be using runtime.json here: it doesn’t work at all with shared framework applications. You should use normal package dependencies, or merge the native binaries from multiple build legs into a single package

@krwq
Copy link
Member Author

krwq commented Feb 7, 2019

merge the native binaries from multiple build legs into a single package

@ericstj how do I do that? And how do I test it locally?

@ericstj
Copy link
Member

ericstj commented Feb 7, 2019

To do the join you'd actually have to refactor the build of CoreFx. It's a substantial amount of work: you'd need to make sure that the runtime-specific legs publish their binaries to some location, then we run a new leg before packaging that downloads the runtime-specific binaries so that they can be packaged together. Changes would need to be made to the build YAML and you'd need to test by pushing to a branch and kicking off official builds on that branch. @safern could probably provide better details on this than I can.

That said, I don't think you should go that far to start. I think its simpler to just remove the runtime.json and make these direct dependencies. That works so long as all packages provide non-overlapping assets (EG: you don't have a linux-x64 and ubuntu-x64 build). I think the easiest way to do this make use of the targets already defined in the pkg folder. To test you'll want to make sure that a vertical build produces a runtime package for the RID you're building for and the allconfigurations build produces a package with references to all the RIDs that will be built by the official build.

I think the easiest way to do this using the existing infra is to create a library-> package mapping for your dll name(s) here:


That allows are dependency harvesting system to automatically insert a reference to the native package wherever we see it used (rather than you having to try and express in the PkgProj what you're already expressing in your implementation assemblies build configurations).

Then create a package heirarchy like the following:

  • runtime.native.System.IO.Ports
    • runtime.linux-arm.runtime.native.System.IO.Ports
    • runtime.linux-x64.runtime.native.System.IO.Ports
    • ...
      The targets we use in the pkg folder should help here, but you might need to experiment a bit as we haven't done something like this since 1.0 and in 1.0 we were very verbose about how we represented this (via builds files passing global properties).

@krwq krwq force-pushed the system.io.ports_pkg branch from 93179eb to db6cbf2 Compare February 8, 2019 02:25
@krwq
Copy link
Member Author

krwq commented Feb 8, 2019

@ericstj when I did build -allConfigurations on windows I'm seeing nupkg for both rid specific package (which I didn't expect but it's empty anyway) and the runtime.native metapackage but I can't see neither runtime.json nor any dependency in the nuspec of the metapackage.

On linux regular build also produces both nupkgs but the rid specific package doesn't contain the .so file as specified in the package index and the pkgproj. Any clues? I'll be digging a bit more tomorrow

Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

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

I think I misspoke about allconfigurations build. It looks like the filtering only happens on official builds:

<PropertyGroup Condition="'$(BuildingAnOfficialBuildLeg)' == 'true'">
<!-- During an official build, only build identity packages in the AllConfigurations build -->
<SkipBuildIdentityPackage Condition="'$(BuildAllConfigurations)' != 'true'">true</SkipBuildIdentityPackage>
<!-- During an official build, skip building runtime packages on AllConfigurations build -->
<SkipBuildRuntimePackage Condition="'$(BuildAllConfigurations)' == 'true'">true</SkipBuildRuntimePackage>
</PropertyGroup>

I made some comments that should address most other issues. I don’t see what here would produce an empty rod specific package (other than Windows condition) can you clarify? Did you examine the System.IO.Ports package to see if we added the dependencies?

<PropertyGroup>
<SkipPackageFileCheck>true</SkipPackageFileCheck>
<SkipValidatePackage>true</SkipValidatePackage>
<SystemIOPortsNativePath>$(ArtifactsBinDir)\native\$(TargetGroup)-$(DefaultOSGroup)-$(Configuration)-$(ArchGroup)</SystemIOPortsNativePath>
Copy link
Member

Choose a reason for hiding this comment

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

Don’t define this. Use

<NativeBinDir>$(BinDir)native/$(BuildConfiguration)</NativeBinDir>

Copy link
Member Author

Choose a reason for hiding this comment

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

nice, thanks!

<SkipValidatePackage>true</SkipValidatePackage>
<SystemIOPortsNativePath>$(ArtifactsBinDir)\native\$(TargetGroup)-$(DefaultOSGroup)-$(Configuration)-$(ArchGroup)</SystemIOPortsNativePath>
</PropertyGroup>
<ItemGroup Condition="'$(OS)' != 'Windows_NT' and '$(PackageTargetRuntime)' != ''">
Copy link
Member

Choose a reason for hiding this comment

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

Windows condition here is bad. You are getting a Windows build because of this behavior:

<!-- create the "BuildRID" item which is the set of all supported RIDs, with metadata.
We'll add a RID for the current platform even if it isn't in the officially supported set -->
<ItemGroup Condition="'@(OfficialBuildRID)' != ''">
<BuildRID Include="@(OfficialBuildRID)" Exclude="$(PackageRID)"/>
<BuildRID Include="$(PackageRID)">
<Platform Condition="'$(ArchGroup)' == 'x64'">amd64</Platform>
<Platform Condition="'$(ArchGroup)' != 'x64'">$(ArchGroup)</Platform>
</BuildRID>
</ItemGroup>

The purpose is to let folks build a package on a platform that may not be officially suppoted yet. That may not be something you want. You can have a property that turns this itemgroup off and instead just sets buildrid to officialbuildrid.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I'll go with explicit PackageTargetRuntime check

Copy link
Member

Choose a reason for hiding this comment

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

Another thought: change the item name in your Rid.props file to use BuildRID instead of OfficialBuildRID and it will avoid this behavior.

@krwq
Copy link
Member Author

krwq commented Feb 8, 2019

Thanks a lot @ericstj, I'll update and test first thing in the morning!

@krwq
Copy link
Member Author

krwq commented Feb 8, 2019

I think this looks correct now:

  • meta-package on Windows exists and contains 4 deps on the RID specific packages as expected
  • not seeing Windows RID specific package
  • linux-x64 contains .so file under runtimes/linux-x64/native

@krwq
Copy link
Member Author

krwq commented Feb 8, 2019

test corefx-ci (Linux x64_Release)

@dotnet dotnet deleted a comment from dotnet-bot Feb 8, 2019
@krwq
Copy link
Member Author

krwq commented Feb 8, 2019

@dotnet/dnceng how do you restart "corefx-ci (Linux x64_Release)"? I've tried dotnet-bot invocation and "Rerun this check" in the Checks page and both don't seem to work

The issue in the check:

2019-02-08T20:20:01.8951878Z Failed to install dotnet SDK (exit code '1').
2019-02-08T20:20:01.9104386Z ##[error]Bash exited with code '1'.
2019-02-08T20:20:01.9604383Z ##[section]Finishing: Build Sources and Tests

@dotnet dotnet deleted a comment from dotnet-bot Feb 8, 2019
@krwq krwq force-pushed the system.io.ports_pkg branch from 935593e to 76c094a Compare February 8, 2019 22:13
@safern
Copy link
Member

safern commented Feb 9, 2019

For azure pipelines builds the comment syntax is:

/AzurePipelines run (i.e /AzurePipelines run corefx-ci)

Short form can be "/azp run corefx-ci".

You can also do /azp help or in the long form /AzurePipelines help
https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops

@safern
Copy link
Member

safern commented Feb 9, 2019

However note that comment triggers are broken now for forked PRs. It is supposed to be fixed and the fixed was rolled out on Monday. We should be getting it by Monday the latest according to what they told me. I have this issue to track it: https://github.com/dotnet/corefx/issues/35121

@safern
Copy link
Member

safern commented Feb 9, 2019

Btw the linux test failures in Fedora is a known issue:
https://github.com/dotnet/core-eng/issues/5204

@ericstj
Copy link
Member

ericstj commented Feb 9, 2019

Looks like you may need to suppress package testing since the rid specific packages won’t be available during all configurations build. Hmmmm. Nuget doesn’t have a good way to suppress a dependency: we could publish an empty lower version of the runtime package and force downgrade it.

@safern this is another side effect of not having a join in corefx build legs.

@krwq
Copy link
Member Author

krwq commented Feb 9, 2019

@ericstj does it also check versions? If not then I can also comment out all dependencies and remove package index changes from this PR, push it to produce packages and then revert this change.

@krwq
Copy link
Member Author

krwq commented Feb 11, 2019

@ericstj what do you mean by force downgrade it?

@ericstj
Copy link
Member

ericstj commented Feb 11, 2019

build a 0.0.0 version of runtime.native.System.IO.Ports that's empty, push that. Add a targets under
https://github.com/dotnet/corefx/tree/master/pkg/test/packageSettings that references the 0.0.0 version, that's a downgrade from the actual version referenced in the real package, so you need suppress the warning. Something like this.

  <PackageReference Include="runtime.native.System.IO.Ports" Version="0.0.0" NoWarn="NU1605" />

Once we get one official build out of corefx we can replace the 0.0.0 with that (still a downgrade but testing the real scenario more closely)

@krwq
Copy link
Member Author

krwq commented Feb 13, 2019

@ericstj, I have disabled the testing for now, once we get the real package I'll figure how to do the downgrade correctly

@dotnet dotnet deleted a comment from azure-pipelines bot Feb 13, 2019
@dotnet dotnet deleted a comment from azure-pipelines bot Feb 13, 2019
@dotnet dotnet deleted a comment from azure-pipelines bot Feb 13, 2019
@safern
Copy link
Member

safern commented Feb 13, 2019

If you want to rerun an individual job, it has to be manually through the UI. Through comments you can only do the whole pipeline. I’ve reported that issue to azure devops team.

@krwq
Copy link
Member Author

krwq commented Feb 13, 2019

@safern I already have but even though it shows running on the page it still is red in here

@safern
Copy link
Member

safern commented Feb 13, 2019

Yes they have a bug in that as well which I have reported, to give you context:

a job can have Name and DisplayName. Name has to be unique across all the jobs in the same pipeline, but DisplayName is what is used in the UI to show the job as. (Like a better name). 
 
WindowsTest contains the matrix for all the Windows builds that run tests in helix. WindowsNoTests the ones that don't send to helix, but all of them, have a DisplayName=Windows, to be consistent in the UI.
 
It seems like the auto-triggered legs, use, DisplayName and the retry feature, uses, Name, which differs from DisplayName in this case, causing duplication.

However when the job finishes it will update the failing job. They’re investigating and submitting a fix.

@krwq
Copy link
Member Author

krwq commented Feb 13, 2019

@safern interestingly after CI finished now it's green, so only "in-progress" doesn't work

@safern
Copy link
Member

safern commented Feb 13, 2019

Yeah. The problem is as I described above, running uses Job.Name, finished uses Job.DisplayName, that is the difference.

<BuildRID Include="linux-arm64">
<Platform>arm64</Platform>
</BuildRID>
<BuildRID Include="linux-x64" />
Copy link
Member

Choose a reason for hiding this comment

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

Don't you need to set the platform for linux x64 and osx as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

I copied this from other file and removed stuff I didn't need so I presume no (also I think the output looked correct too). I think for osx and linux we don't have 32bit except ARM

<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
<PropertyGroup>
<SkipPackageFileCheck>true</SkipPackageFileCheck>
Copy link
Member

Choose a reason for hiding this comment

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

Could we add comments above each of this skips to say why is it that we need them?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm actually not sure, I copied the whole project from elsewhere and left it there. I'll try to remove this in a subsequent PR and if not possible I'll add a comment. Let's leave it as is for now since I don't want to block on the comment for waiting on the official build

Copy link
Member

Choose a reason for hiding this comment

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

If this is actually not required I would rather remove it now, that way we will be able to catch a possible validation error now that we wouldn't have if we kept these guys. Basically what you are doing here is kind of a skipping all of the testing validation for this package, so I would rather make sure that validation succeeds in order to get us more confidence. If we indeed need these validation skipped, it would be good to understand why, since it might be due to a package authoring problem.

<ItemGroup>
<TestPackages Condition="'$(TestPackages)' != ''" Include="$(TestPackages)" />
<ExcludePackages Include="CoreFx.Private.TestUtilities" />
<ExcludePackages Include="CoreFx.Private.TestUtilities;System.IO.Ports;runtime.native.System.IO.Ports" />
Copy link
Member

Choose a reason for hiding this comment

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

Won't you still want package testing to happen on System.IO.Ports and just remove it from the runtime specific package?

Copy link
Member Author

@krwq krwq Feb 13, 2019

Choose a reason for hiding this comment

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

System.IO.Ports depends on the runtime.native.* and that depends on the rid specific packages which don't exist yet. I'll try to fix it all in the next PR, let me test if the package is correct first and once the official package is up we can remove some of the hacks from here

@joperezr
Copy link
Member

I tried restoring this package on my machine with the ones produced by CI and got the following error:

F:\scratch\temp\temp.csproj : warning NU1603: System.IO.Ports 4.6.0-ci.19113.1 depends on runtime.native.System.IO.Ports (>= 4.0.2-ci.19113.1) but runtime.native.System.IO.Ports 4.0.2-ci.19113.1 was not found. An approximate best match of runtime.native.System.IO.Ports 4.6.0-ci.19113.1 was resolved.

Seems like we should be getting that wrong dependency version from the system.io.ports.dll assembly version. We should fix that before merging as well.

@krwq
Copy link
Member Author

krwq commented Feb 13, 2019

@joperezr binlog tells me that target GenerateNuSpec coming from Microsoft.DotNet.Build.Tasks.Packaging contains correct dependency to runtime.native.System.IO.Ports (same for all configurations):

  • Version=4.6.0-dev.19113.1
  • PackageVersion=4.6.0
  • only AssemblyVersion=4.0.2.0

Looks like the bug is in that target
Here is where they get the dependency version: https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.Build.Tasks.Packaging/src/GenerateNuSpec.cs#L241
which looks correct to me (it ends up using "Version" metadata)

I suspect this: https://github.com/dotnet/arcade/blame/master/src/Microsoft.DotNet.Build.Tasks.Packaging/src/GenerateNuSpec.cs#L311 somehow ends up changing min version used.

@joperezr any clues?

@krwq
Copy link
Member Author

krwq commented Feb 14, 2019

Here is the full thing I'm seeing being passed to GenerateNuSpec - this looks good IMO
Dependencies
    _._
        TargetFramework = uap10.0.16299
    _._
        Exclude = Compile
        TargetFramework = netstandard2.0
    _._
        Exclude = Compile
        TargetFramework = net461
    _._
        Exclude = Compile
        TargetFramework = netstandard2.0
    System.Memory
        AdditionalProperties = Configuration=netstandard-Windows_NT-Debug;
        AssemblyVersion = 4.0.1.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        OriginalItemSpec = System.Memory
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = netstandard2.0
        TargetPath = runtimes/win/lib/netstandard2.0
        Version = 4.5.0
    Microsoft.Win32.Registry
        AdditionalProperties = Configuration=netstandard-Windows_NT-Debug;
        AssemblyVersion = 4.1.2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        OriginalItemSpec = Microsoft.Win32.Registry
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = netstandard2.0
        TargetPath = runtimes/win/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    System.Memory
        AdditionalProperties = Configuration=netstandard-Linux-Debug;
        AssemblyVersion = 4.0.1.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        OriginalItemSpec = System.Memory
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = netstandard2.0
        TargetPath = runtimes/linux/lib/netstandard2.0
        Version = 4.5.0
    runtime.native.System.IO.Ports
        AdditionalProperties = Configuration=netstandard-Linux-Debug;
        AssemblyVersion = 4.0.2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        NativeLibrary = System.IO.Ports.Native
        OriginalItemSpec = runtime.native.System.IO.Ports
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = netstandard2.0
        TargetPath = runtimes/linux/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    System.Memory
        AdditionalProperties = Configuration=netstandard-OSX-Debug;
        AssemblyVersion = 4.0.1.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        OriginalItemSpec = System.Memory
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = netstandard2.0
        TargetPath = runtimes/osx/lib/netstandard2.0
        Version = 4.5.0
    runtime.native.System.IO.Ports
        AdditionalProperties = Configuration=netstandard-OSX-Debug;
        AssemblyVersion = 4.0.2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        NativeLibrary = System.IO.Ports.Native
        OriginalItemSpec = runtime.native.System.IO.Ports
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = netstandard2.0
        TargetPath = runtimes/osx/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    _._
        Exclude = Compile
        TargetFramework = net472
    _._
        Exclude = Compile
        TargetFramework = net461
    Microsoft.Win32.Registry
        AdditionalProperties = Configuration=netstandard-Windows_NT-Debug;
        AssemblyVersion = 4.1.2.0
        CopiedFromTargetFramework = netstandard2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        OriginalItemSpec = Microsoft.Win32.Registry
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = netcoreapp2.1
        TargetPath = runtimes/win/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    runtime.native.System.IO.Ports
        AdditionalProperties = Configuration=netstandard-Linux-Debug;
        AssemblyVersion = 4.0.2.0
        CopiedFromTargetFramework = netstandard2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        NativeLibrary = System.IO.Ports.Native
        OriginalItemSpec = runtime.native.System.IO.Ports
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = netcoreapp2.1
        TargetPath = runtimes/linux/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    Microsoft.Win32.Registry
        AdditionalProperties = Configuration=netstandard-Windows_NT-Debug;
        AssemblyVersion = 4.1.2.0
        CopiedFromTargetFramework = netstandard2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        OriginalItemSpec = Microsoft.Win32.Registry
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = monoandroid10
        TargetPath = runtimes/win/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    runtime.native.System.IO.Ports
        AdditionalProperties = Configuration=netstandard-Linux-Debug;
        AssemblyVersion = 4.0.2.0
        CopiedFromTargetFramework = netstandard2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        NativeLibrary = System.IO.Ports.Native
        OriginalItemSpec = runtime.native.System.IO.Ports
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = monoandroid10
        TargetPath = runtimes/linux/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    Microsoft.Win32.Registry
        AdditionalProperties = Configuration=netstandard-Windows_NT-Debug;
        AssemblyVersion = 4.1.2.0
        CopiedFromTargetFramework = netstandard2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        OriginalItemSpec = Microsoft.Win32.Registry
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = monotouch10
        TargetPath = runtimes/win/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    runtime.native.System.IO.Ports
        AdditionalProperties = Configuration=netstandard-Linux-Debug;
        AssemblyVersion = 4.0.2.0
        CopiedFromTargetFramework = netstandard2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        NativeLibrary = System.IO.Ports.Native
        OriginalItemSpec = runtime.native.System.IO.Ports
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = monotouch10
        TargetPath = runtimes/linux/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    Microsoft.Win32.Registry
        AdditionalProperties = Configuration=netstandard-Windows_NT-Debug;
        AssemblyVersion = 4.1.2.0
        CopiedFromTargetFramework = netstandard2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        OriginalItemSpec = Microsoft.Win32.Registry
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = xamarinios10
        TargetPath = runtimes/win/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    runtime.native.System.IO.Ports
        AdditionalProperties = Configuration=netstandard-Linux-Debug;
        AssemblyVersion = 4.0.2.0
        CopiedFromTargetFramework = netstandard2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        NativeLibrary = System.IO.Ports.Native
        OriginalItemSpec = runtime.native.System.IO.Ports
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = xamarinios10
        TargetPath = runtimes/linux/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    Microsoft.Win32.Registry
        AdditionalProperties = Configuration=netstandard-Windows_NT-Debug;
        AssemblyVersion = 4.1.2.0
        CopiedFromTargetFramework = netstandard2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        OriginalItemSpec = Microsoft.Win32.Registry
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = xamarinmac20
        TargetPath = runtimes/win/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    runtime.native.System.IO.Ports
        AdditionalProperties = Configuration=netstandard-Linux-Debug;
        AssemblyVersion = 4.0.2.0
        CopiedFromTargetFramework = netstandard2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        NativeLibrary = System.IO.Ports.Native
        OriginalItemSpec = runtime.native.System.IO.Ports
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = xamarinmac20
        TargetPath = runtimes/linux/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    Microsoft.Win32.Registry
        AdditionalProperties = Configuration=netstandard-Windows_NT-Debug;
        AssemblyVersion = 4.1.2.0
        CopiedFromTargetFramework = netstandard2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        OriginalItemSpec = Microsoft.Win32.Registry
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = xamarintvos10
        TargetPath = runtimes/win/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    runtime.native.System.IO.Ports
        AdditionalProperties = Configuration=netstandard-Linux-Debug;
        AssemblyVersion = 4.0.2.0
        CopiedFromTargetFramework = netstandard2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        NativeLibrary = System.IO.Ports.Native
        OriginalItemSpec = runtime.native.System.IO.Ports
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = xamarintvos10
        TargetPath = runtimes/linux/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    Microsoft.Win32.Registry
        AdditionalProperties = Configuration=netstandard-Windows_NT-Debug;
        AssemblyVersion = 4.1.2.0
        CopiedFromTargetFramework = netstandard2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        OriginalItemSpec = Microsoft.Win32.Registry
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = xamarinwatchos10
        TargetPath = runtimes/win/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1
    runtime.native.System.IO.Ports
        AdditionalProperties = Configuration=netstandard-Linux-Debug;
        AssemblyVersion = 4.0.2.0
        CopiedFromTargetFramework = netstandard2.0
        DependencyKind = Direct
        Exclude = Compile
        HarvestDependencies = true
        IsReferenceAsset = False
        MSBuildSourceProjectFile = C:\Users\krwq\Desktop\src\corefx\src\System.IO.Ports\src\System.IO.Ports.csproj
        MSBuildSourceTargetName = GetPackageConfigurations
        NativeLibrary = System.IO.Ports.Native
        OriginalItemSpec = runtime.native.System.IO.Ports
        PackageDirectory = 
        PackageId = System.IO.Ports
        PackageVersion = 4.6.0
        Private = false
        SkipGetTargetFrameworkProperties = true
        TargetFramework = xamarinwatchos10
        TargetPath = runtimes/linux/lib/netstandard2.0
        Version = 4.6.0-dev.19113.1

@joperezr
Copy link
Member

Ok, what you are missing seems to be an entry in the packageIndex.json. Try adding this and build again, it should make it work:

"runtime.native.System.IO.Ports": {
      "BaselineVersion": "4.6.0",
      "InboxOn": {}
    },

That should force the package version on the dependencies to be correct.

@krwq
Copy link
Member Author

krwq commented Feb 14, 2019

Thanks for help @joperezr and @ericstj! I'll test packages whenever they are published and sent another PR to enable some testing

@krwq krwq merged commit c776f65 into dotnet:master Feb 14, 2019
@karelz karelz added this to the 3.0 milestone Mar 18, 2019
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* System.IO.Ports native package

* add inputs and outputs

* fix build

* change the way native package is build

* fix pkgproj and props per feedback

* NativeFile -> File

* add workaround for the package test

* exclude runtime.native.Syystem.IO.Ports from package testing

* disable also System.IO.Ports

* Add BaselineVersion and InboxOn in packageIndex.json


Commit migrated from dotnet/corefx@c776f65
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants