GithubHelp home page GithubHelp logo

Comments (14)

jchannon avatar jchannon commented on August 16, 2024 2

@raminmjj @richardprice can you pull the branch in the linked PR and run the sample or your own application to see if it works now. thanks

from carter.

jchannon avatar jchannon commented on August 16, 2024

If routing isn't working why is it logging We hit a route! ?

from carter.

jchannon avatar jchannon commented on August 16, 2024

Oh it's returning 404. Hmm

from carter.

JoeStead avatar JoeStead commented on August 16, 2024

Can reproduce on MacOS too with:

dotnet publish -c Release

It's fine when published with Debug though. This should be a fun one

from carter.

jchannon avatar jchannon commented on August 16, 2024

from carter.

JoeStead avatar JoeStead commented on August 16, 2024

Yeah, but the AfterHook is writing out "We hit a route" to stdout. If it was assembly scanning I'd expect that to fail too.

from carter.

JoeStead avatar JoeStead commented on August 16, 2024

Ahh nevermind, that afterhook is misleading. It's hit even when no route is resolved :)

from carter.

JoeStead avatar JoeStead commented on August 16, 2024

So for some reason, when built against a release configuration, this line:

https://github.com/JoeStead/Botwin/blob/26711fb626607bf16b675fd8d3ad7194a569ac06/src/BotwinExtensions.cs#L153

returns Microsoft.AspNetCore.Hosting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 as an assembly - obviously we're not going to find any modules in there.

When built against the debug configuration, we correctly return BotwinSample, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null allowing the modules to be resolved.

from carter.

jchannon avatar jchannon commented on August 16, 2024

from carter.

JoeStead avatar JoeStead commented on August 16, 2024

As a workaround, when adding the Botwin services, you can tell it what assemblies to scan:
services.AddBotwin(Assembly.GetAssembly(typeof(Startup)));

It's sort of nasty, but will allow you to publish to release mode correctly until we can come up with a way of doing it properly

from carter.

jchannon avatar jchannon commented on August 16, 2024

from carter.

JoeStead avatar JoeStead commented on August 16, 2024

I tried I a few variants of Assembly.Get and all of them failed with similar problems

from carter.

jchannon avatar jchannon commented on August 16, 2024

@davidfowl @poke any ideas

from carter.

raminmjj avatar raminmjj commented on August 16, 2024

@jchannon thank you.
your PR worked.

from carter.

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.