Showing posts from December, 2021

No EventLog for Aspnet Core with Nlog

 If you trying to pass a json object you can still do so just not with the EventLog object. Instead just use the MS LogIformation method with the object as your parameters. I still havent got it to format the json object in the logs but for now this is a solution. Another solution is to pull the nlog object in and not use the MS LogInformation in Logger log = LogManager.GetCurrentClassLogger();  I haven't done this yet but I dont see a logical issue just bad design Example:

Bootstrap: Spacing between Stack Items

For non-frontend developers bootstrap is already an great way to get started, I've said that for years. However I find .net developers using custom styles rather then whats involved in bootstrap. Its why I created flavorstrap, for ppl creating custom styles to use extension or to keep the naming convections similar. Margin utilities -  ml-auto  and When it stacked I recommend the following between the two items.. < div class = "d-block d-md-none col-12 py-3" > </ div > That way it only appears when you need it to and prevent cells from being on top of each other for smaller screens. However with bootstrap 5 this solution is even easier. Using the new Spacing style just follow the documentation,  {property}{sides}-{breakpoint}-{size}.

Visual Studio: Disable Dll Culture Folders on Compile

Quick solution that helped me remove extra files in my bin folder, sometimes I need to publish files on to server and the smaller they are the better. In my case I had different culture files/folders for the Microsoft.CodeAnalysis.CSharp.  Solution   <PropertyGroup>     <TargetFramework>net5.0</TargetFramework>     <SatelliteResourceLanguages>en-US</SatelliteResourceLanguages> </PropertyGroup> I could also add this to the package itself but the package didnt appear to be referenced directly in the .csproj. I think it was only referenced in the nuget config file, in any case this fixed the problem globally. Example for package < PackageReference Include = "Microsoft.CodeAnalysis.CSharp" Version = "3.0.0" ExcludeAssets = "All" /> Also worth noting I didnt use "en-US" I used just "en" which worked just as well, that might make a difference on some project.

Popular posts from this blog

Installing Windows on Acer chromebook 15 cb3-532

Entity Framework: ToListAynsc & WhereAsync

NLog 4.6.2 Console Application