-
Notifications
You must be signed in to change notification settings - Fork 581
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
Assembly reference issue with .NET Core 3 #755
Comments
Hello @Tragetaschen thanks for logging your issue. It looks like you are hitting the same issue that people were hitting here: https://github.com/dotnet/corefx/issues/41403 which is still getting root caused but the apparent issue seems to be when System.Runtime.WindowsRuntime gets brought into the closure of your build, which will now require Windows.winmd. We are still investigating why is it that removing the using statement fixes this problem, but for the meantime, I would advise to keep that line commented out. This may very well be a compiler problem. We can keep this issue open tracking the external issue for now, and once we have more info I will add it here. |
That's ok. I'll follow the corefx issue. No need for extra tracking |
I have migrated my application to the recent .NET 5 Preview 8 bits including S.D.Gpio and this issue still exists. |
That is correct we are aware of this and we need to change the reference to use the new csWinRT package instead but we can't do that just yet as we need csWinRT to fix an issue with their package regarding their strong name signature. We have another issue tracking that and it will get done before vNext. |
FWIW this is the issue where we are tracking updating this: #1091. Since we are already tracking it with another issue I'll go ahead and close this as a dupe but @Tragetaschen feel free to reopen if you think it is necessary |
Describe the bug
I have reduced my main project structure to this: https://github.com/Tragetaschen/async-action-reproduction.
lib1 has an unused reference to
System.Device.Gpio
1.0.0
, an extension method to make CancellationTokens awaitable and an example class using that extension method.lib2 has the same example class referencing the extension method from lib1.
When building lib2, there are four errors:
Steps to reproduce
dotnet build
in lib2Ways to fix it
When you remove the package reference to
System.Device.Gpio
in lib1, lib2 compiles correctly.When you remove the
using System;
from lib2'sC
, lib2 compiles correctly.Interestingly, IntelliSense doesn't "gray out" the unused
using System;
, so it looks like the package reference pulls in something unwanted that then interferes with the lib2 build. At the same time, adding ausing System;
to lib1'sC
is grayed out as unused.In this reduced sample, the
using
in lib2 can be removed, but in my main project it's certainly necessary.Versions used
The text was updated successfully, but these errors were encountered: