Skip to content
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 targeted project can't reference netstandard2.0 project #200

Open
AArnott opened this issue Dec 4, 2019 · 7 comments
Open

uap targeted project can't reference netstandard2.0 project #200

AArnott opened this issue Dec 4, 2019 · 7 comments

Comments

@AArnott
Copy link
Collaborator

AArnott commented Dec 4, 2019

When I have one project that targets uap that references another project that targets netstandard2.0, the build fails with this:

1>------ Rebuild All started: Project: NSLib, Configuration: Debug Any CPU ------
1>NSLib -> D:\Users\andarno\source\repos\ClassLibrary2\NSLib\bin\Debug\netstandard2.0\NSLib.dll
2>------ Rebuild All started: Project: ClassLibrary2, Configuration: Debug Any CPU ------
2>C:\Program Files\dotnet\sdk\3.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(234,5): error NETSDK1005: Assets file 'D:\Users\andarno\source\repos\ClassLibrary2\ClassLibrary2\obj\project.assets.json' doesn't have a target for 'UAP,Version=v10.0.18362'. Ensure that restore has run and that you have included 'uap10.0.18362' in the TargetFrameworks for your project.
2>Done building project "ClassLibrary2.csproj" -- FAILED.
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

This doesn't make sense because UAP apps should be able to reference netstandard2.0 projects, shouldn't they?

ClassLibrary2.zip

@clairernovotny
Copy link
Collaborator

clairernovotny commented Dec 5, 2019

It should work...just tried it with 16.5 and it works for me?

1>------ Rebuild All started: Project: NSLib, Configuration: Debug Any CPU ------
1>NSLib -> C:\Users\oren\Downloads\ClassLibrary2\NSLib\bin\Debug\netstandard2.0\NSLib.dll
2>------ Rebuild All started: Project: ClassLibrary2, Configuration: Debug Any CPU ------
2>ClassLibrary2 -> C:\Users\oren\Downloads\ClassLibrary2\ClassLibrary2\bin\Debug\netstandard2.0\ClassLibrary2.dll
2>ClassLibrary2 -> C:\Users\oren\Downloads\ClassLibrary2\ClassLibrary2\bin\Debug\netcoreapp2.1\ClassLibrary2.dll
2>ClassLibrary2 -> C:\Users\oren\Downloads\ClassLibrary2\ClassLibrary2\bin\Debug\uap10.0.18362\ClassLibrary2.dll
========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==========

Do you have the UWP 18362 SDK installed?

@AArnott
Copy link
Collaborator Author

AArnott commented Dec 5, 2019

I've tried with several UWP versions. I'm not too surprised that it worked for you, because it oddly seems random. If you rebuild a few times and scatter in some forced nuget restores, I suspect you'll see it some of the time.

@tusharpawar2585
Copy link

Hi Team, We have added UNO in our existing project created in Visual studio 2019( using .NetStandard). we have set target and min version for UWP as per BugTracker sample project but we are getting below error while running the .wasm project.

Severity Code Description Project File Line Suppression State

Error NU1201 Project XXXXXX.UWP is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Project ImageViewerPOC.UWP supports: uap10.0.16299 (UAP,Version=v10.0.16299) XXXXXX.Wasm D:UnoXXXXXXX.WasmXXXXXX.Wasm.csproj 1

@jalbertSyncroTech
Copy link

jalbertSyncroTech commented Jun 12, 2020

@AArnott or @clairernovotny do you have any updates on this? We started seeing this with 16.5.x as well, but weren't seeing it with 16.4.x. Also, it seems to be related to UWP Release builds only, and also in some cases the solution build completes successfully despite logging that the project build has failed.

@jwosty
Copy link

jwosty commented Aug 3, 2020

Still a problem for me, and it consistently shows up in both UWP Release and Debug.

@jalbertSyncroTech
Copy link

@clairernovotny any updates on this? It's still failing for us with the latest VS16.7.3 release. I have a potential work-around that involves multi-targeting the .net standard projects to include uap builds, but that introduces a bunch of other issues that we'll need to then deal with.

This seems to be the same issue as was previously addressed with #166, and I confirmed that code from that fix is still in place, so this seems like a new different instance of the same previous issue.

@jalbertSyncroTech
Copy link

@clairernovotny can you please respond? Even if there's no update, I'd like to know if you're still looking at these issue reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants