clairernovotny / ReferenceGenerator

MIT License
75 stars 13 forks source link

error with class library (universal windows) #4

Closed jorisdebock closed 8 years ago

jorisdebock commented 8 years ago

with a class library (universal windows) i am getting an error in visual studio when it runs the refgen.exe

''' exited with code -1 Sequence contains no matching element '''

clairernovotny commented 8 years ago

Hi @jorisdebock. I can repro this and am looking into the correct fix for it. The underlying issue is that I'm relying on the $(NuGetTargetMoniker) variable to match against the correct node in the project.lock.json file and it's returning UAP,Version=v10.0.10240 whereas the node in project.lock.json contains only UAP,Version=v10.0.

Question is whether it should be truncated at Major.Minor or if there's times when the full string is required...

@ericstj?

jorisdebock commented 8 years ago

@onovotny so far i know the full string is not used, but not sure

clairernovotny commented 8 years ago

Adding @Emgarten and @yishaigalatzer. Question is what's the right behavior for the $(NuGetTargetMoniker) -> targets mapping in the project.lock.json file.

yishaigalatzer commented 8 years ago

The string can be used to limit versions when new surface area in uap shows up.

Uap10 says its the minimal surface area (or that its compatible with all)

Cc // @jasonmal

clairernovotny commented 8 years ago

Hmm....looking at the Microsoft.NuGet.targets, it seems like the secret is that it also checks $(_NuGetTargetFallbackMoniker) in addition to $(NuGetTargetMoniker).

clairernovotny commented 8 years ago

This is now fixed in 1.3.0, just pushed to the NuGet gallery, thanks!

If you do use this with a UWP class library, you should also add the following to your csproj:

<PropertyGroup>
    <!-- uap10.0 TFM-->
    <NuSpecTfm>uap10.0</NuSpecTfm>
</PropertyGroup>

and put the output files into \lib\uap10.0 in your NuGet package as it's UWP specific and wouldn't work with all of dotnet anyway...because it's platform specific.

jorisdebock commented 8 years ago

ok thanks working great now :)