NetRevisionTask icon indicating copy to clipboard operation
NetRevisionTask copied to clipboard

VS 17.10 with NetRevisionTask ignores assemblyInfo.cs

Open sixdiamants opened this issue 1 year ago • 4 comments

When adding a reference to NetRevisionTask in my .csproj like so:

<PackageReference Include="Unclassified.NetRevisionTask">  
      <Version>0.4.3</Version>   
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>  
      <PrivateAssets>all</PrivateAssets>  
    </PackageReference>```

The dialog VS > right-click project > Properties > Application > Assembly Information  
is blank.  
The assemblyInfo.cs file hasn't been modified. 

When I remove the reference to NetRevisionTask from the csproj file, the Assembly Information dialog is filled again with the values taken from the assembyInfo.cs file, but only after rebuild.

Running VS 17.20 Community edition 

sixdiamants avatar Sep 24 '24 10:09 sixdiamants

the final file is called NrtAssemblyInfo.cs , look if this file is generated during build.

MagicAndre1981 avatar Sep 26 '24 13:09 MagicAndre1981

There's obj/Debug/NrtAssemblyInfo.cs which is identitcal to my .\Properties\AssemblyInfo.cs

sixdiamants avatar Sep 27 '24 15:09 sixdiamants

ok, so the tool still runs. Have you removed the Nrt entries from the csproj by accident?

MagicAndre1981 avatar Sep 30 '24 06:09 MagicAndre1981

I haven't looked at the implementation of it in a long time, but I wouldn't expect any of the files to be visible here. The idea is that the properties are set during build, not by writing them to a file. At least if you're using the "modern" project structure (i.e. not the old .NET 4.8). Actually, a file called AssemblyInfo.cs (the name doesn't matter though) isn't needed anymore these days. It's a placeholder for those assembly attributes that are now set directly in the .csproj file. So maybe you're looking for something that isn't used anymore?

ygoe avatar Oct 06 '24 11:10 ygoe