Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Can't compile a Windows app using this library #105

Open
ScottArbeit opened this issue Jan 30, 2022 · 10 comments
Open

Can't compile a Windows app using this library #105

ScottArbeit opened this issue Jan 30, 2022 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@ScottArbeit
Copy link

Hi! Quick question: I'm trying this library for the first time, and I use Windows, so I was hoping to just compile a Windows app to look at things. When I select Windows in the platform drop-down, I get errors, as shown:

image

image

Repro:

  1. Open VS2022 (using Version 17.1.0 Preview 4.0, with MAUI Preview 12)
  2. Create new .NET MAUI project
  3. Add Microsoft.Maui.Graphics.Controls NuGet package from nightly feed
  4. Add using statements and call to .ConfigureGraphicsControls()
  5. Select Windows from the platform drop-down menu
  6. Get errors when trying to compile to Windows

Is this expected right now? I understand that this is experimental, so, if Windows just isn't implemented yet, that's fine. Just want to make sure I'm not being an idiot...

@jsuarezruiz jsuarezruiz self-assigned this Jan 31, 2022
@jsuarezruiz jsuarezruiz added the bug Something isn't working label Jan 31, 2022
@dev-thinks
Copy link

yes. not compiling with windows. bump when try adding it from nightly build.

@tobiasbaur
Copy link

tobiasbaur commented Feb 17, 2022

It worked with 250, but not 253 on Windows in preview 12.

In a related topic, the library seems to be not working in maui (Windows) preview 13. Can anybody confirm this? And is a fix planned?

When calling

var builder = MauiApp.CreateBuilder(); builder .UseMauiApp<App>() .ConfigureGraphicsControls(DrawableType.Material);
The Exception

System.MissingFieldException: "Field not found: 'Microsoft.Maui.Graphics.Win2D.W2DGraphicsService.Instance'."

is thrown.
If I comment it out, the code works, but elements are not drawn.

@EthanHipps
Copy link

@tobiasbaur I encountered a similar error today when I tried adding the library to my project. Preview 13 too, but building for Android instead of Windows. If I comment out .ConfigureGraphicsControls(DrawableType.Material) the project builds and works without issue.

image

The Exception:

Could not resolve type with token 010000b2 from typeref (expected class 'Microsoft.Maui.Graphics.Native.NativeGraphicsService' in assembly 'Microsoft.Maui.Graphics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null')

@jsuarezruiz
Copy link
Contributor

This issues with Preview 13 will be fixed with #106 (in progress)

@aliessmael
Copy link

aliessmael commented Jul 9, 2022

Not compiling, I am using this GitHub code ( not able to find NuGet package ) and I have Visual studio 17.3.0 Preview 2.0, Windows 10 Pro

@KMRH47
Copy link

KMRH47 commented Jul 18, 2022

Also broken here running VS 2022 Version 17.3.0 Preview 3.0

@MattBDev
Copy link

MattBDev commented Aug 4, 2022

Will this be fixed anytime soon or is the plan to abandon this library and merge it into .NET MAUI?

@WongResearch
Copy link

This issues with Preview 13 will be fixed with #106 (in progress)

Hopefully #106 will make it to the nightly build soon.

For those using the latest nightly build (294) and must target windows you can try excluding it for now for it to compile for ios and android:

2022-10-13 at 17 09 02

2022-10-13 at 17 09 38

@juliusdeblaaij
Copy link

Is there any progress on this front?

@mgramley
Copy link

mgramley commented Sep 8, 2023

Any update on this bug? I still can't get this library to work with windows

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests