Unable to install package on UWP #1879

Open
chamamo opened this Issue Dec 29, 2016 · 6 comments

Projects

None yet

3 participants

@chamamo
chamamo commented Dec 29, 2016 edited

Hi!

Type: Bug
NLog version: 5.0.0-beta04 (Also for previous versions)
Platform: .UWP (Win10)

I can't install the package on my project, I have this errors: Package restore failed. Rolling back package changes for 'App2'.

Error detail:

System.Threading.AccessControl 4.0.0 provides a compile-time reference assembly for System.Threading.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm.
System.Security.AccessControl 4.0.0 provides a compile-time reference assembly for System.Security.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm.
System.Threading.ThreadPool 4.0.10 provides a compile-time reference assembly for System.Threading.ThreadPool on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm.
System.Threading.Thread 4.0.0 provides a compile-time reference assembly for System.Threading.Thread on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm.
System.IO.FileSystem.AccessControl 4.0.0 provides a compile-time reference assembly for System.IO.FileSystem.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm.
System.IO.FileSystem.Watcher 4.0.0 provides a compile-time reference assembly for System.IO.FileSystem.Watcher on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm.
One or more packages are incompatible with UAP,Version=v10.0 (win10-arm).
System.Threading.AccessControl 4.0.0 provides a compile-time reference assembly for System.Threading.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm-aot.
System.Security.AccessControl 4.0.0 provides a compile-time reference assembly for System.Security.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm-aot.
System.Threading.ThreadPool 4.0.10 provides a compile-time reference assembly for System.Threading.ThreadPool on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm-aot.
System.Threading.Thread 4.0.0 provides a compile-time reference assembly for System.Threading.Thread on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm-aot.
System.IO.FileSystem.AccessControl 4.0.0 provides a compile-time reference assembly for System.IO.FileSystem.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm-aot.
System.IO.FileSystem.Watcher 4.0.0 provides a compile-time reference assembly for System.IO.FileSystem.Watcher on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-arm-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-arm-aot).
System.Threading.AccessControl 4.0.0 provides a compile-time reference assembly for System.Threading.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64.
System.Security.AccessControl 4.0.0 provides a compile-time reference assembly for System.Security.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64.
System.Threading.ThreadPool 4.0.10 provides a compile-time reference assembly for System.Threading.ThreadPool on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64.
System.Threading.Thread 4.0.0 provides a compile-time reference assembly for System.Threading.Thread on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64.
System.IO.FileSystem.AccessControl 4.0.0 provides a compile-time reference assembly for System.IO.FileSystem.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64.
System.IO.FileSystem.Watcher 4.0.0 provides a compile-time reference assembly for System.IO.FileSystem.Watcher on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x64).
System.Threading.AccessControl 4.0.0 provides a compile-time reference assembly for System.Threading.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot.
System.Security.AccessControl 4.0.0 provides a compile-time reference assembly for System.Security.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot.
System.Threading.ThreadPool 4.0.10 provides a compile-time reference assembly for System.Threading.ThreadPool on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot.
System.Threading.Thread 4.0.0 provides a compile-time reference assembly for System.Threading.Thread on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot.
System.IO.FileSystem.AccessControl 4.0.0 provides a compile-time reference assembly for System.IO.FileSystem.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot.
System.IO.FileSystem.Watcher 4.0.0 provides a compile-time reference assembly for System.IO.FileSystem.Watcher on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x64-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x64-aot).
System.Threading.AccessControl 4.0.0 provides a compile-time reference assembly for System.Threading.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86.
System.Security.AccessControl 4.0.0 provides a compile-time reference assembly for System.Security.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86.
System.Threading.ThreadPool 4.0.10 provides a compile-time reference assembly for System.Threading.ThreadPool on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86.
System.Threading.Thread 4.0.0 provides a compile-time reference assembly for System.Threading.Thread on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86.
System.IO.FileSystem.AccessControl 4.0.0 provides a compile-time reference assembly for System.IO.FileSystem.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86.
System.IO.FileSystem.Watcher 4.0.0 provides a compile-time reference assembly for System.IO.FileSystem.Watcher on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x86).
System.Threading.AccessControl 4.0.0 provides a compile-time reference assembly for System.Threading.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot.
System.Security.AccessControl 4.0.0 provides a compile-time reference assembly for System.Security.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot.
System.Threading.ThreadPool 4.0.10 provides a compile-time reference assembly for System.Threading.ThreadPool on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot.
System.Threading.Thread 4.0.0 provides a compile-time reference assembly for System.Threading.Thread on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot.
System.IO.FileSystem.AccessControl 4.0.0 provides a compile-time reference assembly for System.IO.FileSystem.AccessControl on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot.
System.IO.FileSystem.Watcher 4.0.0 provides a compile-time reference assembly for System.IO.FileSystem.Watcher on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot.
One or more packages are incompatible with UAP,Version=v10.0 (win10-x86-aot).

