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

🐛 Bug Report: .NET starter fails to build locally #50

Closed
2 tasks done
moguzalp opened this issue Sep 10, 2023 · 4 comments
Closed
2 tasks done

🐛 Bug Report: .NET starter fails to build locally #50

moguzalp opened this issue Sep 10, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@moguzalp
Copy link

👟 Reproduction steps

When I build https://github.com/appwrite/templates/tree/main/dotnet/starter csproj

👍 Expected behavior

Build successfully

👎 Actual Behavior

In public async Task Main(RuntimeContext Context)

The type or namespace name 'RuntimeOutput' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'RuntimeContext' could not be found (are you missing a using directive or an assembly reference?)

🎲 Appwrite version

Version 1.4.x

💻 Operating system

Windows

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@moguzalp moguzalp added the bug Something isn't working label Sep 10, 2023
@loks0n loks0n changed the title 🐛 Bug Report: 🐛 Bug Report: .NET starter fails to build Sep 11, 2023
@loks0n loks0n self-assigned this Sep 11, 2023
@loks0n
Copy link
Member

loks0n commented Sep 11, 2023

Hey @moguzalp !
Thanks for creating this issue.

Is the build output you have provided from your local machine, or from the function build logs display in Appwrite Console?

If it's from your local machine, the function is failing to build because it doesn't have the runtime context objects used by Open Runtimes run your function.

If it's from the function build logs on Appwrite Console, it's a bug and we would need to fix the template.

@moguzalp
Copy link
Author

Hey @loks0n ,
Thanks for the reply.

It is the issue:

"If it's from your local machine, the function is failing to build because it doesn't have the runtime context objects used by Open Runtimes run your function."

Let me details in my words:

if I deploy the code to self container appwrite, I mean to localhost appwrite, it works as expected.
However I want to develop .csproj file in visual studio, it does not compile because it does not resolve the RuntimeOutput and RuntimeContext although it has appwrite nuget package.

@loks0n loks0n changed the title 🐛 Bug Report: .NET starter fails to build 🐛 Bug Report: .NET starter fails to build locally Sep 11, 2023
@loks0n
Copy link
Member

loks0n commented Sep 11, 2023

Ah, okay. The RuntimeOutput and RuntimeContext are added by the Open Runtimes container before you code is executed on Appwrite. You can see the code for this here.

In the future we'd like to build some helper functions to mitigate these local errors, but for now it's fine to ignore them. If you have any suggestions as to how we can improve Visual Studio support, we'd love to hear them 🚀

@moguzalp
Copy link
Author

From my experience on appwrite, appwrite is awesome product. It works as self container and it has a cloud version as well.

But more documentation is needed it seems. Especially while version upgrades such as Appwrite 1.4 for example.
So far I found the answers to my question while digging in appwrite's github issues fortunately.

This thread I created will help many others I hope.
Thanks for awesome answer.

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

No branches or pull requests

2 participants