locked
Problem compiling CF project under V2.0 April CTP RRS feed

  • Question

  • I have migrated most of my code over to V2.0 and it seems to work OK. However, I have a problem with CF projects. They all fail to build with similar error messages:

     

    Code Snippet

    Error 1 The imported project "C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.CSharp.Targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. C:\Microsoft Robotics Dev Studio 2008\ProMRDS\Chapter4\DriveByWire\Proxy\cf.DriveByWire.Y2008.M01.proxy.csproj 151 9 cf.DriveByWire

     

    Error 2 The imported project "C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.CSharp.Targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. C:\Microsoft Robotics Dev Studio 2008\ProMRDS\Chapter4\DriveByWire\Proxy\cf.DriveByWire.Y2008.M01.transform.csproj 143 9 cf.DriveByWire

     

    Error 3 The command ""C:\Microsoft Robotics Dev Studio 2008\bin\DssProxy.exe" /dll:"C:\Microsoft Robotics Dev Studio 2008\bin\DriveByWire.Y2008.M01.dll" /proxyprojectpath:"C:\Microsoft Robotics Dev Studio 2008\ProMRDS\Chapter4\DriveByWire\Proxy " /keyfile:"C:\Microsoft Robotics Dev Studio 2008\samples\mrisamples.snk"  /gcfp /binpath:". " /referencepath:"C:\Microsoft Robotics Dev Studio 2008\bin\ " /referencepath:"C:\Microsoft Robotics Dev Studio 2008\bin\ " /referencepath:"C:\Microsoft Robotics Dev Studio 2008\bin\ " /referencepath:"C:\Microsoft Robotics Dev Studio 2008\bin\ " /referencepath:"C:\Microsoft Robotics Dev Studio 2008\bin\ " /referencepath:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ " /referencepath:"C:\Microsoft Robotics Dev Studio 2008\bin\ " /referencepath:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ " /referencepath:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ " /referencepath:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ " /referencepath:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ "" exited with code 20. cf.DriveByWire

     

     

    The errors are during the building of the proxy and the transform which I do not have any direct control over.

     

    I should add that I do have .NET 3.5 installed on my machine. However, the path specified in the error message (Microsoft.CompactFramework.CSharp.Targets) does NOT exist on my PC under the .NET 3.5 folder.

     

    Trevor

     

    Sunday, April 13, 2008 4:43 AM

Answers

  • Hi,

     

    I think I've seen this error before when migrating VS 05 projects to VS 08 and forgetting to change the targets in the project file. Did you migrate VS 05 projects to VS 08? What method did you use for migration?

     

    Please look for the line that looks like this in your project file (open it with notepad)

    Code Snippet

      <Import Project="$(MSBuildToolsPath)\Microsoft.CSHARP.Targets" />

     

     

    and if it looks like this:

    Code Snippet

      <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />

     

    change it to match the one on top.

     

    If this is not it, do the regular .net projects work fine for you, and only the CF projects fail?

     

    Pavel

    Tuesday, April 15, 2008 12:47 AM

All replies

  • Hi,

     

    I think I've seen this error before when migrating VS 05 projects to VS 08 and forgetting to change the targets in the project file. Did you migrate VS 05 projects to VS 08? What method did you use for migration?

     

    Please look for the line that looks like this in your project file (open it with notepad)

    Code Snippet

      <Import Project="$(MSBuildToolsPath)\Microsoft.CSHARP.Targets" />

     

     

    and if it looks like this:

    Code Snippet

      <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />

     

    change it to match the one on top.

     

    If this is not it, do the regular .net projects work fine for you, and only the CF projects fail?

     

    Pavel

    Tuesday, April 15, 2008 12:47 AM
  • Hi Pavel,

     

    I migrated my V1.5 code to V2.0 using DssProjectMigration with the /s qualifier. I did not convert from VS2005 to VS2008, and the projects still open in VS2005 OK. Therefore the csproj file contains MSBuildBinPath. If I change it to MSBuildToolsPath then the project will not load.

     

    The problem only occurs with CF projects -- all of my other desktop projects work fine.

     

    I tried to upgrade to VS2008, but unfortunately I only have VS2008 Standard Edition and it does not support CF projects, so the upgrade failed.

     

    Any other suggestions? Maybe I will have to re-create the CF projects under MRDS 2.0.

     

    Trevor

     

     

    Tuesday, April 15, 2008 3:07 AM