Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 14 15:19

    github-actions[bot] on v4.5.0

    (compare)

  • Apr 14 15:17

    jeremydmiller on master

    option to also clear state on a… (compare)

  • Apr 14 13:59

    github-actions[bot] on v4.4.0

    (compare)

  • Apr 14 13:54

    jeremydmiller on master

    new extension methods for rebui… (compare)

  • Apr 13 19:46

    github-actions[bot] on v4.3.1

    (compare)

  • Apr 13 19:43

    jeremydmiller on master

    changing the resources display … (compare)

  • Apr 13 13:43

    github-actions[bot] on v4.3.0

    (compare)

  • Apr 13 13:34

    jeremydmiller on master

    Workaround for extension servic… (compare)

  • Apr 08 15:56

    github-actions[bot] on v4.2.0

    (compare)

  • Apr 08 15:53
    dependabot[bot] labeled #65
  • Apr 08 15:53
    dependabot[bot] opened #65
  • Apr 08 15:53

    dependabot[bot] on npm_and_yarn

    Bump prismjs from 1.25.0 to 1.2… (compare)

  • Apr 08 15:53
    jeremydmiller closed #64
  • Apr 08 15:53
    jeremydmiller closed #62
  • Apr 08 15:53
    jeremydmiller closed #61
  • Apr 08 15:53
    jeremydmiller closed #63
  • Apr 08 15:53
    jeremydmiller closed #60
  • Apr 08 15:53

    jeremydmiller on master

    ran the stdocs to vitepress con… *mostly* converted docs to Vite… deleting obsolete stdocs docume… and 9 more (compare)

  • Apr 08 15:36
    jeremydmiller milestoned #64
  • Apr 08 15:36
    jeremydmiller milestoned #63
Brian Dukes
@bdukes
I found that it works with Oakton 3.0.0 (which is what I was getting when I referenced Oakton.AspNetCore), but not with 3.0.1, 3.0.2, or 3.1.0
Jeremy D. Miller
@jeremydmiller
@bdukes When you did that, did you get any Nuget warnings about version mismatches?
Brian Dukes
@bdukes
no, only when I tried to use Oakton 2.0.5
Brian Dukes
@bdukes

That error was:

Determining projects to restore...
C:\inetpub\wwwroot\iss.local\InnovativeStaffSolutions.EmployeeManagement.Web\InnovativeStaffSolutions.EmployeeManagement.Web.csproj : error NU1605: Detected package downgrade: Oakton from 3.0.0 to 2.0.5. Reference the package directly from the project to select a different version.
C:\inetpub\wwwroot\iss.local\InnovativeStaffSolutions.EmployeeManagement.Web\InnovativeStaffSolutions.EmployeeManagement.Web.csproj : error NU1605: InnovativeStaffSolutions.EmployeeManagement.Web -> Lamar.Diagnostics 3.0.2 -> Oakton (>= 3.0.0 && < 4.0.0)
C:\inetpub\wwwroot\iss.local\InnovativeStaffSolutions.EmployeeManagement.Web\InnovativeStaffSolutions.EmployeeManagement.Web.csproj : error NU1605: InnovativeStaffSolutions.EmployeeManagement.Web -> Oakton (>= 2.0.5)
Failed to restore C:\inetpub\wwwroot\iss.local\InnovativeStaffSolutions.EmployeeManagement.Web\InnovativeStaffSolutions.EmployeeManagement.Web.csproj (in 792 ms).

Brian Dukes
@bdukes
@jeremydmiller were you able to take a look at that issue and replicate? let me know if there's any other info I can provide. Thanks!
Brian Dukes
@bdukes
Looking at the difference between 3.0.0 and 3.0.1, it looks like it's probably related to the RunCommand switching to OaktonAsyncCommand (or, rather, the changes to the body of the command when that change happened)
Brian Dukes
@bdukes
I've confirmed that reverting the code in RunCommand to the non-async version fixed the issue for me. I tried a few variations with the async version but couldn't get it to wait without the Unloading event handling. However, I also saw that the issue went away after I added Serilog. So it apparently has something to do with how the internals of ASP.NET 5 are being configured.
Jeremy D. Miller
@jeremydmiller
In that case, would you create a PR to move RunCommand back to being sync? I'd be lying if I said I remember why that changed.
Brian Dukes
@bdukes
👍🏻 can do
Brian Dukes
@bdukes
Just submitted #53
Steven T. Cramer
@StevenTCramer
async checks dont' report as an error for me.
image.png
image.png
switching to sync check and I get the above
Steven T. Cramer
@StevenTCramer
image.png
something like this but async checks don't seem to work.
Jeremy D. Miller
@jeremydmiller
Can you make sure you’re on the very, very latest Oakton?
And maybe just throw the exception out of that method?
Steven T. Cramer
@StevenTCramer
I am updating my blazor template to add Oakton I will try again when I get back to it and let you know.
Igor Popov
@incoventures
when you integrate oakton with HostBuilder by replacing .Build() with .RunOaktonCommands(args);. How do you get a reference to iHost? e.g. i need to run host.Services.GetRequiredService<Startup>(); in my Main method but .RunOaktonCommands(args) returns Task<int>?
Jeremy D. Miller
@jeremydmiller
You can use IHostedService to do that exact kind of startup activity. That’s the idiomatic .Net way to do start up actions now anyway
5 replies
Igor Popov
@incoventures
ok thanks, that was for a console app but I can change it to IHostedService if that's the only way
Aarav Navani
@shift-eleven
heya, is there a way I could run commands without specifying a command name and just calling the executable? such as calling just executable to start a repl?
Jeremy D. Miller
@jeremydmiller
You can specify a default command, yes. Or if you only have one command:
class Program
{
    static int Main(string[] args)
    {
        // As long as this doesn't blow up, we're good to go
        return CommandExecutor.ExecuteCommand<NameCommand>(args);
    }
}
Then also see the DefaultCommand usage here: https://jasperfx.github.io/oakton/documentation/bootstrapping/
Aarav Navani
@shift-eleven
Ah gotcha, thanks