Home Tags Privacy About

All posts tagged with "C#"

C# (C-sharp) is a general-purpose programming language using strong typing, It was developed around 2000 by Microsoft and used on the .Net platform.

← Newer Posts Page 6 of 13 Older Posts →

C# Build error - An instance of analyzer <analyzer> cannot be created

I recently got the following error when trying to build a solution after installing a nuget package: > Warning CS8032 An instance of analyzer ProxyInterfaceSourceGenerator.ProxyInterfaceCodeGenerator »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 18 May 2022

Nsubstitute Error - NSubstitute.Exceptions.CouldNotSetReturnDueToNoLastCallException : Could not find a call to return from

If you see the following error: > NSubstitute.Exceptions.CouldNotSetReturnDueToNoLastCallException : Could not find a call to return from. You are likely trying to mock a method »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Testing, C# 17 May 2022

C# - How to mock or stub a class without an interface

Sometimes you come across a class that you need to stub or mock but it does not have an interface. The easiest way is of course »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Testing, C# 15 May 2022

C# - What is the difference between new and override + virtual

This is an area of C# where there is a big "gotcha". Using the new keyword or using the virtual + override keywords behave very »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 15 May 2022

C# - How to set a BaseAddress using the HttpClient

If you would rather work with relative URLs than absolute URLs you can use the BaseAddress [https://docs.microsoft.com/en-us/dotnet/api/system.net.http. »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on HttpClient, C# 08 May 2022

C# - Set the URL per request using the HttpClient

This might seem trivial, but since I got the question the other day I might as well make a post about it. Using the HttpClient [https: »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on HttpClient, C# 08 May 2022

Error - CS0579 Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute'

I got the following errors today while working on a new project: > Error CS0579 Duplicate 'System.Reflection.AssemblyVersionAttribute' attribute MyAzureFunction C:\Repos\Test\ »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 23 April 2022

Entity framework - How to add static data using data seeding

I am not sure that the correct term is "static" data - it seems to be known as seeding, which is the term I »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Entity Framework, C#, MSSQL 10 April 2022

Entity framework - Unable to create an object of type <type>. For the different patterns supported at design time see <link>

Today I was trying to make an initial migration using Entity framework. I encountered an error when calling dotnet ef migrations add InitialCreate: C:\Users\peter\ »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Entity Framework, C#, MSSQL 05 April 2022

C# - How to add request timings to an ASP.Net project

Today I wanted to set up server timings [https://www.w3.org/TR/server-timing/] for a project to see how easy it would be. I found »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on ASP.NET, C# 03 April 2022
← Newer Posts Page 6 of 13 Older Posts →
  • Rss
  • Twitter
  • LinkedIn
  • profile for Peter Rasmussen at Stack Overflow, Q&A for professional and enthusiast programmers
Peter Daugaard Rasmussen - developer, Consultant, Blogger © 2025 Privacy policy