Skip to main content

Posts

How to Sign a C# .Net WPF Application

  To sign a C# WPF .NET 6 application, you can follow these steps: Generate a strong name key pair: Open the Developer Command Prompt for Visual Studio (search for it in the Start menu). Navigate to the project directory using the cd command. Run the following command to generate a strong name key pair: Copy code sn -k keypair.snk Configure your project to use the strong name key pair: In Visual Studio (prior to 2022), open your WPF project. Right-click on the project in the Solution Explorer and select "Properties." In the project properties, go to the "Signing" tab. Check the "Sign the assembly" checkbox. Click the "..." button next to the "Choose a strong name key file" field and browse to select the keypair.snk file you generated in the previous step. Click "OK" to save the changes. Configure the project for ClickOnce deployment (optional but recommended for distributing your application): In the project properties, go t...

Syncfusion Grid, Custom Add Dialog - Two methods

 Method 1 - Using the default Options - ToolbarClickHandler In the Razor Page @{ var Toolbar = new List < string > () { "Add" , "Search" }; } < SfGrid DataSource =" @ Organisations " TValue =" OrganisationList " Toolbar =" @ Toolbar " AllowSelection ="true" AllowPaging ="true" AllowSorting ="true" > < GridEditSettings AllowAdding ="true" Mode =" EditMode . Dialog " > <Template > @{ var org = ( context as OrganisationList ); } Your own code here for the dialog </ GridEditSettings > < GridPageSettings PageSize ="20" ></ GridPageSettings > < GridEvents OnToolbarClick =" ToolbarClickHandler " TValue =" OrganisationList " > </ GridEvents > Inside the Grid In the code: public async Task ToolbarClickHandler ( ...

Export-CSV Powershell, don't include pesky first line

You use Export-CSV to export a result to CSV in powershell,  It's a great tool, but it also includes type information in the first line.  For a GCI command, it typically creates something like;  #TYPE System.IO.DirectoryInfo This breaks a single click open when you want to view the file in something like Excel. You can tell Export-CSV to stop creating the Type Info by using the switch;      -NoTypeInformation So, your command ends up something like       gci -recurse | export-csv "20221124.csv" -NoTypeInformation

MB 360 User Guides

  How to use video  https://assets.sennheiser.com/global-downloads/file/12461/Video_13_-_Final_Version_1.mp4 Fact Sheet  1304_MB_360_UC_fact_Sheet_EN.pdf (sennheiser.com) Downloads Page Sennheiser Product Downloads then search for MB 360

Installing MSSQL server on Ubuntu

 A good guide at  https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-ver16 Key steps:  Import the public repository GPG keys: wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - Register the SQL Server Ubuntu repository: sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-preview.list)" Run the following commands to install SQL Server: sudo apt-get update sudo apt-get install -y mssql-server After the package installation finishes, run mssql-conf setup and follow the prompts to set the SA password and choose your edition.  sudo /opt/mssql/bin/mssql-conf setup Once the configuration is done, verify that the service is running: systemctl status mssql-server --no-pager For remote connection open the SQL Server TCP port (default 1433) on your firewall. At this point, SQL Server is running on your Ubuntu machine and is ready to use!