Giter VIP home page Giter VIP logo

Comments (9)

JamesRandall avatar JamesRandall commented on May 23, 2024 2

Thank you for that - I've found the issue! Your project worked for me and so I compared my command line with yours and realised that you are using the Visual Studio 2017 folder as part of your path. I never use that and always use something like d:\wip. The space in the path caused the command line arguments to get thrown off.

If you update the FunctionMonkey.Compiler package it should now work for you.

Thanks for your help - because of how I set up my environments it would have been super hard for me to find this on my own.

from functionmonkey.

JamesRandall avatar JamesRandall commented on May 23, 2024 1

There's been a few changes since my original blog post (not sure why you're getting that error though) and its properly documented over here so worth checking this:
http://functionmonkey.azurefromthetrenches.com/guides/gettingStarted.html
I'll update the blog post with a pointer to the new docs.

To add, what I meant by those files is the one you've entered into your solution. Sometimes people have made subtle differences when typing which cause a problem I haven't anticipated and so you don't get a very helpful message. Really appreciate people sharing this stuff as it helps me massively. Thanks!

from functionmonkey.

skalahonza avatar skalahonza commented on May 23, 2024 1

Monkey.zip
Here it is. Maybe I totally messed something up, but I tried it many times.

from functionmonkey.

JamesRandall avatar JamesRandall commented on May 23, 2024

Thanks for getting in touch!

Could you share the code for the command you are basing the function on please? And your IFunctionAppConfiguration implementation also. Thanks!

from functionmonkey.

skalahonza avatar skalahonza commented on May 23, 2024

Sorry, I forgot to add a link for the tutorial. I follwoed this one: https://www.azurefromthetrenches.com/build-elegant-rest-apis-with-azure-functions/

public class GetBlogPostQueryHandler : ICommandHandler<GetBlogPostQuery, BlogPost>
    {
        public Task<BlogPost> ExecuteAsync(GetBlogPostQuery command, BlogPost previousResult)
        {
            return Task.FromResult(new BlogPost
            {
                Body = "Our blog posts main text",
                PostId = command.PostId,
                Title = "Post Title"
            });
        }
    }```

```cs
public class BlogPost
    {
        public Guid PostId { get; set; }
        public string Title { get; set; }
        public string Body { get; set; }
    }
 public class GetBlogPostQuery : ICommand<BlogPost>
    {
        public Guid PostId { get; set; }
    }
    public class ServerlessBlogConfiguration : IFunctionAppConfiguration
    {
        public void Build(IFunctionHostBuilder builder)
        {
            builder
                .Setup((serviceCollection, commandRegistry) =>
                {
                    commandRegistry.Discover<ServerlessBlogConfiguration>();
                })
                .Functions(functions => functions
                    .HttpRoute("/api/v1/post", route => route
                        .HttpFunction<GetBlogPostQuery>(HttpMethod.Get)
                    )
                );
        }
    }

from functionmonkey.

JamesRandall avatar JamesRandall commented on May 23, 2024

Did the new docs help?

from functionmonkey.

skalahonza avatar skalahonza commented on May 23, 2024

Unfortuately not
I followed the instructions and try to compile hello world example.

I got this:
1>------ Build started: Project: Monkey, Configuration: Debug Any CPU ------ 1>Monkey -> C:\Users\Jan Skála\Documents\Visual Studio 2017\Projects\Talxis\Functions\Monkey\bin\Debug\netstandard2.0\bin\Monkey.dll 1> 1>Unhandled Exception: System.FormatException: String was not recognized as a valid Boolean. 1> at System.Boolean.Parse(String value) 1> at FunctionMonkey.Compiler.Program.Main(String[] args) in D:\wip\myOpenSource\functionMonkey\Source\FunctionMonkey.Compiler\Program.cs:line 22 1>C:\Users\Jan Skála\.nuget\packages\functionmonkey.compiler\0.10.1-beta000\build\netstandard1.0\FunctionMonkey.Compiler.targets(10,5): error MSB3073: The command "dotnet "C:\Users\Jan Skála\.nuget\packages\functionmonkey.compiler\0.10.1-beta000\build\netstandard1.0\..\..\tools\netcoreapp2.0/FunctionMonkey.Compiler.dll" C:\Users\Jan Skála\Documents\Visual Studio 2017\Projects\Talxis\Functions\Monkey\bin\Debug\netstandard2.0\bin\Monkey.dll" exited with code -532462766. 1>Done building project "Monkey.csproj" -- FAILED.
If you want, I can zip you the project.

from functionmonkey.

JamesRandall avatar JamesRandall commented on May 23, 2024

If you could zip the project for me that would be great! Thank you!

from functionmonkey.

skalahonza avatar skalahonza commented on May 23, 2024

Works like a charm, will try to publish to azure. Thanks once again.

from functionmonkey.

Related Issues (20)

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.