none
error MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.0-rc4-004771\Microsoft\Portable\v4.5\Microsoft.Portable.CSharp.targets" was not found.

    Question

  • Hi,

    The following error is generated from my Portable Class Library project when running under VS 2017 RC:

    error MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.0-rc4-004771\Microsoft\Portable\v4.5\Microsoft.Portable.CSharp.targets" was not found.

    That file does not exist anywhere on my c drive.  How is it obtained or how is the error avoided? 

    Monday, March 13, 2017 5:41 PM

All replies

  • Hi DaveIII,

    Did this project was created in your VS2017? Since the latest VS 2017 RTM was released, so please use the latest one, and then test it again.

    >>error MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.0-rc4-004771\Microsoft\Portable\v4.5\Microsoft.Portable.CSharp.targets" was not found.

    Please Confirm that the path in the <Import>declaration is correct, and that the file exists on disk.

    Or it is related to the build tool for VS2017, you could find and download it under Other Tools and Frameworks here:

    https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017-rc

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, March 14, 2017 8:35 AM
    Moderator
  • Hi Jack,

    The project was created in VS 2015 and converted to VS2017. 

    I am using the latest/greatest version of VS including the recent update. 

    The import statement is not correct.  I'm trying to understand why Microsoft would point it somewhere incorrect.  I've also learned that the Microsoft.Portable.CSharp.targets file exists in different folders depending on which version of VS (Enterprise, Pro, etc...) one is using.  How can our team - which uses different versions - have one common setting that works for everyone? 

    Friday, March 17, 2017 5:09 PM
  • Hi DaveIII,

    Generally projects were compatible in the same VS versions(For example, different VS2017 versions).

    If possible, you could test it in your side.

    But for old project created in VS2015, if you open it using the VS2017, sometimes it would have the updated issue since they use the different configurations or .NET Framework.

    One idea is that you could create a new VS2017 project, and then compare the .xxproj  with your previous old project, I think you would find more differences between the .xxproj file.

    In addition, some feedbacks were resolved like this one in the VS2017 RTM, so please test the above steps using the latest RTM versions.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, March 20, 2017 3:26 AM
    Moderator