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.

Aspnet: IncludeScopes for Providers

On a previous job I had this in my appsettings.json,      {     "Logging": {         "IncludeScopes": false,         "LogLevel": {           "Default": "Information",           "Microsoft": "Warning",           "Microsoft.AspNetCore": "Warning",           "Microsoft.Hosting.Lifetime": "Trace"         }       }     } Getting a warning message, "logging configuration for provider. The provider name must match the configuration's json property name." This doesn't help me understand why its looking warning for an object. If it helps I'm using nlog but this warning still appears even if I remove nlog. After writing this I found the docs here:  Logging in .NET Core and ASP.NET Core And the following fixes my warning:      "Logging": {         "Console": {           "IncludeScopes": false         },         "LogLevel": {  

7 Days to Die Server on Ubuntu with background service

Sometime back I created a service for this game so I didnt have to manage it in a separate terminal. Saw a lot of tutorials that used this method, thankfully I have know linux well enough to improve this. Important to look over the  serverconfig.xml . I've noticed it you have an error in the server config the game just doesn't start but that could have been combined with other bugs I was working out at the time of writing this. In any case need to make sure all  things are in order before adding this service solution. Step one: Create File vim  /etc/systemd/system/ sdaysded.service chmod u+x sdaysded.service sudo systemctl enable sdaysded.service Step Two: Write to File [Unit] Description=sdaysded service StartLimitIntervalSec=0 [Service] #User=steam Restart=always RestartSec=1 #WorkingDirectory=/home/sdaysded ExecStart=/home/sdaysded/ -configfile=/home/sdaysded/serverconfig.xml [Install] Step 3: Test journalctl -u s

Using Angular-Datatables Notes

These notes are based on angular-datatables v 8.0.0   Using Angular Component In order to get a angular component say to run you need to create the code in the same scope. That's how I managed to get it running. So for example you have to create a model via angular and attach it to a jquery event. What your doing is in the definition of the datatable is passing the logic in at that point on how to run.   import  {  Component ,  OnDestroy ,  OnInit ,  ViewChild ,  AfterViewInit  }  from   '@angular/core' ; import  {  Meta ,  Title  }  from   '@angular/platform-browser' ; import  {  HttpClient  }  from   '@angular/common/http' ; import  {  NgbDateStruct ,  NgbModal  }  from   '@ng-bootstrap/ng-bootstrap' ; import  { formatDate }  from   "@angular/common" ; import  {  DataTableDirective  }  from   'angular-datatables' ; import  {  Subject  }  from   'rxjs' ; import  {  NgbDateFRParserFormatter  }  from   './../../../datefor

Ag-grid: Angular dynamic loading data (without async)

For anyone not using "async" in their html, its importance to set your variable to a type but not an array. The difference is small but there is almost no reference to it in the documentation. I found this out while working on my own complex UI grid. In fact very proud of the results, but would like to have the same responsiveness that datatables provides. I'll have an article more on that later. For now this is just a small tip for anyone looking to not use "async" which is in the documentations. I think the benefits of doing this this way is less html to maintain as well as simpler code. rowData: []; //You can't use array methods until you have data, which you really shouldn't be anyway. vs  rowData = []; //this allow you to reference array methods at the start or when there is data but does not allow ag-grid to be aware that the rowData is empty. You can still update the array but when you do it just shows an message that your rowData is empty first w

NLog 4.6.2 Console Application

For most of our configuration we use the App.config file. If you do not have one, create one and copy a .csproj project’s build configs for handling App.config files or simply start a project with App.config in the visual studio template. Based on .Net framework Console Applications under the .Net 4.7.2 Framework using NLog 4.6.2 however later versions may work just as well. In the start of the App.config add the following... < configSections >     < section name= "nlog" type= "NLog.Config.ConfigSectionHandler, NLog" />   </ configSections >   < nlog throwExceptions= "true" xmlns= "" xmlns:xsi= "" >     < targets >           < target name= "database" xsi:type= "Database" dbProvider= "System.Data.SqlClient"               connectionString= "$ {gdc:item=databaseStr} "        

Popular posts from this blog

Installing Windows on Acer chromebook 15 cb3-532

Nginx Best Practices Extended

Entity Framework: ToListAynsc & WhereAsync