Allow Razor cohosting to work with non-Razor SDK projects#12118
Allow Razor cohosting to work with non-Razor SDK projects#12118davidwengier merged 8 commits intodotnet:mainfrom
Conversation
eff50f6 to
3b63388
Compare
...crosoft.VisualStudioCode.RazorExtension/Targets/Microsoft.CSharpExtension.DesignTime.targets
Outdated
Show resolved
Hide resolved
…s/Microsoft.CSharpExtension.DesignTime.targets
...crosoft.VisualStudioCode.RazorExtension/Targets/Microsoft.CSharpExtension.DesignTime.targets
Outdated
Show resolved
Hide resolved
…s/Microsoft.CSharpExtension.DesignTime.targets
|
|
||
| <!-- Add a capability to control initialization of Razor in the IDE --> | ||
| <ItemGroup Condition="'@(_RazorOrCshtmlFiles)' != ''"> | ||
| <ProjectCapability Include="RazorWithoutSdk" /> |
There was a problem hiding this comment.
Do we need to condition this with a 'back out' flag? I assume it won't do anything bad to have it on, so probably not?
There was a problem hiding this comment.
Yeah, project capabilities don't do anything, they're just like attributes you attach to things. In this case, given this file is only used in the C# Extension, even adding the capability is redundant, since it doesn't do anything and nothing cares whether its there, but its easier to have the files matching :)
There was a problem hiding this comment.
but its easier to have the files matching :)
Is there a way to avoid the copy/paste of the file? Or if not, can this at least link to the other file somewhere so somebody knows when to update one they can also update the other?
There was a problem hiding this comment.
It is linked at the top of this file (at least, I think I remember doing that, but I'm typing this on my phone so who knows!)
There was a problem hiding this comment.
You linked to the whole file, but that's a somewhat different flavor. Not sure if that repo should minimally extract a file out so some file can be the same, or whether we should just adopt that file into the C# extension project system directly.
| WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have | ||
| created a backup copy. Incorrect changes to this file will make it | ||
| impossible to load or build your projects from the command-line or the IDE. |
There was a problem hiding this comment.
But who can edit this file if only those knowledgable in MSBuild can edit it?
There was a problem hiding this comment.
Thats why I created the file, because I'm not qualified to modify it 😁
|
|
||
| <!-- Add a capability to control initialization of Razor in the IDE --> | ||
| <ItemGroup Condition="'@(_RazorOrCshtmlFiles)' != ''"> | ||
| <ProjectCapability Include="RazorWithoutSdk" /> |
There was a problem hiding this comment.
but its easier to have the files matching :)
Is there a way to avoid the copy/paste of the file? Or if not, can this at least link to the other file somewhere so somebody knows when to update one they can also update the other?
Part of #11834