Thank you in advance.

@304NotModified
Member

Is this a netstandard project? Or just UWP?

We only support UWP by netstandard

@gtbuchanan

Same issues for me with a UWP (uap10.0) project. The build succeeds even with the above errors, but I receive a runtime error relating to System.IO.FileSystem.Watcher (likely because UWP doesn't support this assembly).

System.TypeInitializationException: The type initializer for 'NLog.LogManager' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.IO.FileSystem.Watcher, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
   at NLog.LogFactory..ctor()
   at NLog.LogManager..cctor()
   --- End of inner exception stack trace ---
   at NLog.LogManager.GetLogger(String name)

I'm having a hard time following all the discussions about NLog and UWP. I noticed there is a UWP branch, albeit outdated, that attempts to fix some of these issues using UWP10 compiler flags. However, I saw #1483 exists to remove the UWP10 flags. I don't see anything obviously relating to UWP in the master or coreCLR branches.

We only support UWP by netstandard

I don't really follow this statement either. There's a way we can use NLog with UWP without having a UWP project?

@304NotModified
Member

Same issues for me with a UWP (uap10.0) project.

Most of the issues are with installing. Also the TS?

I'm having a hard time following all the discussions about NLog and UWP. I noticed there is a UWP branch, albeit outdated, that attempts to fix some of these issues using UWP10 compiler flags. However, I saw #1483 exists to remove the UWP10 flags. I don't see anything obviously relating to UWP in the master or coreCLR branches.

The UWP build has been evolved to the NETSTANDARD version (NLog 5), as UWP should run with NETSTANDARD. CoreCLR is the name before the NETSTANDARD.

I don't really follow this statement either. There's a way we can use NLog with UWP without having a UWP project?

See

image

https://docs.microsoft.com/en-us/dotnet/articles/standard/library

System.IO.FileSystem.Watcher (likely because UWP doesn't support this assembly).

If it's in NETSTANDARD, it should be supported. That's the whole idea with NETSTANDARD

Also there is no standalone UWP build anymore, as we couldn't run unit tests automated for UWP :(

@gtbuchanan

@304NotModified Thank you for the additional info. However, this StackOverflow answer from a .NET team member states System.IO.FileSystem.Watcher is not supported in UWP (even though NuGet allows you to reference the library from a .NET Standard 1.4 project without complaint).

project.json in the coreCLR branch looks like it references System.IO.FileSystem.Watcher in all supported .NET Standard versions, which leads me to believe NLog 5 won't work at all with UWP. This sort of explains why we are receiving these errors, right?

Seems to me like instances such as this will need to check some sort of compiler flag like they were previously (WINDOWS_UWP) to actually have support for UWP. It's a bummer about the unit tests, though.

@304NotModified
Member

Thank you for the additional info. However, this StackOverflow answer from a .NET team member states System.IO.FileSystem.Watcher is not supported in UWP (even though NuGet allows you to reference the library from a .NET Standard 1.4 project without complaint).

yeah could not understand that. What should be read all those information? So we can't include any package with the risk of runtime errors? We can't support that as unit tests also won't work on the build server.

project.json in the coreCLR branch looks like it references System.IO.FileSystem.Watcher in all supported .NET Standard versions, which leads me to believe NLog 5 won't work at all with UWP. This sort of explains why we are receiving these errors, right?

correct. Won't work. We could remove it, but not sure what will be the next issue.

I hope NETSTANDARD 2 fixes these issues.

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