Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

The imported project “C:Program Files(x86)MsBuildMicrosoftWindowsXamlv14.08.1Microsoft.Windows.UI.Xaml.CSharp.targets” was not found

While trying to create any C# shared or Windows Phone projects using the Visual Studio 2015 IDE, you may receive an error message as highlighted below:

This is a known issue and it would be fixed in a future update. In order to resolve the issue, please follow the below two workaround:

Workaround 1: 

Please modify the CodeSharing targets. To do so, download the attached target file and replace the file “C:Program Files (x86)MSBuildMicrosoftVisualStudiov14.0CodeSharingMicrosoft.CodeSharing.CSharp.targets” with it.

Alternatively, you can repair the target file manually: Open the file C:Program Files (x86)MSBuildMicrosoftVisualStudiov14.0CodeSharingMicrosoft.CodeSharing.CSharp.targets(or, for Visual Basic, Microsoft.CodeSharing.VisualBasic.targets)

Around line 8, you should see two entries:
Project=”$(MSBuildExtensionsPath32)MicrosoftWindowsXamlv$(VisualStudioVersion)Microsoft.Windows.UI.Xaml.CSharp.targets” Condition=”Exists(‘$(MSBuildExtensionsPath32)MicrosoftWindowsXamlv$(VisualStudioVersion)Microsoft.Windows.UI.Xaml.CSharp.targets’)”/>

Project=”$(MSBuildBinPath)Microsoft.CSharp.Targets” Condition=”!Exists(‘$(MSBuildExtensionsPath32)MicrosoftWindowsXamlv$(VisualStudioVersion)Microsoft.Windows.UI.Xaml.CSharp.targets’)”
/>

Replace these entries with the following:

Project=”$(MSBuildExtensionsPath32)MicrosoftWindowsXamlv$(VisualStudioVersion)Microsoft.Windows.UI.Xaml.CSharp.targets”
Condition=”false”/>

Project=”$(MSBuildBinPath)Microsoft.CSharp.Targets” Condition=”true”
/>

Workaround 2:

1. Open the VS 2015 IDE
2. Click on File->New->Project
3. Choose the only Project template under Windows 8 (below screenshot)
This will launch Visual Studio setup where you can install the templates that are missing.

Alternatively, you can install the below feature by changing the installed Visual Studio 2015 from the “Control PanelProgramsPrograms and Features”:

P.S.  For Windows 7 OS, the workaround 1 will be applicable only. It can also occur with Visual Basic shared projects.  Obviously the file to modify would be the VB one (Microsoft.CodeSharing.VisualBasic.targets)

Share the post

The imported project “C:Program Files(x86)MsBuildMicrosoftWindowsXamlv14.08.1Microsoft.Windows.UI.Xaml.CSharp.targets” was not found

×

Subscribe to Msdn Blogs | Get The Latest Information, Insights, Announcements, And News From Microsoft Experts And Developers In The Msdn Blogs.

Get updates delivered right to your inbox!

Thank you for your subscription

×