-
Notifications
You must be signed in to change notification settings - Fork 212
Allow Razor cohosting to work with non-Razor SDK projects #12118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logged #12137
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But who can edit this file if only those knowledgable in MSBuild can edit it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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