-
Notifications
You must be signed in to change notification settings - Fork 98
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
DynamicDependentFile capability broken in VS 15.5 #261
Comments
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. |
Please re-read my first post. I'm pointing on a particular CPS feature which is broken to me since VS 15.5 update. |
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. |
@jviau, thank you! 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: <PropertyPageSchema Include="$(MSBuildThisFileDirectory)Rules\Page.xaml">
<Context>File;BrowseObject</Context>
</PropertyPageSchema> 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. |
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. |
Now framework version specified right in the each csproj file. Microsoft.NET.Sdk including now done in the CustomProject.props (previously it was in the each csproj file). Added workaround for issue microsoft/VSProjectSystem#261 Dropped ReSharper workaround as it's not needed anymore.
I've noticed that the feature described in this document https://github.com/Microsoft/VSProjectSystem/blob/94d62cdad747ae1e035cfc2f39752962d5637c4b/doc/extensibility/automatic_DependentUpon_wireup.md is broken in VS 15.5.
Reported the issue there dotnet/project-system#3155
The text was updated successfully, but these errors were encountered: