none
Visual Studio 2015: Brand New Universal app won't even compile.

    Question

  • I wanted to try to make a Windows Universal app, but straight out of the starting gate, the template will not compile. Please refer to image below. It is a missing system reference. This is not the case when I try the same thing on my surface. Do I have a bad install? I have repaired and also resetsettings. I have also installed the standalone APK for windows 10. There is not a lot on this topic on google, I ask for advice on what I should attempt next?

    For your infomation, if I start a new project under Windows Universal app (windows 8.1), it does compile.

    I get a package Installation error Popup saying:

    Could not add all required packages to the project. the folllowing

    packages failed to install from the 'c:\program files(x86)\Microsoft SDKs\nugetPackages

    Microsoft.NETCore.UniversalWindowsPlatform.5.1.0: package restore 

    failed.  Rolling back package changes for 'app7' 


    So try to installl the netCore manually..

    I get messages like this:

    PM> Install-Package Microsoft.NETCore.UniversalWindowsPlatform
    Restoring packages for 'App3'.
    Restoring packages for C:\Users\Brian\Documents\Visual Studio 2015\Projects\App3\App3\project.json...
    Package restore completed successfully for 'App3'.
    Restoring packages for 'App3'.
    Restoring packages for C:\Users\Brian\Documents\Visual Studio 2015\Projects\App3\App3\project.json...
    Install-Package : Microsoft.Win32.Primitives 4.0.0 is not compatible with UAP,Version=v10.0.
    At line:1 char:1
    + Install-Package Microsoft.NETCore.UniversalWindowsPlatform
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
        + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
     
    Install-Package : System.ComponentModel.EventBasedAsync 4.0.10 is not compatible with UAP,Version=v10.0.
    At line:1 char:1
    + Install-Package Microsoft.NETCore.UniversalWindowsPlatform
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
        + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
     
    Install-Package : System.Data.Common 4.0.0 is not compatible with UAP,Version=v10.0.
    At line:1 char:1
    + Install-Package Microsoft.NETCore.UniversalWindowsPlatform
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
        + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
     
    Install-Package : System.Diagnostics.StackTrace 4.0.0 is not compatible with UAP,Version=v10.0.
    At line:1 char:1
    + Install-Package Microsoft.NETCore.UniversalWindowsPlatform
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
        + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
     

    **************************************************************************************************************

    Bolded a few lines that might help.   A lot of people are having this problem of not having the Universal app not compiling 

    I have done /resetsetting general and tried to install during safe mode.  Its does not work

    I have done a complete reinstallation of VS and still same error.

    Any other suggestions?

    Saturday, July 2, 2016 11:37 PM

Answers

  • SOLUTION HERE!!!!!!

    Ok, what you suggested to download and install the redistributable did not work because it still thought that an earlier version needed to be uninstalled:  

    OK GUYS.. THIS IS NOT AN EASY SOLUTION

    1. COMPLETELY UNINSTALL VISUAL STUDIO  
    2. goto c:\programdata\package cache
    3. move all from package cache to a new folder
    4. run this powershell script 
    $app = Get-WmiObject  -Query "SELECT * FROM Win32_Product WHERE Version = '14.0.23506'"
    
     foreach ($app in $app) {
       $app.Uninstall()
     }

      5. install Visual studio

      6.  goto folder C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplates\CSharp\Windows Root\Windows UAP\1033

      7. Go into folders BlankApplication, ClassLibrary, RunTimeComponent, UnitTestApp and modify the .vstemplate using a program under admin mode

     8.  Look for 

    <package id="Microsoft.NETCore.UniversalWindowsPlatform" version="5.1.0" skipAssemblyReferences="false" />
     

         and change to the latest version number, in this case 5.2.2

    <package id="Microsoft.NETCore.UniversalWindowsPlatform" version="5.2.2" skipAssemblyReferences="false" />
    

      8.  I would recommend you start visual studio using   devenv /ResetSettings

      9.  move the package cache back and do not replace the files.   You will have around 8 folders left in old package cache that are duplicates.  

     

    I am curious if I could have used  devenv /ResetSkipPkgs  at the beginning of this mess and fixed it.. 

    oh well, I will never know now.

                         



    • Marked as answer by Brian Doetsch Saturday, July 30, 2016 1:12 AM
    Saturday, July 30, 2016 1:12 AM

All replies

  • Hi Brian Doetsch,

    Thank you for your post.

    From your description, it seems that VS installation is not complete well. I suggest you repair Visual Studio  and some VS related SDK (such as win 10 sdk) from Control Panel first.

    You may also take a look at the following link, this member fixed the similar issue by installing Microsoft.NETCore.UniversalWindowsPlatform, please check if you have already installed it well on you machine:

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/d1575446-83a4-4ebe-b860-8e7183622bb2/vs-2015-universal-apps?forum=visualstudiogeneral

    If the repair doesn't help, Please use http://aka.ms/vscollect   to gather the installation logs. After using it, you will find vslogs.zip from %temp% folder.
    Please upload the file to https://onedrive.live.com/   and share the link with us.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.



    Monday, July 4, 2016 8:06 AM
    Moderator
  • Dear Lana

    Here is the link for the vslogs as requested.

    https://1drv.ms/u/s!AvmOGb-juvyBgrkT_nFrslOX6Dcyxg


    Tuesday, July 5, 2016 5:27 AM
  • Hi Brian,

    I checked your log and find the error message below:

    WixRemoveFoldersEx:  Error 0x80070057: Missing folder property: WEBTOOLSITEMTEMPLATESCACHE for row: RemoveICFolder
    CustomAction WixRemoveFoldersEx returned actual error code 1603 but will be translated to success due to continue marking
    MSI (s) (F0:18) [15:32:14:609]: Doing action: CostInitialize
    Action ended 15:32:14: WixRemoveFoldersEx. Return value 1.
    MSI (s) (F0:18) [15:32:14:609]: Machine policy value 'MaxPatchCacheSize' is 10
    MSI (s) (F0:18) [15:32:14:612]: PROPERTY CHANGE: Adding ROOTDRIVE property. Its value is 'H:\'.
    MSI (s) (F0:18) [15:32:14:692]: PROPERTY CHANGE: Adding CostingComplete property. Its value is '0'.

    It seems that some templates are missing or corrupted. please repair  your VS :
    1.Go to Control Panel >Programs >Programs and Features
    2.Select Microsoft Visual Studio 2015 and click on 'repair'.

    Or you could click on "modify", to check and make sure you have installed the UWP related components:

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Tuesday, July 5, 2016 6:58 AM
    Moderator
  • I took your advise and removed the three components,rebooted, then I uninstalled all the c++ Redistributables in the installed programs.    I rebooted and then did a modify.   There were errors.   This is the install log:   https://1drv.ms/u/s!AvmOGb-juvyBgrkU9PcIUVe9wN-AsQ

    However the above mentioned redistributables are not in the installed programs list or even a search for 14.0.23506 in regedit found nothing.    I don't know where visual studio thinks this files are.   

    Thank you in advance.   

    Friday, July 8, 2016 12:08 AM
  • I used a program called msiinv and found all the install files anything relating to 14.0.23506 and I uninstall them.    I ran msiinv and found nothing of those files and decided to run repair again. 

    Friday, July 8, 2016 1:11 AM
  • Hi Brian Doetsch,

    I checked the log you pasted and find there are too much error message, please see:

    [1E7C:1A04][2016-07-06T21:27:03]i325: Registering dependency: {f90e9ec5-977b-4752-8518-abe39dac065d} on package provider: {99BF4B74-C9C7-3F1A-897B-8D63D8228E2C}, package: vcRuntimeDebugD14_x64
    [1E7C:31C4][2016-07-06T21:27:48]e000: Error 0x80091007: Hash mismatch for path: C:\ProgramData\Package Cache\NetFxIsv394271\packages\dotNetFramework\dotNetFx-x86-x64-AllOS-ENU.exe, expected: 291FC1491F97BFAC71C2EFD1945E28D778172493, actual: 5FE5917AA00220C2ED0C6B9706B09497CB5B15C1
    [1E7C:31C4][2016-07-06T21:27:48]e000: Error 0x80091007: Failed to verify hash of payload: netfxfullredist_43
    From the screenshot, there must be other VC++ redistributable edition installed on your machine, and the VC++ Redistributable 14.0.23506 install package is broken.

    From my point of view, you had better repair your VS Via control panel, and make sure you have installed the UWP related components on your machine.

    Besides, you also have to install win 10 sdk. here is the download link:

    https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Friday, July 8, 2016 2:07 AM
    Moderator
  • Yes I know the VC++ Redistributable 14.0.23506 install package is broken.   I don't know how to get past that.   I have used msiinv and found  the .msi files in the C:\WINDOWS\Installer\ and manually uninstalled it. 

    Here is an example of one of entries.   

    Microsoft Visual C++ 2015 x64 Debug Runtime - 14.0.23506
    Product code: {99BF4B74-C9C7-3F1A-897B-8D63D8228E2C}
    Product state: (5) Installed.
    Assignment: per machine
    Package code: {CF24609A-31E9-49F2-B178-F85E0A9FE54E}
    Version: 14.0.23506
    Publisher: Microsoft Corporation
    Language: 1033
    Installed from: C:\ProgramData\Package Cache\{99BF4B74-C9C7-3F1A-897B-8D63D8228E2C}v14.0.23506\packages\vcRedistD14\debug\x64\
       Package: vc_runtimeDebug_x64.msi
    Help link: http://go.microsoft.com/fwlink/?LinkId=133405
    Instance type: 0
    Local package: C:\WINDOWS\Installer\132a37f.msi
    Install date: 2016\01\29
    0 patch packages.

    Like I said I uninstalled using the flies in the c:/windows/installer directory..   

    Using the example above, should I have uninstalled vc_runtimeDebug_x64.msi

    from the following directory.

    C:\ProgramData\Package Cache\{99BF4B74-C9C7-3F1A-897B-8D63D8228E2C}v14.0.23506\packages\vcRedistD14\debug\x64\

    Better yet does Microsoft have a tool to fix faulty installations, or do  you have a install package for VC++ Redistributable 14.0.23506?   I can't find it on the net.   Maybe if I reinstalled it and then removed it, it would fix the problem

    From the screenshot, there must be other VC++ redistributable edition installed on your machine, and the VC++ Redistributable 14.0.23506 install package is broken.

    From my point of view, you had better repair your VS Via control panel, and make sure you have installed the UWP related components on your machine.

    Monday, July 11, 2016 3:23 AM
  • Hi Brian,

    Please download Visual C++ Redistributable manually from the following link to see if it works:

    https://www.microsoft.com/en-sg/download/details.aspx?id=48145

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Tuesday, July 12, 2016 8:37 AM
    Moderator
  • SOLUTION HERE!!!!!!

    Ok, what you suggested to download and install the redistributable did not work because it still thought that an earlier version needed to be uninstalled:  

    OK GUYS.. THIS IS NOT AN EASY SOLUTION

    1. COMPLETELY UNINSTALL VISUAL STUDIO  
    2. goto c:\programdata\package cache
    3. move all from package cache to a new folder
    4. run this powershell script 
    $app = Get-WmiObject  -Query "SELECT * FROM Win32_Product WHERE Version = '14.0.23506'"
    
     foreach ($app in $app) {
       $app.Uninstall()
     }

      5. install Visual studio

      6.  goto folder C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplates\CSharp\Windows Root\Windows UAP\1033

      7. Go into folders BlankApplication, ClassLibrary, RunTimeComponent, UnitTestApp and modify the .vstemplate using a program under admin mode

     8.  Look for 

    <package id="Microsoft.NETCore.UniversalWindowsPlatform" version="5.1.0" skipAssemblyReferences="false" />
     

         and change to the latest version number, in this case 5.2.2

    <package id="Microsoft.NETCore.UniversalWindowsPlatform" version="5.2.2" skipAssemblyReferences="false" />
    

      8.  I would recommend you start visual studio using   devenv /ResetSettings

      9.  move the package cache back and do not replace the files.   You will have around 8 folders left in old package cache that are duplicates.  

     

    I am curious if I could have used  devenv /ResetSkipPkgs  at the beginning of this mess and fixed it.. 

    oh well, I will never know now.

                         



    • Marked as answer by Brian Doetsch Saturday, July 30, 2016 1:12 AM
    Saturday, July 30, 2016 1:12 AM