Архив рубрики: Блог

Статьи, заметки…

.Net — Resolving the “project.assets.json doesn’t have a target for net6.0”

After upgrading an project from .NET 6.0 to .NET 8.0, you may encounter the following error when trying to publish the project to IIS:

‘.\obj\project.assets.json’ doesn’t have a target for ‘net6.0’. Ensure that restore has run and that you have included ‘net6.0’ in the TargetFrameworks for your project.

Читать далее
.Net 8 Product Version

.NET8 — ProductVersion contains git commit hash (en)

With the release of .NET 8, significant changes have been made regarding version-related properties in builds. Specifically, the update has affected the Source Link tooling, which is now included in the .NET SDK. This tool allows packages and applications to embed information about the version control system from which the build artifacts were created. As a result, commit information is now automatically included in the InformationalVersion property of libraries and applications.

Читать далее

C# — what is the difference between String and string?

In C#, there are two ways to declare a string: using the string keyword and using the String class. Let’s explore the differences and understand which one you should use.

Differences between `string` and `String` (Alias vs. Class)

  • string is an alias in C# for System.String.
  • String refers to the System.String class in the .NET Framework.
Читать далее