Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No C# compiler has been specified" trying to compile iOS Bindings library #24210

Closed
munkii opened this issue Aug 13, 2024 · 5 comments
Closed
Labels
migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/iOS 🍎 t/bug Something isn't working

Comments

@munkii
Copy link
Contributor

munkii commented Aug 13, 2024

Description

This has been raised before but was fixed with a VS update. Doesn't fix for me, I am running VS 17.11.0 Preview 6.0.

If I try and compile my ios bindings library I get the error

error BI0028: bgen: No C# compiler has been specified (using --compiler or --compile-command).

From 1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\tools\msbuild\iOS\Xamarin.Shared.targets(1746,3):

The CSProj looks like this

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0-ios</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>true</ImplicitUsings>
    <IsBindingProject>true</IsBindingProject>
  </PropertyGroup>

  <ItemGroup>
    <ObjcBindingApiDefinition Include="ApiDefinition.cs" />
    <ObjcBindingCoreSource Include="StructsAndEnums.cs" />
  </ItemGroup>
	<ItemGroup>
		<NativeReference Include="Frameworks\FAT\MirSmartDevice.framework">
			<Kind>Framework</Kind>
			<Frameworks>Foundation UIKit MirSmartDevice</Frameworks>
			<LinkerFlags>-L "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/" -L "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos" -Wl,-rpath -Wl,@executable_path/Frameworks</LinkerFlags>
		</NativeReference>
	</ItemGroup>
</Project>

I have an existing one in a live Xamarin Forms branch but I am trying to migrate to MAUI. I have had previous issues with this bindings library as discussed here, See comment thread

Steps to Reproduce

Try and build/rebuild project even just by itself (not part of wider solution) and it still fails

Link to public reproduction project repository

No response

Version with bug

8.0.80 SR8

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

Nope

Relevant log output

I followed the "Capturing Binary Logs" doc and the binlog is too big to be allowed
@munkii munkii added the t/bug Something isn't working label Aug 13, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@drasticactions
Copy link
Contributor

@rolfbjarne Should this be moved to xamarin-macios?

@munkii
Copy link
Contributor Author

munkii commented Aug 14, 2024

@drasticactions looking at what is in xamarin-macios it looks like it should be there. Shall I recreate there and close here? I don't have the rights to Transfer it

@drasticactions
Copy link
Contributor

@munkii If you can, please do. I would transfer it, but I also don't have the rights in this repo.

Binding tooling lives in xamarin-macios, along with the rest of the SDK tooling for iOS/Mac. This repo is for the MAUI UI project.

@munkii
Copy link
Contributor Author

munkii commented Aug 14, 2024

I have recreated this issue over at xamarin-macios, dotnet/macios#21030. Now closing this one

@munkii munkii closed this as completed Aug 14, 2024
@samhouts samhouts added platform/iOS 🍎 migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert labels Aug 19, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants