c# - Why can't I create Shared Project in Visual Studio 2015? -
i downloaded visual studio community 2015. tried create shared project , getting error:
content microsoft.windows.ui.xaml.csharp.targets
<project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <propertygroup condition="'$(targetplatformversion)'==''"> <targetplatformversion>8.0</targetplatformversion> </propertygroup> <propertygroup condition="'$(targetplatformidentifier)' == 'uap'"> <redirectiontarget>8.2</redirectiontarget> </propertygroup> <propertygroup condition="'$(redirectiontarget)' == ''"> <redirectiontarget>$(targetplatformversion)</redirectiontarget> </propertygroup> <!-- direct 8.0 projects 8.1 targets enable retargeting --> <propertygroup condition="'$(redirectiontarget)' == '8.0'"> <redirectiontarget>8.1</redirectiontarget> </propertygroup> <import project="$(redirectiontarget)\microsoft.windows.ui.xaml.csharp.targets" /> </project>
i not have folder name 8.1
one workaround make following edits:
open file %programfiles(x86)%\msbuild\microsoft\visualstudio\v14.0\codesharing\microsoft.codesharing.csharp.targets
(for visual basic file microsoft.codesharing.visualbasic.targets
) , following entries around line 8 -
<import project="$(msbuildextensionspath32)\microsoft\windowsxaml\v$(visualstudioversion)\microsoft.windows.ui.xaml.csharp.targets" condition="exists('$(msbuildextensionspath32)\microsoft\windowsxaml\v$(visualstudioversion)\microsoft.windows.ui.xaml.csharp.targets')"/> <import project="$(msbuildbinpath)\microsoft.csharp.targets" condition="!exists('$(msbuildextensionspath32)\microsoft\windowsxaml\v$(visualstudioversion)\microsoft.windows.ui.xaml.csharp.targets')" />
change these lines following -
<import project="$(msbuildextensionspath32)\microsoft\windowsxaml\v$(visualstudioversion)\microsoft.windows.ui.xaml.csharp.targets" condition="false"/> <import project="$(msbuildbinpath)\microsoft.csharp.targets" condition="true" />
basically, undo conditional import of xaml
based shared projects.
this (believe or not) advice received ms issue. think it's related unclean upgrade of rc (or earlier) versions rtm , selection of different options during install.
(insert usual caveats editing files don't "belong" you, take backups, , if you're not confident make such edits, don't)
Comments
Post a Comment