dotnet / project-system

The .NET Project System for Visual Studio
MIT License
968 stars 387 forks source link

Marking generated files as locked/read only #7110

Open nick-beer opened 3 years ago

nick-beer commented 3 years ago

Following a pattern similar to what's described here, I'm generating some c# files into the intermediate output directory. When those files are opened in the editor, the user can edit them. Is it possible for me to mark those C# files in a way that causes them to be read only? Similar to NuGet contentFiles or C# files generated via a C# 9 Source Generator?

jjmew commented 3 years ago

@nick-beer we currently don't have a way to do this but we have noted the feature request