Bug 55901 - Xaml C# code behind file is not being nested under the Xaml file, after adding new Xaml item to a Shared project
Summary: Xaml C# code behind file is not being nested under the Xaml file, after addin...
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Templates (show other bugs)
Version: 4.5.0 (15.2)
Hardware: PC Windows
: Normal normal
Target Milestone: 15.5
Assignee: Pierce Boggan [MSFT]
URL:
: 56645 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-02 23:05 UTC by Ben Beckley
Modified: 2017-12-01 13:22 UTC (History)
10 users (show)

See Also:
Tags: ac
Is this bug a regression?: Yes
Last known good build:


Attachments

Description Ben Beckley 2017-05-02 23:05:58 UTC
Reproduction Steps:
1) Create a new Cross-Platform Shared project
2) Add a new Xaml item to the Shared project
Expected: The code behind c# file should be nested under the Xaml file in the solution explorer
Actual: It is not nested

In the Shared project's .projitem file, the <Compile Include="$(MSBuildThisFileDirectory)Page1.xaml.cs"> entry was missing the <DependentUpon> tag. Also, the <EmbeddedResource> entry was missing <SubType>Designer</SubType>.

env info: https://gist.github.com/BenBeckley/4de4b22d9fdef9b977956df7ddea9e4d
Comment 2 Ben Beckley 2017-05-24 18:45:10 UTC
*** Bug 56645 has been marked as a duplicate of this bug. ***
Comment 3 Joaquin Jares 2017-05-24 19:18:57 UTC
I cannot repro. And the user says that same thing happens in Windows (I assume, Windows projects?). I think this is upstream.
Comment 4 Kayo Hamid 2017-05-24 23:13:13 UTC
My steps installing VS and Xamarin:

- First install Visual Studio
- Then update with Xamarin

I do not know if Ben followed the same steps above, but I reproduce this problem.
Comment 5 Pierce Boggan [MSFT] 2017-06-20 20:50:59 UTC
Thanks for filing this report @Ben/Kayo!

I am now unable to reproduce this issue (nesting + EmbeddedResource definition) using the latest 15.3 builds:
https://www.screencast.com/t/yVuLGZ4YUXz

Environment Info: https://gist.github.com/pierceboggan/f1ffd9e92b04565eb494d4138e1a034a
Comment 6 Ben Beckley 2017-07-31 21:03:28 UTC
This is still broken with XVS 4.7.0.827 (ddd8750)

https://www.screencast.com/t/cruwz6CoF

env info: https://gist.github.com/BenBeckley/f6b637040f35d4fe12a40a2cedd5f5e1
Comment 7 davide 2017-10-10 10:55:29 UTC
This bug is also present in the just-released Visual Studio for Mac version 7.2 (xamarin studio works tho!).

mono seems to be also affected, getting an "object reference not set to an instance of an object" on these pages...
Comment 8 Pierce Boggan [MSFT] 2017-10-13 01:57:08 UTC
This issue is now resolved in Visual Studio 2017 version 15.5 when using the latest Xamarin.Forms templates (2.4.0.282).

Note You need to log in before you can comment on or make changes to this bug.