Share via

Assembly.cs missing

Rodney Matthews 0 Reputation points
2026-04-08T09:07:52.3866667+00:00

Why is the Assembly info missing in my project which is a net framework project

Developer technologies | C#
Developer technologies | 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.


2 answers

Sort by: Most helpful
  1. Susmitha T (INFOSYS LIMITED) 2,690 Reputation points Microsoft External Staff
    2026-04-08T11:37:07.73+00:00

    Thank you for reaching out!

     The AssemblyInfo.cs file is not missing -- Your project is using the newer SDK-style format in Visual Studio. In this format, assembly information is automatically generated during build from the .csproj file, so a separate AssemblyInfo.cs file is no longer required.

     If needed, you can still add it manually by disabling auto-generation in the project settings.

     

    Let me know if you need any further help with this. I will be happy to assist. If you find this helpful, Kindly mark the provided solution as "Accept Answer", so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    0 comments No comments

  2. Q&A Assist
    2026-04-08T09:08:04.1233333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    In newer SDK-style .NET projects, many assembly attributes are no longer stored in an AssemblyInfo.cs file. Instead, they’re generated automatically from the project file (.csproj). This can make it appear that “Assembly.cs” or AssemblyInfo.cs is missing, even though the assembly information still exists.

    For .NET 6 and later, and for projects migrated from older .NET Framework templates, the SDK generates the assembly info file at build time based on properties in the project file. If a legacy Properties\AssemblyInfo.cs file is still present alongside SDK-generated attributes, it can cause duplicate-attribute errors; in that case either:

    1. Disable auto-generation and keep the file:
         <PropertyGroup>
           <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
         </PropertyGroup>
      
      and maintain AssemblyInfo.cs manually, or
    2. Move the attributes (title, version, etc.) into the project file and delete AssemblyInfo.cs.

    For .NET MAUI and other modern SDK-style projects, the recommended approach is to migrate properties from AssemblyInfo.cs into the project file and remove the AssemblyInfo.cs file entirely.

    Custom or arbitrary assembly attributes can also be added directly in the project file using <AssemblyAttribute> items, which the SDK turns into assembly-level attributes at build time.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.