Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Generated class for Razor Pages shows up in VS Solution Explorer when the CSHTML file is open in the editor #5957

Closed
DamianEdwards opened this issue Mar 13, 2017 · 8 comments

Comments

@DamianEdwards
Copy link
Member

image

@DamianEdwards
Copy link
Member Author

@rynowak @Eilon can you assign this one pls?

@rynowak
Copy link
Member

rynowak commented Mar 21, 2017

Should we just slap an editorbrowsable.never on this?

@DamianEdwards
Copy link
Member Author

Worth trying. Is that how generated files are usually suppressed?

@rynowak
Copy link
Member

rynowak commented Apr 4, 2017

@DamianEdwards does this become a good thing if the names this generates aren't horrible?

@Eilon
Copy link
Member

Eilon commented Apr 4, 2017

Should the user even know that there's this magical class that's generated? I didn't think the concern was how pretty it was.

BTW perhaps https://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.compilergeneratedattribute(v=vs.110).aspx would make more sense as the attribute to use? (Assuming it does what we want.)

@josefpihrt
Copy link

When implementing this, please make sure that generated code will be marked so it can be skipped by roslyn analyzers.

Another alternative to CompilerGeneratedAttribute would be to create partial class with generated content and mark it with <auto-generated> tag.

@rynowak
Copy link
Member

rynowak commented Apr 18, 2017

Load Balancing to @NTaylorMullen - let's try [CompilerGenerated]

@NTaylorMullen
Copy link
Member

This issue was moved to aspnet/Razor#1237

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

No branches or pull requests

5 participants