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
In a .NET Standard project I'm referencing a NuGet Package, that in turn references other nuget packages to perform bait'n'switch. For instance sub-packages for UWP, Android and iOS. These sub packages deploy various resources like native libraries, shaders etc.
Next you create your app heads for iOS, Android and UWP, and you reference your .NET Standard project. In turn the NuGet package also gets available for compilation. You can even access the APIs in the package from the project heads. However, the .targets and contents down in the package dependencies are not included, and thus at runtime, your app will crash, because the native libs and resources doesn't get deployed.
The workaround currently is to set "privateAssets=none" on the nuget reference, but this is very counter intuitive and is going to hurt my customers. They would expect things to "just work" when it compiles fine. At no point has my nuget package said to ignore .targets and contents (the dependency list in the nuget package does specify include="all" already, but it seems to not actually be doing that).
The interesting bit is, this issue doesn't affect UWP, but it affects WPF, iOS and Android.
Even worse, when using packages.config instead of Package Reference in your project head, you don't get any access to the APIs from the nuget package in the project heads. You have to manually add the package again in the project head.
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): VS UI
NuGet version (x.x.x.xxx): 4.5.0.4685
VS version (if appropriate): 15.5.2
OS version (i.e. win10 v1607 (14393.321)): win10 v1709 (16299.98)
Worked before? If so, with which NuGet version: AFAIK never worked
Sample Project
I can provide packages that reproduces the issue, but due to them having NDA content, it would have to be done through a back-channel.
/CC @rohit21agrawal helped me track down the issue. He understands it better and said he would add some more details here
The text was updated successfully, but these errors were encountered:
In a .NET Standard project I'm referencing a NuGet Package, that in turn references other nuget packages to perform bait'n'switch. For instance sub-packages for UWP, Android and iOS. These sub packages deploy various resources like native libraries, shaders etc.
Next you create your app heads for iOS, Android and UWP, and you reference your .NET Standard project. In turn the NuGet package also gets available for compilation. You can even access the APIs in the package from the project heads. However, the .targets and contents down in the package dependencies are not included, and thus at runtime, your app will crash, because the native libs and resources doesn't get deployed.
The workaround currently is to set "privateAssets=none" on the nuget reference, but this is very counter intuitive and is going to hurt my customers. They would expect things to "just work" when it compiles fine. At no point has my nuget package said to ignore .targets and contents (the dependency list in the nuget package does specify
include="all"
already, but it seems to not actually be doing that).The interesting bit is, this issue doesn't affect UWP, but it affects WPF, iOS and Android.
Even worse, when using packages.config instead of Package Reference in your project head, you don't get any access to the APIs from the nuget package in the project heads. You have to manually add the package again in the project head.
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):
VS UI
NuGet version (x.x.x.xxx):
4.5.0.4685
VS version (if appropriate):
15.5.2
OS version (i.e. win10 v1607 (14393.321)):
win10 v1709 (16299.98)
Worked before? If so, with which NuGet version:
AFAIK never worked
Sample Project
I can provide packages that reproduces the issue, but due to them having NDA content, it would have to be done through a back-channel.
/CC @rohit21agrawal helped me track down the issue. He understands it better and said he would add some more details here
The text was updated successfully, but these errors were encountered: