Closed svallis closed 7 years ago
To report new issues, use the Report a Problem tool. The GitHub Issue Tracker for the aspnet/Tooling repo is now deprecated in favor of the Report a Problem tool.
If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See here for more details.
I have a test repo which should hopefully demonstrate this problem, and I hope this is the correct repo for the issue.
https://github.com/svallis/precompilation-classlib
If you clone and open this solution and perform the following, the issue should be clear. First, the expected results is what happens when adding views to
app
:app1\Views\Home
and press SHIFT+F2 and createTest.cshtml
Test - Copy.cshtml
.csproj
file forapp1
remains unchangedNow perform the same process on
lib1
:lib1\Views\Shared
and press SHIFT+F2 and createTest.cshtml
Test - Copy.cshtml
.csproj
file forlib1
has the following added to itAs you can imagine this is highly frustrating during development, and we're constantly running into it while developing features within a library. I don't know if it's an outright bug, or whether we could improve the existing rules in the
.csproj
for the library. Whatever changes are made to the library project file need to preserve existing functionality though, so that views are not included in the publish output and are embedded in the assembly. This allows everything to work both during development and after publishing with precompiled views.