-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
UAP target doesn't have package references properly generated/used #477
Comments
/cc @piotrpMSFT @yishaigalatzer |
Happens on latest RC with preview4 sdk. |
Here is the diagnostic build log showing a netstandard and a uap cross compiled build. You can see that there are no resolved package dependencies for the uap build. |
tag @nguerrera @ericstj |
and @dsplaisted |
I think you can work around this by setting the following when the <NugetTargetMoniker>UAP,Version=v10.0</NugetTargetMoniker> The problem is that without this, the |
Those lines were inherited from Microsoft.NuGet.targets and presumably their application is the same in this context. The full condition suggests that explicitly setting |
While setting This should only happen for an AppX, Xap or Exe. The UWP library project shouldn't have all of the NuGet references copied to its output directory (slow/size, etc). |
Similar issues with other TFM's. It's not calculating the version correctly in the lock file. In the lock file it was Version=v0.0 For <PropertyGroup Condition="'$(TargetFramework)' == 'portable-win81+wpa81'">
<TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile32</TargetFrameworkProfile>
<DefaultLanguage>en-US</DefaultLanguage>
<NugetTargetMoniker>.NETPortable,Version=v0.0,Profile=Profile32</NugetTargetMoniker>
<LanguageTargets>$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets</LanguageTargets>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'win8'">
<NugetTargetMoniker>Windows,Version=v8.0</NugetTargetMoniker>
<TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<PackageTargetFallback>$(PackageTargetFallback);netstandard1.1</PackageTargetFallback>
<LanguageTargets>$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets</LanguageTargets>
</PropertyGroup> The ones for the "inbox" frameworks, windows, wp, wpa, sl, profile pcl's and xamarin should have these property groups in there by default in the SDK |
@onovotny I believe this is because the SDK currently only defaults $(CopyLocalLockFileAssemblies) to false for .NET Core or .NET Standard. Can you try setting this to false yourself? Or did swapping the LanguageTargets already resolve that? |
@nguerrera adding that line to disable the local lock file copy did the trick. The LanguageTargets did not. |
When working on this bug, keep in mind that calculating the NuGet Moniker based on |
maybe? |
Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label. |
This issue will now be closed since it has been labeled 'stale' without activity for 30 days. |
When trying to cross compile with a project that includes a
uap10.0
target, the csc task doesn't have the package references resolved correctly and put on the CSC task.To repro, look at the
vs2017
branch of https://github.com/onovotny/Zeroconf/tree/vs2017In there you'll see it cross-compiling to
netstandard1.3
anduap10.0
. The problem is that it's using the wrongmscorlib
reference foruap10.0
and when you look at the msbuild log and csc task invocation, it's not passing the correct /reference's that include all of the package dependencies that come from both theNETStandard.Library
and theMicrosoft.NETCore.UniversalWindowsPlatform
reference. The RAR task seems to not generate anything.Not sure if this is in the SDK tasks or the NuGet tasks?
The text was updated successfully, but these errors were encountered: