raven
raven

Reputation: 18145

Where does the file Microsoft.CompactFramework.VisualBasic.targets come from?

I have a Pocket PC 2003 solution, consisting of three projects, that was created in Visual Studio 2005. I open the solution in Visual Studio 2008 and two of the projects fail to convert due to errors like the following:

Unable to read the project file 'PDA.vbproj'. D:\PDA.vbproj(121,61): The imported project "C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.VisualBasic.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

This file exists in the v2.0.50727 directory

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.CompactFramework.VisualBasic.targets

but not in the v3.5 directory. I looked on another of my development computers and the file is there. I reinstalled v3.5 of the .NET Framework and Compact Framework, but that did not restore the file. Where does it come from?

Upvotes: 16

Views: 16883

Answers (3)

Yoram
Yoram

Reputation: 31

For projects that search it in framework 2.0 folder you should copy those four files:

  1. Microsoft.CompactFramework.VisualBasic.targets,
  2. Microsoft.CompactFramework.CSharp.targets,
  3. Microsoft.CompactFramework.Common.targets,
  4. Microsoft.CompactFramework.Build.Tasks.dll

From framework 3.5 folder into framework 2.0, in my computer: from C:\Windows\Microsoft.NET\Framework\v3.5 to C:\Windows\Microsoft.NET\Framework\v2.0.50727

It worked for me

Upvotes: 1

Hindurable
Hindurable

Reputation: 591

Microsoft.CompactFramework.CSharp.targets was not found...

You may run into an error message like the one above when trying to load a smart device project into Visual Studio after a new Windows 10 build has been installed or when upgrading from Windows 8 to Windows 8.1. This error is due to the fact the following files were removed when the installation of the new build occured.

  • Microsoft.CompactFramework.Common.targets

  • Microsoft.CompactFramework.CSharp.targets

  • Microsoft.CompactFramework.VisualBasic.targets

To remedy the issue simply install Power Toys for .NET Compact Framework which will place these missing files back where they belong.

Upvotes: 49

ChrisLively
ChrisLively

Reputation: 88072

It is one of the MSBuild target files and would be installed with visual studio.

http://msdn.microsoft.com/en-us/library/ms164312.aspx

Upvotes: 6

Related Questions