You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DynamicDependentFile capability broken in VS 15.5 #261
Please re-read my first post. I'm pointing on a particular CPS feature which is broken to me since VS 15.5 update.
Responded there in more details dotnet/project-system#3155 (comment)
Is your project system based off of the .netcore system or do you import Microsoft.Common.props or targets? If so, it is possible that your project system is using their .xaml content type now and not yours.
I say this, because when I add the appropriate metadata to the file I mentioned in the other issue, it properly nests.
Jacob Viau (@jviau), thank you!
My project system is using Microsoft.NET.Sdk (you refer to it as the .netcore system if I understand correctly).
I didn't try the dynamic dependent file wireup on other file types and made the wrong assumption that the DynamicDependentFile capability broken with the last VS update.
I've tried removing my .XAML content type definition now (completely with my ProjectItemsSchema.xaml) and it works without it so it should be using the content type definition from the .netcore project system. However, I've noticed that I still need to include my custom Page.xaml rule in the CustomProject.targets:
Is there any way to override the content type definition? I would prefer to use my custom definition from my ProjectItemsSchema.xaml at least until it's properly implemented in the .netcore project system.
For overriding their content type you can try playing the order they are appear in MSBuild evaluation. I can't remember off the top of my head if we default to the first or last appearance of a content type, so try both ways. Have yours appear before theirs, then after. If that doesn't work the only other way I can think of is to copy their file, edit it, add an msbuild item to remove their file from evaluation, and include yours.
As for why it just started breaking, it depends on if you had UWP installed. The rule from the SDK was broken and not shipping for a while by accident, but it was missed because UWP workload also brings in a xaml rules for the .xaml "Page" item type, so that was masking the mistake for a while.
Activity
aienabled commentedon Jan 17, 2018
Adrian Vinca (@adrianvmsft)
jviau commentedon Jan 26, 2018
The xaml content type CPS is receiving from .netcore for .xaml files is missing the necessary metadata for this to work.
I updated the issue in dotnet/project-system pointing to the incorrect file.
aienabled commentedon Jan 26, 2018
Please re-read my first post. I'm pointing on a particular CPS feature which is broken to me since VS 15.5 update.
Responded there in more details dotnet/project-system#3155 (comment)
jviau commentedon Jan 26, 2018
Is your project system based off of the .netcore system or do you import Microsoft.Common.props or targets? If so, it is possible that your project system is using their .xaml content type now and not yours.
I say this, because when I add the appropriate metadata to the file I mentioned in the other issue, it properly nests.
aienabled commentedon Jan 26, 2018
Jacob Viau (@jviau), thank you!
My project system is using Microsoft.NET.Sdk (you refer to it as the .netcore system if I understand correctly).
I didn't try the dynamic dependent file wireup on other file types and made the wrong assumption that the DynamicDependentFile capability broken with the last VS update.
I've tried removing my .XAML content type definition now (completely with my ProjectItemsSchema.xaml) and it works without it so it should be using the content type definition from the .netcore project system. However, I've noticed that I still need to include my custom Page.xaml rule in the CustomProject.targets:
otherwise the XAML files are not visible in the project using my custom project system. I'm confused, isn't it should be using this XAML rule https://github.com/dotnet/project-system/blob/master/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/Page.xaml (and ProjectItemsSchema.xaml nearby) and my XAML rule should not be required? (UPD: it seems I've found the answer - the only place explicitly including Page.xaml is Microsoft.Managed.DesignTime.targets which is even more confusing!)
Another curiosity is why the issue revealed only now when the .netcore project system added support for XAML Page about half a year ago https://github.com/dotnet/project-system/blob/master/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/ProjectItemsSchema.xaml
Is there any way to override the content type definition? I would prefer to use my custom definition from my ProjectItemsSchema.xaml at least until it's properly implemented in the .netcore project system.
jviau commentedon Jan 26, 2018
For overriding their content type you can try playing the order they are appear in MSBuild evaluation. I can't remember off the top of my head if we default to the first or last appearance of a content type, so try both ways. Have yours appear before theirs, then after. If that doesn't work the only other way I can think of is to copy their file, edit it, add an msbuild item to remove their file from evaluation, and include yours.
jviau commentedon Jan 26, 2018
As for why it just started breaking, it depends on if you had UWP installed. The rule from the SDK was broken and not shipping for a while by accident, but it was missed because UWP workload also brings in a xaml rules for the .xaml "Page" item type, so that was masking the mistake for a while.
Updated to support VS15.5 with multiple improvements