really good one. experienced people like me also want interesting tutorial content... but all there ever is beginner level tutorials which is frustrating. Best wishes for keeping up your work, thanks
Excellent video...is it possible to create long video on Asp net core API project from scratch to finish..cover all the topics like automappers, repository pattern, ef core, validations, swagger, jwt token, filters etc?? It would be pretty helpful...
I'm not able to get the description of CreateDefaultBuilder() at 0:44... Could you tell how you brought that mini screen with details about CreateDefaultBuilder? thanks...
@Expert Reviews, this description window comes when I hover over the CreateDefaultBuilders method. And its probably because the version of the Visual Studio I am using supports it. My version info: Microsoft Visual Studio Professional 2019 Version 16.6.2
Yes, another great video. What is the difference with using ConfigurationBuilder as I am having a real issue (I hope you an answer if you have time). I have a line of code like this var builder = new ConfigurationBuilder() .SetBasePath(contentRootPath) .AddJsonFile("appsettings.json", optional: false, reloadOnChange: false) .AddEnvironmentVariables(); but it is not reading the appsettings.json, I googled found some ideas like "copyoutput=always for the file, make appsettings.dev similar to the appsettings....nothing is helping and it just does not read the
@Salam Elias, for config files, "copuoutput=copy always or copy if newer", otherwise it will not be copied to the output folder from which the application executes. Otherwise, it should just work. If you can share the code in GitHub or somewhere I can take a look when I get some time.
@@DotNetCoreCentral In fact, you can get the whole code on the article www.red-gate.com/simple-talk/dotnet/c-programming/getting-started-with-cqrs-part-3/ which started my interest in RabbitMQ
I forgot to mention code is in ANQPEventSubscriber.cs, following the statement I indicated above here is the line failing builder.Build().GetSection("amqp").Bind(factory);
@@DotNetCoreCentral I replaced the statement above AddJsonFile("appsettings.json", optional: false, reloadOnChange: false) by AddJsonFile("appsettings.Development.json", optional: false, reloadOnChange: false), it worked fine, however, in startup.cs when I do Console.WriteLine(Configuration.GetValue("amqp:uri")); I get the right value without any problem, strange no?
@@eliassal1 did you set the ASPNETCORE_ENVIRONMENT environment variable in the project debug settings? that is needed, and it needed to be set up with the appropriate environment. And you do not need to add appsettings.development.json, this should be based on the environment variable you set.
@Vema Reddy, environment variables should be set up in an environment. For Windows box, its in the settings for environment variables (You can type Environment Variable in windows search to get it). If you are using Linux and Docker, then it will be set at a container level, and that is how I use it in production. The project configuration is just for testing purposes and should not be used for production. And we should not use a file as well, since that's like yet another configuration file, not really an environment variable. But if we have to use that, maybe you can just use System.IO namespace classes for it.