Comments (14)
@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.
If routing isn't working why is it logging We hit a route!
?
from carter.
Oh it's returning 404. Hmm
from carter.
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.
from carter.
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.
Ahh nevermind, that afterhook is misleading. It's hit even when no route is resolved :)
from carter.
So for some reason, when built against a release configuration, this line:
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.
from carter.
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.
from carter.
I tried I a few variants of Assembly.Get
and all of them failed with similar problems
from carter.
@davidfowl @poke any ideas
from carter.
@jchannon thank you.
your PR worked.
from carter.
Related Issues (20)
- Error On Register IN DI HOT 5
- Removed support to apply endpoint conventions globally HOT 2
- Can't find testhost.deps.json HOT 1
- Unable to change the field of the response data body to uppercase HOT 2
- Minimal AP Versioning HOT 2
- Open Api Summary is not drawing on Swagger UI HOT 3
- Trying to get swagger working with my project. HOT 4
- carter is missing NuGet package README file HOT 1
- Make BindFile and BindFiles extension methods public HOT 1
- Consider making ICarterModule.AddRoutes a static abstract method HOT 8
- Is it possible to apply a global filter with Carter that applies to all endpoints of all Carter modules? HOT 2
- Please exclude fluent validators registration by default HOT 1
- Any plans to implement Async Validation for fluent Validation? HOT 1
- Can't update Carter to 8.2.0 HOT 6
- Analyzer exception after update to Carter 8.2.0 HOT 31
- [Question] What is the best way to return a HTTP Api response using Carter? HOT 1
- C# IFormFile Web Api PUT/POST wants application/json rather than multipart/form-data HOT 1
- Version conflicts when updating to v8.2.1 HOT 1
- MinimalOpenAPI versioning with Carter HOT 2
- Should dependency scanning in DependencyContextAssemblyCatalog consider transitive deps?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carter.