UpdateRoslynType compilation error
- Dominant language
- C#
- Stars
- 25
- Forks
- 10
- Avg merge
- 12h 50m
- Merged PRs (30d)
- 10
Description
when` xcsync watch` is run on a simple dotnet new iOS project and a change has been detected in the Xcode project, currently encountering the following:
> [13:28:21 ERR xcsync (29)] iOS: Compilation errors found
[13:28:21 ERR xcsync (29)] iOS: /Users/harithamohan/src/iOS/Main.cs(6,41): error CS0246: The type or namespace name 'AppDelegate' could not be found (are you missing a using directive or an assembly reference?)
[13:28:21 ERR xcsync (29)] The AppDelegate type could not be located for synchronization.
So this is stemming from:
https://github.com/dotnet/xcsync/blob/0344c637529976873f615279dd92565a1a72cbc3/src/xcsync/SyncContext.cs#L452
and more specifically, from `UpdateRoslynType`:
https://github.com/dotnet/xcsync/blob/0344c637529976873f615279dd92565a1a72cbc3/src/xcsync/Projects/XcodeWorkspace.cs#L190
Main.cs:
```csharp
using iOS;
// This is the main entry point of the application.
// If you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main (args, null, typeof (AppDelegate));
```
AppDelegate.cs:
```csharp
namespace iOS;
[Register ("AppDelegate")]
public class AppDelegate : UIApplicationDelegate {
public override UIWindow? Window {
get;
set;
}
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
// create a new window instance based on the screen size
Window = new UIWindow (UIScreen.MainScreen.Bounds);
// create a UIViewController with a single UILabel
var vc = new UIViewController ();
vc.View!.AddSubview (new UILabel (Window!.Frame) {
BackgroundColor = UIColor.SystemBackground,
TextAlignment = UITextAlignment.Center,
Text = "Hello, iOS!",
AutoresizingMask = UIViewAutoresizing.All,
});
Window.RootViewController = vc;
// make the window visible
Window.MakeKeyAndVisible ();
return true;
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.