Giter Site home page Giter Site logo

Comments (3)

delinx32 avatar delinx32 commented on July 19, 2024

I was able to get past this by adding this stuff to my csproj:

	<LangVersion>11.0</LangVersion>
	<AnalysisMode>Recommended</AnalysisMode>
	<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
	<IsPackable>false</IsPackable>

Not sure which one fixed it (probably the avalonia one?), but the project builds. The designer still won't work. It's looking in the wrong directory for the dll (the .godot folder instead of the actual bin). Still trying to figure that one out. It happens in my project and the sample projects.

from estragonia.

MrJul avatar MrJul commented on July 19, 2024

Thanks for the report, it's <LangVersion>11.0</LangVersion> that fixes it.

Estragonia targets C# 11, which has a breaking change regarding ref structs escape analysis. Projects targeting C# 10 (which is the default for net6.0 projects generated by Godot) are unable to call the method.

I'll change the target language level used by the library to C# 10 for now, as C# 11 isn't really needed. With this change, consuming projects can be either C# 10 or 11 and it'll work.


Regarding the previewer, which IDE are you using with which plugin? I just tested:

  • Fresh git clone of Estragonia
  • Open the GameMenu.sln sample in VS2022 with AvaloniaVS installed
  • Build the solution
  • The designer shows without any issue

Same thing with Rider with AvaloniaRider.
What error do you get?

Note that the Godot SDK sets the project output path to .godot\mono\temp\bin so it's normal for the assemblies to be searched there. It should be completely transparent to the previewer, which uses whatever output path is configured.

Would you mind opening another issue or discussion regarding the previewer to keep it separate from the C# errors?

from estragonia.

MrJul avatar MrJul commented on July 19, 2024

Fixed in 1.0.1: please update if you don't want to have to target C# 11.

from estragonia.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.