Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS 17.10 with NetRevisionTask ignores assemblyInfo.cs #28

Open
sixdiamants opened this issue Sep 24, 2024 · 4 comments
Open

VS 17.10 with NetRevisionTask ignores assemblyInfo.cs #28

sixdiamants opened this issue Sep 24, 2024 · 4 comments

Comments

@sixdiamants
Copy link

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 
@MagicAndre1981
Copy link

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

@sixdiamants
Copy link
Author

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

@MagicAndre1981
Copy link

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

@ygoe
Copy link
Owner

ygoe commented Oct 6, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants