When a C# project moved from an earlier version of Visual Studio to Visual Studio 2022, AOT (Ahead Of Time) publish starts to fail with the error message RuntimeIdentifier is required for native compilation. Try running dotnet publish with the -r option value specified. This is cuased by old settings in the project. To eliminate …
Category Archives: Not for home page
Debug a C# application in Visual Studio with command line arguments
To use command line arguments during debugging in Visual Studio Community Edition we will create project profiles. Create the project profile Select the project profile To debug the application with a specific project profile
Comment2GPT AI extension in Visual Studio for multiple models
Visual Studio Community Edition is a free, popular IDE to develop C# business applications. AI assistance can enhance the development process and do the boilerplate creation. As of writing, the most popular free extension that supports multiple AI models is Comment2GPT by Merry Yellow. Installation For more information visit the Comment2GPT Visual Studio Marketplace page …
Continue reading “Comment2GPT AI extension in Visual Studio for multiple models”
Data is Null. This method or property cannot be called on Null values.
When the .NET Entity Framework retrieves data from the database and parses it into the structure that we specify in our code, we have to make sure nullable columns are modeled with nullable properties in our code. When null values are retrieved and the structure in the code does not allow null value in any …
Continue reading “Data is Null. This method or property cannot be called on Null values.”
Build a standalone Windows executable in Visual Studio
Standalone Windows executables are compiled ahead of time (AOT) and distributed as three executable files (.exe, .dll, .runtimeconfig.json). This format is ideal for small executables called from the command line or from other applications. To create an AOT Windows executable in Visual Studio 2022 or later Start a new project Build the executable Prerequisites To …
Continue reading “Build a standalone Windows executable in Visual Studio”
Developing a secure .NET 8 (core) console application
In this post we will develop a .NET 8 console application which reads the configuration values from environment variables. This enables us deploy the application in an EKS cluster and read the config values from any secure secret storage. The develoment environment Docker configuration To prevent Visual Studio from debugging in Docker containers Debugging in …
Continue reading “Developing a secure .NET 8 (core) console application”
SSIS package development with Visual Studio
Visual Studio Community Edition has all the features for MSSQL SSIS package development. We need to download the SQL Server Integration Services Projects extension. In the package properties set DelayValidation to True to avoid long wait when opening the package.
ERESOLVE could not resolve
When we try to refresh or install NPM packages there can be version conflicts between packages and the dependency requirements. The error message can vary, but it is similar to npm error code ERESOLVEnpm error ERESOLVE could not resolve To be able to install or refresh NPM packages These steps will most likely successfully reinstall …
Migrate a PostgreSQL database to another database server
To migrate a PostgreSQL database to another database server Back up the source database Restore the database on the target server
Migrating Remix web applications to Node 20 and React Router v7
React Router, written by the Remix team, provides the missing routing services for React applications, used by 7 million websites. Remix propvides other features to make react application development more intuitive by providing The Remix team also added Vite, as it “has risen substantially in popularity, offering a fast dev experience, optimized builds, and a …
Continue reading “Migrating Remix web applications to Node 20 and React Router v7”