Closed dulfe closed 7 years ago
I found a workaround!
First, I downloaded the "source" files and ran BuildAndPackage.cmd
, that generated the new NuGet Packages (version 1.0.7).
I used those packages in a new project and the problem persisted.
So, I deleted the folder Packaging/Content
and rerun BuildAndPackage.cmd
, again, that generated a new NuGet Packages but this time those packages worked!... (I had to delete my NuGet Packages cache)
Daniel
Thanks for reporting this Daniel. Can you tell me a little more about what you think the root cause of the problem was? Do you feel the NuGet package that is published on NuGet.org is having problems with the latest version of NuGet or the runtime? Or do you think something might have gotten corrupt locally?
Oh, and just to be sure, have you gone to Extensions and Updates in Visual Studio to make sure you don't have a NuGet Package Manager update?
Thanks again!
The folder Packaging/Content
has a file named Microsoft.IoT.DeviceCore.targets
which has:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<SDKReference Include="WindowsIoT, Version=10.0.10240.0">
<Name>Windows IoT Extensions for the UWP</Name>
</SDKReference>
</ItemGroup>
</Project>
I do not know much about how to create a NuGet package, but that seems like it is forcing the compiler to use the SDK 10.0.10240.0 instead of whatever the target project is using, so the compiler ends up trying to use both SDK and gets confused.
Without that file, the packages work fine.
And yes, I updated VS with all its extensions (including NuGet Package Manager)
Thank you for this great library! Daniel.
dulfe, I suggest you try setting the project properties target version for all of the lib projects to 14393 instead of 10240. This will probably resolve your issue. The version that comes out of this repository is still targeting 10240.
@jyarbro , I tried that, ran BuildAndPackage.cmd
and I had the same issue.... the only way I was able to fix it was deleting the file Microsoft.IoT.DeviceCore.targets
.
My local copy is working, so I am OK for now. I hope it gets fixed in the next official release. Thank you!.
We can safely remove the targets file. I was trying to save users an extra step having to reference the UWP for IoT extension. But that never seemed to work well. It can be removed. I will do an update when I return from travels. Thank you both for your research on this. And thank you especially @dulfe for finding a solution!
I believe this issue has been fixed by @jyarbro in #9. Is that correct?
Actually, it looks like @jyarbro didn't touch the .targets or .nuspec like I thought he did. I'm sorry, I'll leave this open for now. And I apologize I haven't gotten to fixing it yet this week. If not this week I hope to early next week. I am trying to prepare for somewhat unexpected travel.
If either of you would like to update the nuspec and do a pull request I'd be happy to accept it. Then all I'd need to do is build an updated package and submit it to NuGet. If not, I'll try to get to it ASAP.
Thanks!
Yeah I didn't want to submit this particular change as I don't have a test environment exhibiting the flaw currently and no way to test if the change did anything.
or Changing the version # works too
`<?xml version="1.0" encoding="utf-8"?>
Thanks very much to @dulfe for resolving the vast majority of these issues. I was finally able to get time today away from other responsibilities to test this across the board and build new NuGet packages. I also did some other cleanup. These changes are now incorporated in NuGet package 1.0.8 and later. Thank you again @dulfe, I'm closing this issue.
Using the latest SDK (10.0.14393.0) the BUILD process fails with the error:
and Warning:
Steps to reproduce:
"Microsoft.IoT.Devices": "1.0.6"