-
Notifications
You must be signed in to change notification settings - Fork 258
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
WPF with PackageReference and referencing .NET Core project produces NuGet error on build #4652
Comments
Thanks for the tip, @emgarten. The workaround appears to be incomplete. Although it avoids the error message I report above, it is replaced by several new ones from the WPF temporary project, which evidently doesn't contain the resolved package references that the original WPF project does:
These errors are consistent with what I would expect if this PackageReference were missing from the original WPF project: <PackageReference Include="PCLCommandBase" Version="0.3.5" /> Of course, it is there, but the tmp_proj probably isn't resolving it. |
Dupe of #4532 according to @zhili1208 |
@AArnott - can you confirm that this is fixed nowadays? the duplicate bug was fixed in 4.1. |
@rrelyea Happy to test. How do I use 4.1? What vehicle does it ship in? |
just use VS 2017 15.3 to restore and build |
Yes, it appears to be fixed in 15.3.0. Thanks. |
* Add latest WPF/NuGet workaround See NuGet/Home#5894 (comment) for context. * Add %TEMP%\packages to NuGet.config This ensures that the local dev packages automatically copied into that directory by MSBuild.Sdk.Extras can be used by sample and test projects. * Rewrite WpfApplication sample to consume SDK * Add and use a NuGet package in the WPF sample This makes failure to pick up the NuGet packages an easy-to-detect compile error. I used PCLCommandBase because that was used in NuGet/Home#4652 (comment) Furthermore, note that I did not retarget the sample project to net472, yet it still works. net472 must be *installed* on the build machine for this change to succeed; it need not be *targeted*. * Move WpfAppUsingSdk into tests directory per request * Remove local key from top-level NuGet.config * Move project into correct solution * Move WPF NuGet props import Also updated a few comments while I was at it.
There is still an issue with PackageReference that contains source files (imported with PrivateAssets="All"). The source files are not picked up at compile time. This is specific to |
WPF stopped building reliably after I added my first PackageReference to it.
Expected
Successful build. I've seen this occasionally on this source version, suggesting that this is a non-deterministic failure.
Actual
Also as seen on Appveyor
Repro machine has: d15rel 26217.2
The text was updated successfully, but these errors were encountered: