I'm trying to create a class library that uses UWP controls (the lower the version the better), and I want it to use the new csproj format.
I figured MSBuild.Sdk.Extras is what I'm after. After reading the Readme I did the following:
<Project Sdk="MSBuild.Sdk.Extras">
<PropertyGroup>
<TargetFrameworks>uap</TargetFrameworks>
</PropertyGroup>
</Project>
{
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "2.0.54"
}
}
But when I try to build the project, I get the following error:
D:\Users\Shimmy\Source\Repos....csproj : error : The expression "[System.Version]::Parse('')" cannot be evaluated. Version string portion was too short or too long. >C:\Users\Shimmy.nuget\packages\msbuild.sdk.extras\2.0.54\Build\Platforms\Windows.targets
I'm willing to hear about other ways of UWP creating class libraries as long as it uses the new format.
This worked:
<Project Sdk="MSBuild.Sdk.Extras">
<PropertyGroup>
<TargetFramework>uap10.0</TargetFramework>
</PropertyGroup>
</Project>
Or one of the specific versions, i.e. uap10.0.16299
.