dotnet / dotnet/project-system

When GenerateAssemblyInfo Is False, Project File (.csproj) and Project Properties Are No Longer in Sync

Open
#3,934 2 comments 2 reactions 1 assignee Claimed by @davkean View on GitHub
Feature-Rules/Properties Triage-Approved
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

@elmojo commented on [Wed Aug 15 2018](https://github.com/dotnet/core/issues/1863)

If you add

`false`

to a .NET Core project file (.csproj), entering information in the project's properties package tab no longer updates the project file and any package information already within the project file no longer is displayed within the project's properties package tab.

# Steps to Reproduce

.NET Core Version 2.0

Save the following markup as a Visual Studio project file (.csproj).



netcoreapp2.0
1.1.0.0
Author Test
Test Company
AssemblyTest DLL
A test of the description field
Copyright 2018
tag1, tag2
1.2.0.0
1.3.0.0
false

Open this project file within Visual Studio 2017. Edit the project's properties either in the package tab GUI or edit the properties through project file directly. Updating one will no longer update the other. Remove the "GenerateAssemblyInfo" tag/property from the project file and the information will be in sync again.

Is this by design?

---

@dasMulli commented on [Wed Aug 15 2018](https://github.com/dotnet/core/issues/1863#issuecomment-413306204)

The idea would be that editing the property pages would update the assembly attribute in AssemblyInfo.cs if present. Just validated that this happens if I actually have a code file with that assembly attribute. It's just unfortunate that nothing happens when such an attribute isn't present in the project and the generation of the attribute is turned off.

@davkean I suppose this is for dotnet/project-system?

---

@elmojo commented on [Thu Aug 16 2018](https://github.com/dotnet/core/issues/1863#issuecomment-413643280)

Also, when trying to add a Pre-build command line event, the event disappears after hitting the save button.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.