Posts

Showing posts from September, 2025

Creating an executable installer (.exe) in Visual Studio

Image
Creating an executable installer (.exe) in Visual Studio allows you to package your application for easy distribution and installation on other computers. This is typically achieved by using a "Setup Project." Here's a comprehensive guide on how to create a setup `.exe` in recent versions of Visual Studio. Create installable exe file from windows form application in visual studio using setup project 1. Open your Windows Forms application project in Visual Studio. 2. Make sure your project builds successfully by clicking on "Build" in the top menu and selecting "Build Solution" (or pressing Ctrl+Shift+B). 3. Right-click on the solution in the Solution Explorer, select "Add" > "New Project" or go to "File" > "Add" > "New Project". 4. In the "Add New Project" dialog, select "Setup Project" under the "Other Project Types" > "Setup and Deployment" category....

Dev tunnels

Image
             Dev tunnels allow you to securely expose local web services to the internet, creating a public URL that tunnels traffic directly to your development machine. This is useful for testing, collaboration, and integration with external services Uses of dev tunnel in daily development Debugging and testing on different devices Dev tunnels eliminate the need for complex network configurations when you need to test your application on a separate device. You can access your local server from a mobile phone, tablet, or another computer by simply navigating to the tunnel's public URL.  Integrating with external services and webhook  Many third-party services, like payment gateways, social media APIs, and communication platforms (e.g., Twilio), rely on webhooks to send real-time notifications to your application.  Since webhooks cannot send requests to localhost, you need a public URL to receive them.   A dev tunnel provides a secu...

Create installable exe file from windows form application in visual studio

Image
  To create an installable .exe file from a Windows Forms application in Visual Studio, you can follow these steps: 1. **Open Your Project**: Open your Windows Forms application project in Visual Studio. 2. **Build Your Project**: Make sure your project builds successfully. You can do this by clicking on        "Build" in the top menu and then selecting "Build Solution"      (or pressing Ctrl+Shift+B). 3. Right-click on your project in the Solution Explorer and select "Properties" (Optional Step)    - This will open the project properties window.    - In the properties window, go to the "Publish" tab.    - Configure the publish settings as needed (e.g., specify the installation folder, prerequisites, etc.).    - Can directly click on "Publish Now" to publish the application with default settings. or you can         click   on "Publish Wizard" to customize the publishing pro...

Run cs file without main method using NET 10

Image
Run cs file without main method using .NET 10 You don't have to explicitly include a main method in a console application project. Instead, you can use the  top-level statements  feature to minimize the code you have to write. Top-level statements allow you to write executable code directly at the root of a file, eliminating the need for wrapping your code in a class or method. This means you can create programs without the ceremony of a Programm  class and a Main method. In this case, the compiler generates a Program  class with an entry point method for the application. The name of the generated method isn't Main  it's an implementation detail that your code can't reference directly. 1. create ".cs" file, lets create "app.cs" 2. Open folder path in any terminal 3. Run the file using command "dotnet run aap.cs" Note : Prerequisite .NET 10  Example statements 1. Console.WriteLine("Hello World!");  output : Hello World! 2.  int a...

RDLC report in VB.Net windows form application

Image
                                               RDLC report in VB.Net windows form application Dim con As New SqlConnection("Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Employeedb.mdf;Integrated Security=True") Dim SqlQuery As String = "select * from EmployeeMst order by id" Dim cmd As New SqlCommand(SqlQuery, con) Dim da As New SqlDataAdapter(cmd) Dim ds As New DataSet() da.Fill(ds) Dim rds As New ReportDataSource("DataSet1", ds.Tables(0)) ReportViewer1.Reset() ReportViewer1.ProcessingMode = ProcessingMode.Local ReportViewer1.LocalReport.ReportPath = "FirstReport.rdlc"                     'RDLC path ReportViewer1.LocalReport.DataSources.Clear() ReportViewer1.LocalReport.DataSources.Add(rds) ReportViewer1.RefreshReport()