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

3

16

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?

Overwind answered 9/12, 2008 at 19:15 Comment(0)
S
6

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

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

Salty answered 9/12, 2008 at 19:18 Comment(2)
Thanks. A reinstall of VS2008 replaced them. It would be nice to know what made them disappear.Overwind
I used this hint to start a "repair" installation, which also fixed it! Thanks.Lemming
L
49

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.

Lean answered 28/7, 2015 at 6:42 Comment(5)
You just saved me from having to revert back to Windows 7 (from 10). This also appears to have resolved my Sync Center not starting issue as well. Thank you!. for those needing the link to the power toys here you go microsoft.com/en-us/download/confirmation.aspx?id=13442Molly
@GeovaniMartinez: I can confirm that this works for the Win7 -> Win10 related issue.Schorl
had the same issue after upgrading to win 10! thanks a lot!!Lillis
@marmenmu While a reinstall of VS2008 might work this takes a fraction of the time. I needed to do this after Windows 10 upgrade and then after some Windows 10 updates.Impulsive
Thanks, you saved the day! I've been struggling to get the next release of NUnit out. I tried repairing my installation, but that failed too, but you got me up and running. I was nearly ready to drop CF from NUnit :)Tactual
S
6

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

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

Salty answered 9/12, 2008 at 19:18 Comment(2)
Thanks. A reinstall of VS2008 replaced them. It would be nice to know what made them disappear.Overwind
I used this hint to start a "repair" installation, which also fixed it! Thanks.Lemming
S
1

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

Substitutive answered 3/12, 2017 at 14:13 Comment(1)
Yes. It's worked for me also. Unfortunately, in my system, I didn't find those files. I copied from another system to mine. Boom it's worked.Diaphony

© 2022 - 2024 — McMap. All rights reserved.