Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft.CompactFramework.CSharp.targets was not found while opening projects

I tried to create a smart device project in Visual Studio 2008.

Target Platform: Windows Mobile 5.0 Pocket PC SDK.

.NET Compact Framework version: .NET Compact Framework 3.5

But I get the following error:

enter image description here

like image 643
MARKAND Bhatt Avatar asked Apr 03 '16 05:04

MARKAND Bhatt


4 Answers

It is poorly documented.

Both .NET Compact Framework Redistributable and Power Toys must be installed for all necessary files (such as MSBuild targets files) to be available for compilation.

like image 78
Lex Li Avatar answered Nov 08 '22 04:11

Lex Li


For all those who end up here as a result of the Windows 10 "anniversary update" note that the file Microsoft.Compactframework.CSharp.Targets can be found in the C:\Windows.old\WINDOWS\Microsoft.NET\Framework\v3.5 directory and copied back to where it belongs!

(Same with Microsoft.CompactFramework.Common.targets, Microsoft.CompactFramework.VisualBasic.targets)

like image 41
Paul Coldrey Avatar answered Nov 08 '22 03:11

Paul Coldrey


It also happened to me, and more than just once, with two projects for Visual Studio 2008 Professional.

It's quite easy for me to solve this problem: just re-install (I use the "Repair" option that seems to work great) the Power Toys for .NET Compact Framework 3.5. You can find this tool here: http://www.microsoft.com/en-us/download/details.aspx?id=13442

I think that sometimes, maybe after some Windows/.NET framework automatic updates, this problem can still occur. But the solution is quite easy in this case, and there is no need to edit the .vbproj/.csproj file!

like image 10
MAXE Avatar answered Nov 08 '22 04:11

MAXE


I met the same mistake . Solution vs2008 repair.

like image 2
qobayishi Avatar answered Nov 08 '22 03:11

qobayishi