You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot build for arm32 when use System.Device.Gpio in dotnet core preview 7 Web Application project. #646
Can you please share a binlog of your project to try to see what is going on? To produce one, please run the following on a developer command prompt: msbuild yourSolution.sln /t:rebuild /bl:Build.binlog this will create a Build.binlog file, can you please attach that here so that we can investigate?
The binlog that you provided doesn't have any warnings or errors about package downgrade, and they also don't have System.Device.Gpio as a reference. How are you trying to add the dependency to your project? Can you manually add the reference by editing the .csproj and then do a dotnet publish . -r linux-arm /bl:Build.binlog that way we can see exactly the repro of the issue and investigate.
Ok I know what is going on. This isn't a problem with System.Device.Gpio package, it is actually caused by a NuGet bug and the fact that we don't yet have a good silent workaround in the sdk. Even if you remove the System.Device.Gpio package reference and try to rebuild with -r linux-arm you will hit the same issue, which would prove that System.Device.Gpio package is not the cause of this. For now, in order to fix this you have to manually add a reference to the new Microsoft.NETCore.Targets package into your project like:
<ItemGroup>
<PackageReferenceInclude="Microsoft.AspNetCore.Blazor.Server"Version="3.0.0-preview7.19365.7" />
<PackageReferenceInclude="Microsoft.AspNetCore.Mvc.NewtonsoftJson"Version="3.0.0-preview7.19365.7" />
<PackageReferenceInclude="System.Device.Gpio"Version="0.1.0-prerelease.19376.1" />
<PackageReferenceInclude="Microsoft.NetCore.Targets"Version="2.1.0" /> <!-- Add this reference to your project -->
</ItemGroup>
That would fix the issue. The two bugs I pointed you at (the nuget and the sdk bug) would need to get fixed in order for you not to need to add manually this package.
I have validated on my end that this workaround fixes your issue and given that there are already a couple bugs in the right repos to track this issue I'm going to close this one, but feel free to reopen if you think we should keep this open as well as if you need any help in getting your project working. Thanks a lot for reporting this again!
Activity
joperezr commentedon Jul 31, 2019
Can you please share a binlog of your project to try to see what is going on? To produce one, please run the following on a developer command prompt:
msbuild yourSolution.sln /t:rebuild /bl:Build.binlogthis will create a Build.binlog file, can you please attach that here so that we can investigate?krwq commentedon Jul 31, 2019
@yan0lovesha please also share
dotnet --infoand what is the version of System.Device.Gpio you are usingyan0lovesha commentedon Aug 1, 2019
@joperezr @krwq , I attached 3 files for the result of binlog, dotnetinfo and dotnet_publish.
dotnet_publish.txt
dotnetinfo.txt
binlog.txt
yan0lovesha commentedon Aug 1, 2019
This is the correct binlog file.
Build.binlog.zip
joperezr commentedon Aug 1, 2019
The binlog that you provided doesn't have any warnings or errors about package downgrade, and they also don't have System.Device.Gpio as a reference. How are you trying to add the dependency to your project? Can you manually add the reference by editing the .csproj and then do a
dotnet publish . -r linux-arm /bl:Build.binlogthat way we can see exactly the repro of the issue and investigate.krwq commentedon Aug 1, 2019
I think sharing csproj + commands you are using to build and run (also mention OS and architecture of what was run where) should help us investigate
yan0lovesha commentedon Aug 2, 2019
Sorry, I think I attached a wrong binlog file yesterday. That was generated before I add gpio reference. This one is the one with error message.
The command I am using to build is:
dotnet publish . -r linux-armbinlog.zip
joperezr commentedon Aug 2, 2019
Ok I know what is going on. This isn't a problem with System.Device.Gpio package, it is actually caused by a NuGet bug and the fact that we don't yet have a good silent workaround in the sdk. Even if you remove the System.Device.Gpio package reference and try to rebuild with
-r linux-armyou will hit the same issue, which would prove that System.Device.Gpio package is not the cause of this. For now, in order to fix this you have to manually add a reference to the new Microsoft.NETCore.Targets package into your project like:That would fix the issue. The two bugs I pointed you at (the nuget and the sdk bug) would need to get fixed in order for you not to need to add manually this package.
I have validated on my end that this workaround fixes your issue and given that there are already a couple bugs in the right repos to track this issue I'm going to close this one, but feel free to reopen if you think we should keep this open as well as if you need any help in getting your project working. Thanks a lot for reporting this again!