novotnyllc / MSBuildSdkExtras

Extra properties for MSBuild SDK projects
MIT License
346 stars 43 forks source link

The specified language targets for MonoAndroid90 is missing #178

Closed dm-CaT closed 5 years ago

dm-CaT commented 5 years ago

I'm developing Xamarin Plugin using SDK Extras. After Visual Studio update to 16.3.0 Preview 2.0 I got an error while project compiling:

The specified language targets for MonoAndroid90 is missing. Ensure correct tooling is installed for 'MonoAndroid'. Missing: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Xamarin\Android\Xamarin.Android.CSharp.targets' Plugin.NfcReader C:\Users[deleted user name].nuget\packages\msbuild.sdk.extras\2.0.31\Build\LanguageTargets\CheckMissing.targets

The same issue with iOS targets. I've checked the path 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Xamarin\Android\Xamarin.Android.CSharp.targets' - this file exists. Here is my .csproj file:

<Project Sdk="MSBuild.Sdk.Extras/2.0.31">

  <PropertyGroup>
    <!--Work around so the conditions work below-->
    <TargetFrameworks>netstandard1.0;netstandard2.0;Xamarin.iOS10;MonoAndroid90</TargetFrameworks>

    <AssemblyName>Plugin.NfcReader</AssemblyName>
    <RootNamespace>Plugin.NfcReader</RootNamespace>
    <PackageId>Plugin.NfcReader</PackageId>

    <Product>$(AssemblyName) ($(TargetFramework))</Product>
    <AssemblyVersion>1.0.0.0</AssemblyVersion>
    <AssemblyFileVersion>1.0.0.0</AssemblyFileVersion>
    <Version>1.0.0.0</Version>
    <PackageVersion>1.0.0.0</PackageVersion>
    <PackOnBuild>true</PackOnBuild>
    <NeutralLanguage>en</NeutralLanguage>
    <LangVersion>default</LangVersion>
    <DefineConstants>$(DefineConstants);</DefineConstants>

    <UseFullSemVerForNuGet>false</UseFullSemVerForNuGet>
    <EnableDefaultCompileItems>false</EnableDefaultCompileItems>

    <LangVersion>latest</LangVersion>
    <DebugType>portable</DebugType>

    <!--TODO: Fill these in-->
    <PackageLicenseUrl>LINK TO LICENSE</PackageLicenseUrl>
    <PackageProjectUrl>LINK TO PROJECT</PackageProjectUrl>
    <RepositoryUrl>LINK TO PROJECT</RepositoryUrl>
    <PackageReleaseNotes>RELEASE NOTES</PackageReleaseNotes>
    <PackageIconUrl>ICON URL</PackageIconUrl>
    <PackageTags>xamarin, windows, ios, android, xamarin.forms, plugin, NfcReader</PackageTags>

    <Title>NfcReader Plugin for Xamarin and Windows</Title>
    <Summary>Summary of nuget</Summary>
    <Description>Plugin Description</Description>

    <Owners>YOU</Owners>
    <Authors>YOU</Authors>
    <Copyright>Copyright 2018</Copyright>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)'=='Debug' ">
    <DebugSymbols>true</DebugSymbols>
    <GenerateDocumentationFile>false</GenerateDocumentationFile>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)'=='Release' ">
    <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="**\*.shared.cs" />
  </ItemGroup>

  <ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) ">
  </ItemGroup>

  <ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
    <Compile Include="**\*.android.cs" />
  </ItemGroup>

  <ItemGroup Condition=" $(TargetFramework.StartsWith('Xamarin.iOS')) ">
    <Compile Include="**\*.apple.cs" />
  </ItemGroup>

</Project>

I don't know where to look to fix an issue. Can someone point me?

clairernovotny commented 5 years ago

Looks like preview 2 is broken. It’s already fixed for the next one: https://twitter.com/jamesmontemagno/status/1162070730034434048?s=21

clairernovotny commented 5 years ago

Can you try Extras 2.0.41? Should have a fix for this.

dm-CaT commented 5 years ago

@onovotny , I did check. iOS and Android compiled successfully. Thanks a lot!