AssemblyFileVersion issue

Peter_1985 2,486 Reputation points
2022-06-06T07:44:00.323+00:00

Hi,
What is the reason of the issue like

A namespace cannot directly contain members such as fields, methods or statements

on this line below?

[assemblf: AssemblyFileVersion("1.0.0.0")]

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,367 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,233 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,118 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 112.1K Reputation points
    2022-06-06T14:46:00.633+00:00

    Use 'assembly' instead of 'assemblf', and put this line before namespaces, or to a new empty .cs file. Some of the normal projects already include the AssemblyInfo.cs file with such declarations.

    0 comments No comments