Closed TheJayMann closed 3 years ago
This should probably be a little more appropriate
<ItemGroup>
<Compile Remove="App_Code\*$(DefaultLanguageSourceExtension)" />
<Content Include="App_Code\*$(DefaultLanguageSourceExtension)" />
</ItemGroup>
Maybe even add this:
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)"
@bachratyg Pull Requests welcome ;)
I have tried to use DefaultLanguageSourceExtension
in the past, but I've not always found it works, perhaps due to when it gets set.
I don't really use website projects, just web application projects (if my memory of the naming is correct) myself. This means that the App_* folders etc. are not something I use or really test with. In fact, I have been using RazorGenerator for a lot of years now, so I use this only for my 'head' projects.
That said, I have been using my own version of this for some time, and have migrated my custom implementations to use this package and not had any issues.
According to https://github.com/dotnet/project-system/issues/2670#issuecomment-820649507, code files found in App_Code need to be specified as Content instead of the default Compile used for code files. I believe the following ItemGroup would work.