Skip to content

Commit

Permalink
Don't call _ComputeBindingVariables on legacy Xamarin.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Jun 5, 2023
1 parent 4f0378b commit 5856d89
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
10 changes: 10 additions & 0 deletions msbuild/Xamarin.Shared/Xamarin.Shared.props
Expand Up @@ -317,13 +317,23 @@ Copyright (C) 2020 Microsoft. All rights reserved.
<BTouchToolPath Condition="'$(OS)' == 'Unix' And '$(BTouchToolPath)' == ''">$(_XamarinSdkRoot)/bin/</BTouchToolPath>
<BTouchToolPath Condition="'$(OS)' != 'Unix' And '$(_PlatformName)' != 'macOS' And '$(BTouchToolPath)' == ''">$(MSBuildExtensionsPath)\Xamarin\iOS\</BTouchToolPath>

<BTouchLibPath Condition="'$(OS)' == 'Unix' And '$(BTouchToolPath)' == ''">$(_XamarinSdkRoot)/bin/</BTouchLibPath>
<BTouchLibPath Condition="'$(OS)' != 'Unix' And '$(_PlatformName)' != 'macOS' And '$(BTouchToolPath)' == ''">$(MSBuildExtensionsPath)\Xamarin\iOS\</BTouchLibPath>

<BTouchToolExe Condition="'$(OS)' == 'Unix' And '$(BTouchToolExe)' == ''">bgen</BTouchToolExe>
<BTouchToolExe Condition="'$(OS)' != 'Unix' And '$(BTouchToolExe)' == ''">bgen.exe</BTouchToolExe>

<GeneratedSourcesDir Condition="'$(GeneratedSourcesDir)' == ''">$(IntermediateOutputPath)$(_PlatformName)</GeneratedSourcesDir>
<GeneratedSourcesDir Condition="'$(GeneratedSourcesDir)' != '' and !HasTrailingSlash ('$(GeneratedSourcesDir)')">$(GeneratedSourcesDir)\</GeneratedSourcesDir>
<_GeneratedSourcesFileList>$(GeneratedSourcesDir)sources.list</_GeneratedSourcesFileList>

<_GeneratorAttributeAssembly Condition="'$(_PlatformName)' == 'iOS'">$(BTouchLibPath)Xamarin.iOS.BindingAttributes.dll</_GeneratorAttributeAssembly>
<_GeneratorAttributeAssembly Condition="'$(_PlatformName)' == 'watchOS'">$(BTouchLibPath)Xamarin.WatchOS.BindingAttributes.dll</_GeneratorAttributeAssembly>
<_GeneratorAttributeAssembly Condition="'$(_PlatformName)' == 'tvOS'">$(BTouchLibPath)Xamarin.TVOS.BindingAttributes.dll</_GeneratorAttributeAssembly>
<_GeneratorAttributeAssembly Condition="'$(_PlatformName)' == 'macOS' And '$(TargetPlatformName)' == 'Modern'">$(BTouchLibPath)Xamarin.Mac-mobile.BindingAttributes.dll</_GeneratorAttributeAssembly>
<_GeneratorAttributeAssembly Condition="'$(_PlatformName)' == 'macOS' And '$(TargetPlatformName)' == 'Full'">$(BTouchLibPath)Xamarin.Mac-full.BindingAttributes.dll</_GeneratorAttributeAssembly>
<_GeneratorAttributeAssembly Condition="'$(_PlatformName)' == 'macOS' And '$(TargetPlatformName)' == 'System'">$(BTouchLibPath)Xamarin.Mac-full.BindingAttributes.dll</_GeneratorAttributeAssembly>

<ProcessEnums Condition="'$(ProcessEnums)' == ''">false</ProcessEnums>

<!-- The generated binding code is unsafe, so make sure to allow unsafe code when compiling the C# code -->
Expand Down
9 changes: 8 additions & 1 deletion msbuild/Xamarin.Shared/Xamarin.Shared.targets
Expand Up @@ -1621,7 +1621,14 @@ Copyright (C) 2018 Microsoft. All rights reserved.
<WriteLinesToFile File="$(OutputFilePath)" Lines="@(_ComputedRemoteGeneratorProperties)" />
</Target>

<Target Name="_ComputeCompileApiDefinitionsInputs" DependsOnTargets="_ComputeBindingVariables">
<PropertyGroup>
<_ComputeCompileApiDefinitionsInputsDependsOn Condition="'$(UsingAppleNETSdk)' == 'true'">
$(_ComputeCompileApiDefinitionsInputsDependsOn);
_ComputeBindingVariables;
</_ComputeCompileApiDefinitionsInputsDependsOn>
</PropertyGroup>

<Target Name="_ComputeCompileApiDefinitionsInputs" DependsOnTargets="$(_ComputeCompileApiDefinitionsInputsDependsOn)">
<ItemGroup>
<BTouchReferencePath Include="@(ReferenceCopyLocalPaths)" Condition="'%(Extension)' == '.dll'" />
</ItemGroup>
Expand Down

0 comments on commit 5856d89

Please sign in to comment.