# AssemblyInfo in csproj and fsproj
Defining AssemblyInfo-s in csproj (or fsproj).
For specific properties you can define refer to [Microsoft.NET.GenerateAssemblyInfo.targets](https://github.com/dotnet/sdk/blob/master/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.GenerateAssemblyInfo.targets) file.
Note that for any of this to work, the `GenerateAssemblyInfo` property must be `true`, which by default it is, just make sure you didn't overwrite it.
For testing purposes, you can include a separate \*.cs file with testing properties, and exclude it locally in git as the new SDK projects don't require listing files individually for C#.
To define all properties per folder see [[Directory.Build.props and Directory.Build.targets files|Directory.Build.props]].
For copyright, you can use the following year snippet `$([System.DateTime]::Now.Year)`.
## Generic Solution
```xml
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>NikolasTests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
```
## Specific Attributes
| Assembly Attribute | Property | Automatic Generation (default true) |
| ------------------ | ---------------------- | ----------------------------------- |
| AssemblyCompany | Company | GenerateAssemblyCompanyAttribute |
| AssemblyCopyright | Copyright | GenerateAssemblyCopyrightAttribute |
| AssemblyProduct | Product | GenerateAssemblyProductAttribute |
| InternalsVisibleTo | InternalsVisibleTo[^1] | |
[^1]: Needs to be placed inside an `ItemGroup`, see [[#InternalsVisibleTo]]
### `InternalsVisibleTo` and `AssemblyMetadata`
As `InternalsVisibleTo` can be defined for multiple projects these properties need to be defined in an `ItemGroup` and not a `PropertyGroup`. Same is the case for `AssemblyMetadata` See example below.
```xml
<ItemGroup>
<InternalsVisibleTo Include="Tests" />
<AssemblyMetadata Include="Serviceable" Value="True" />
</ItemGroup>
```