Skip to content

Conversation

davidwengier
Copy link
Member

Part of #11834

…s/Microsoft.CSharpExtension.DesignTime.targets
…s/Microsoft.CSharpExtension.DesignTime.targets
@davidwengier davidwengier marked this pull request as ready for review August 20, 2025 04:16
@davidwengier davidwengier requested a review from a team as a code owner August 20, 2025 04:16

<!-- Add a capability to control initialization of Razor in the IDE -->
<ItemGroup Condition="'@(_RazorOrCshtmlFiles)' != ''">
<ProjectCapability Include="RazorWithoutSdk" />
Copy link
Member

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?

Copy link
Member Author

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 :)

Copy link
Member

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?

Copy link
Member Author

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!)

Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logged #12137

Comment on lines +9 to +11
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.
Copy link
Member

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?

Copy link
Member Author

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" />
Copy link
Member

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?

@davidwengier davidwengier merged commit 296d344 into dotnet:main Aug 22, 2025
11 checks passed
@davidwengier davidwengier deleted the NonRazorSdk branch August 22, 2025 00:34
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants