none
Missing Folders / Files / Add Item Options in Shared project

    Question

  • I'm running into weird issues in Shared project types:

    1. XAML files are missing and are not properly associated with .cs files
    2. Some folders are not showing at all
    3. When selecting "Add New Item", I only see generic text file options (e.g. no UserControl)

    I tried re-installing Visual Studio, re-creating the Shared project, uninstalling / disabling ReSharper with no luck.

    I can only see the items if I click on "Show All Files".  If I select "Include In Project", the .projitems file gets modified with a new ItemGroup and items named "None" that causes problems with other team members (who by the way are NOT running into the same issue when opening the same solution).

    I tried opening the solution on a different machine under the same account, same results.

    Solution builds correctly, but is increasingly difficult to maintain.  This is literally driving me nuts right now.

    Shared Project Issue

    Thursday, December 17, 2015 10:35 PM

Answers

  • Hi ealva,

    I create a new Universal app and add an shared project, then when I try to add new items for shared project, I also can't find the templates. So I want to create a Windows 8.1 Universal app to compare whether there any different between them, but I can't create Windows 8.1 app because I don't install "Windows 8.1 and Windows Phone 8/8.1 Tools".

    After I update this tools, I can add the templates for Shared project. And if I copy a xaml page into this shared projects, both of the xaml file and xaml.cs file shows correctly.

    According to the screenshot you provided, you also don't install the Windows 8.1 and Windows Phone 8/8.1 Tools. Please check and install it, then check whether it still has this problem.

    Best Regards,
    Weiwei

    • Marked as answer by ealva Thursday, December 24, 2015 7:45 PM
    Thursday, December 24, 2015 2:59 AM
    Moderator

All replies

  • Hi ealve,

    Which version of Visual Studio are you using?

    According to your screenshot, you are using source control with Visual Studio. Please try download the project to local and disconnect to source control to check it still has the same problem.

    Please create a new project in local to check this problem is related to all projects or just this specific project. If just for this specific project, please remove the .suo file in solution folder.

    If for all projects, please try with following steps to troubleshoot this problem.

    1. Run Visual Studio as administrator.
    2. Run Visual Studio in safe mode with "Deven.exe /SafeMode" to prevents all third-party VSPackages from loading when Visual Studio starts, thus ensuring stable execution.
    3. Close all third part software, such as antivirus.

    Best Regards,
    Weiwei

    Friday, December 18, 2015 9:15 AM
    Moderator
  • Thanks for the reply Weiwei.

    I'm using Visual Studio 2015 Enterprise Update 1, and indeed using TFS 2012.  We are developing Universal apps.  I do not remember this happening prior to Update 1.

    Based on your suggestions, here are my results:

    1. Recreated new project - confirms it happens in all projects.  I have to point out that both the main entry project and the shared project are in their own solution folders (see attached below).
    2. Removed the .suo file in the .vs folder - same result.
    3. Ran as Administrator - same result
    4. Ran in Safe Mode - Visual Studio complains that Universal Apps cannot be loaded (attached)
    5. There are no third-party antivirus software (using just Defender).  Tried uninstalling ReSharper 10, no luck.

    Thanks again.

    Friday, December 18, 2015 9:17 PM
  • Hi ealve,

    >>I do not remember this happening prior to Update 1.

    You mean this problem occurs after installing Update 1, is it right? Please unisntall Update 1 to make sure whether this probelm is caused by Update 1.

    Before uninstalling Update 1, please repair your Visual Studio 2015 first by Control Panel -> Programs -> Visual Studio 2015 -> Change -> Repair. If it doesn't fix this problem, then uninstall Update 1.

    In addition, please use http://aka.ms/vscollect  to gather the VS and .Net Frameowrk installation logs. After using it, you will find vslogs.cab from %temp% folder. Please upload the file to Onedrive and share the link here.

    Best Regards,
    Weiwei

    Monday, December 21, 2015 2:10 AM
    Moderator
  • Weiwei,

    I'm not sure how you uninstall Update 1.  Do you mean uninstall Visual Studio 2015 entirely then re-install the version that does not have Update 1?

    Thanks.

    Erwin

    Monday, December 21, 2015 11:06 PM
  • Hi ealva,

    No, we needn't uninstall entirely Visual Studio. Please open Control Panel -> Programs -> View Installed Update, then find out the Visual Studio 2015 Update 1 and uninstall it.

    Best Regards,
    Weiwei

    Tuesday, December 22, 2015 2:43 AM
    Moderator
  • Thanks again Weiwei.

    I uninstalled VS2015 entirely, then re-installed from the VS2015 Update 1 ISO so the option was no longer available.  I have since uninstalled VS2015 Update 1, THEN installed VS2015 (no updates).

    Here are the new issues:

    1. Solution no longer loads (says "incompatible") but prompts to install Windows 10 SDK 10.0.10240 even though it's already installed.
    2. Uninstalled SDK 10.0.10240, then re-installing results in the same problem.

    The vslogs.zip file is here:

    https://onedrive.live.com/redir?resid=CC93A7819523ADBA%218814

    I'm tempted to do a full PC re-install, but since I'm running into the same issue with another PC, I doubt if this will fix my problems.

    Erwin

    Wednesday, December 23, 2015 1:06 AM
  • Hi ealva,

    According to your installation log, your Visual Studio is installed correctly.

    Since you have re-install your Visual Studio and happened with new issues. Please resolve the new issues and then continue previous problem.

    Please check whether you have installed Universal Windows App Development Tools as below image shows. If not, please checked them through Control Panel -> Programs -> Visual Studio 2015 -> Change -> Modify.

    Since you opened a exist app, please create a new UWP app to check whether it still has the same problem. If new UWP app works fine, please move the old app files to the new app one by one.

    If create new UWP app failed, please tell us what error message you get when creating new app. We need to analysis the reason based on the error message.

    Best Regards,
    Weiwei

    Wednesday, December 23, 2015 2:38 AM
    Moderator
  • I'm back to Update 1.  I can at least open the solution and build, but with the original issues still present.

    I can re-send the installation logs again if necessary.

    Erwin

    Wednesday, December 23, 2015 3:50 AM
  • Hi ealva,

    According to the screenshot in your first reply, the file of xaml is shown correctly in App1 project. Do you confirm this problem occurs with all projects? Or do you mean this problem occurs in all SharedProjects ?

    >>I tried opening the solution on a different machine under the same account, same results.

    Please change another account to check whether there has any permission problem with your account. And please use your account to test on your colleague's computer who don't have this problem. This can help us make sure it is related to computer environment or account.

    Best Regards,
    Weiwei

    Wednesday, December 23, 2015 5:48 AM
    Moderator
  • Regular projects do not exhibit this issue, only shared projects.

    I'll try to switch accounts and send an update.

    Erwin

    Wednesday, December 23, 2015 6:09 PM
  • Creating new local PC account did not solve the issue, unfortunately.

    I have all the required components installed.

    Just a recap of the issues in the shared projects:

    1. Missing folders
    2. Missing xaml files, only showing code-behind
    3. Missing templates (on Add New Item)

    There might be something simple here that I'm missing.  Visual Studio 2015 can't be this bad.

    Erwin


    Wednesday, December 23, 2015 7:30 PM
  • When selecting Update 1 during the installation dialog and proceeding, the option to remove it is no longer allowed.

    Erwin

    Wednesday, December 23, 2015 9:50 PM
  • Hi ealva,

    I create a new Universal app and add an shared project, then when I try to add new items for shared project, I also can't find the templates. So I want to create a Windows 8.1 Universal app to compare whether there any different between them, but I can't create Windows 8.1 app because I don't install "Windows 8.1 and Windows Phone 8/8.1 Tools".

    After I update this tools, I can add the templates for Shared project. And if I copy a xaml page into this shared projects, both of the xaml file and xaml.cs file shows correctly.

    According to the screenshot you provided, you also don't install the Windows 8.1 and Windows Phone 8/8.1 Tools. Please check and install it, then check whether it still has this problem.

    Best Regards,
    Weiwei

    • Marked as answer by ealva Thursday, December 24, 2015 7:45 PM
    Thursday, December 24, 2015 2:59 AM
    Moderator
  • That's it! That fixed it!

    That was really frustrating.  Thanks a lot, Weiwei.

    Erwin

    Thursday, December 24, 2015 7:44 PM