Error msb4019 импортированный проект c microsoft cpp default props не обнаружен

I have a project created in Visual Studio, 2013. The project file has the following properties: ToolsVersion="12.0", PlatformToolset = v120. I have Visual Studio 2013 and Microsoft Build Tool...

I have a project created in Visual Studio, 2013.

The project file has the following properties:

ToolsVersion=»12.0″,
PlatformToolset = v120.

I have Visual Studio 2013 and Microsoft Build Tools 2015 installed.
This project gets successfully built using MSBuild 12.0. Upon the attempt to build it with MSBuild 14.0 I get an error

MSB4019: The imported project "C:Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. 

As I understand, the problem is that the variable VCTargetsPath doesn’t get evaluated. If I specify the variable VCTargetsPath before the build (with the value C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V120), the problem is solved.

However, this approach is not very convenient in case the path is different. Is it possible to somehow solve the problem in a more optimal way?

The registry key and its value:

HKLMSoftwareWOW6432NodeMicrosoftMSBuildToolsVersions12.0VCTargetsPath $([MSBuild]::ValueOrDefault('$(VCTargetsPath)','$(MSBuildExtensionsPath32)Microsoft.Cppv4.0V120'))

I have been dealing with this issue for awhile now.

I went to this page: AlexeyKupershtokh/node-v8-clone#7

But it did not help me. I also made sure everything for node-gyp is installed from reading this post
http://stackoverflow.com/questions/21365714/nodejs-error-installing-with-npm

I did the following as well:

Install python(2.x.x)
Install Microsoft Visual Studio C++ 2012 Express version
Install node-gyp: npm install -g node-gyp

I am still getting this in my console:

c:projectsmiscaffilatenode_modulesiconvbuildlibiconv.vcxproj(20,3): erro
r MSB4019: The imported project «c:Microsoft.Cpp.Default.props» was not found.
Confirm that the path in the declaration is correct, and that the fil
e exists on disk.
gyp ERR! build error
gyp ERR! stack Error: msbuild failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:UsersNB91870AppDataRoamingnpm
node_modulesnpmnode_modulesnode-gyplibbuild.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command «C:Program Filesnodejsnode.exe» «C:UsersNB91870AppD
ataRoamingnpmnode_modulesnpmnode_modulesnode-gypbinnode-gyp.js»
«rebuild»
gyp ERR! cwd c:projectsmiscaffilatenode_modulesiconv
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3

  • Remove From My Forums
  • Вопрос

  • I use visual studio 2019 to open my example code, build the sample code failed, the below is message:

    What happened? 

    Error MSB4019
    The imported project «C:Program Files (x86)Microsoft Visual Studio2019Communityxxx» was not found.

    Confirm that the expression in the Import declaration «C:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuildMicrosoftVCv160\Microsoft.Cpp.Default.props» is correct, and that the file exists on disk.

    I really appreciate if someone could advise me on this issue.

    • Перемещено

      31 марта 2020 г. 8:44

Ответы

  • Hi gsegria,

    Thank you for feedback.

    Please check if your windows system is the latest version, if no, please update it. And then download and install

    Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 into your system.

    Look forward to your feedback.

    Best Regards,

    Dylan


    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

    • Помечено в качестве ответа
      gsegria
      1 апреля 2020 г. 16:57

    • Изменено
      gsegria
      1 апреля 2020 г. 16:57
    • Помечено в качестве ответа
      gsegria
      1 апреля 2020 г. 16:57

Содержание

  1. «c:Microsoft.Cpp.Default.props» was not found. #10421
  2. Comments
  3. Error msb4019 импортированный проект c microsoft cpp default props не обнаружен
  4. Лучший отвечающий
  5. Вопрос
  6. Ответы
  7. Все ответы
  8. MSB4019: The imported project «c:Microsoft.Cpp.Default.props» was not found (was: Unable to install on windows 10 x64) #985
  9. Comments
  10. Footer
  11. Error msb4019 импортированный проект c microsoft cpp default props не обнаружен
  12. Answered by:
  13. Question
  14. Answers
  15. All replies

«c:Microsoft.Cpp.Default.props» was not found. #10421

I have been dealing with this issue for awhile now.

But it did not help me. I also made sure everything for node-gyp is installed from reading this post
http://stackoverflow.com/questions/21365714/nodejs-error-installing-with-npm

I did the following as well:

Install python(2.x.x)
Install Microsoft Visual Studio C++ 2012 Express version
Install node-gyp: npm install -g node-gyp

I am still getting this in my console:

c:projectsmiscaffilatenode_modulesiconvbuildlibiconv.vcxproj(20,3): erro
r MSB4019: The imported project «c:Microsoft.Cpp.Default.props» was not found.
Confirm that the path in the declaration is correct, and that the fil
e exists on disk.
gyp ERR! build error
gyp ERR! stack Error: msbuild failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:UsersNB91870AppDataRoamingnpm
node_modulesnpmnode_modulesnode-gyplibbuild.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command «C:Program Filesnodejsnode.exe» «C:UsersNB91870AppD
ataRoamingnpmnode_modulesnpmnode_modulesnode-gypbinnode-gyp.js»
«rebuild»
gyp ERR! cwd c:projectsmiscaffilatenode_modulesiconv
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3

The text was updated successfully, but these errors were encountered:

Hi
The recommended config for native builds is documented here https://github.com/nodejs/node-gyp
I would advise against Visual studio 2012 unless you have a specific usecase

@christian4423 are you still facing issues installing node-gyp ?

https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules
AlexeyKupershtokh/node-v8-clone#7
Add or modify the environment variable VCTargetsPath top point at the C++ build tools path. This should be something like C:Program Files (x86)MSBuildMicrosoft.Cppv4.0v140 (where 140 corresponds to Visual Studio 2015)

What you say is wrong. There is no any Microsoft.Cppv4.0v140 directories.

FYI, here is what C:Program Files (x86)MSBuild looks like

Doesn’t look like a npm issue to me.

Installing Standalone Build Tools solved this for me

I had the same issue and solved it using Windows option 1 on https://github.com/nodejs/node-gyp.
First comment from No9 did it for me.

«Installing Standalone Build Tools solved this for me»
— @nightwolfz I had visual studio community edition 2017 install but I am still seeing this message when I am trying to install oracledb

npm install -g oracledb

C:UsersSauravpAppDataRoamingnpmnode_modulesoracledb>if not defined npm_config_node_gyp (node «C:Program Filesnodejsnode_modulesnpmbinnode-gyp-bin. node_modulesnode-gypbinnode-gyp.js» rebuild ) else (node «» rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the «/m» switch.
C:UsersSauravpAppDataRoamingnpmnode_modulesoracledbbuildoracledb.vcxproj(20,3): error MSB4019: The imported project «C:Microsoft.Cpp.Default.props» was not f
ound. Confirm that the path in the declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: msbuild failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gyplibbuild.js:285:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:194:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command «C:Program Filesnodejsnode.exe» «C:Program Filesnodejsnode_modulesnpmnode_modulesnode-gypbinnode-gyp.js» «rebuild»
gyp ERR! cwd C:UsersSauravpAppDataRoamingnpmnode_modulesoracledb
gyp ERR! node -v v7.8.0
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok
npm ERR! Windows_NT 10.0.14393
npm ERR! argv «C:Program Filesnodejsnode.exe» «C:Program Filesnodejsnode_modulesnpmbinnpm-cli.js» «install» «-g» «oracledb»
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

after thrashing around for a while with various google searches, github, stackoverflow etc i’ve made a .bat file which does it all

npm install —global —production windows-build-tools

Источник

Error msb4019 импортированный проект c microsoft cpp default props не обнаружен

Лучший отвечающий

Вопрос

I use visual studio 2019 to open my example code, build the sample code failed, the below is message:

Error MSB4019 The imported project «C:Program Files (x86)Microsoft Visual Studio2019Communityxxx» was not found.

Confirm that the expression in the Import declaration «C:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuildMicrosoftVCv160\Microsoft.Cpp.Default.props» is correct, and that the file exists on disk.

I really appreciate if someone could advise me on this issue.

  • Перемещено Jeanine Zhang Microsoft contingent staff 31 марта 2020 г. 8:44

Ответы

Thank you for feedback.

Please check if your windows system is the latest version, if no, please update it. And then download and install Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 into your system.

Look forward to your feedback.

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

I re-install other windo ws version and re-install visual sudio. I can build any sample code success.

Все ответы

Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

My example code can build success by Visual Studio 2019 on other PC.

I tried re-install Visual Studio 2019.

I installed Visual Studio 2019 from Microsoft , vs_community__1392326258.1570290310.exe

Welcome to MSDN forum.

I suspect the cause of this issue is the same as your latest post. After changing the registration information, then check if the sample could be successfully built.

Источник

MSB4019: The imported project «c:Microsoft.Cpp.Default.props» was not found (was: Unable to install on windows 10 x64) #985

I’m running on windows 10 x64, Node x64 8.1.2 and I seem unable to install sharp . I originally noticed the problem via a plugin which has sharp as a dependency and traced it through to here.

If I npm i sharp i get the following error, does anyone see where this is failing what I could try?

I see a number of issues here relating to the same issue which all seem to point to problems with C++ redistributable etc. I should mention I have VS2017 installed, plus the 2015 build tools and have tried setting to both 2015 and 2017 without any joy.

Additionally, other node-gyp packages, such as node-sass build ok for me, so I’m not convinced it’s an issue with that (or at least one which is generic enough to cause everything to fail for me)

The text was updated successfully, but these errors were encountered:

error MSB4019: The imported project «c:Microsoft.Cpp.Default.props» was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

Please see #949 #420 #483 for details of how others have solved this problem when using multiple MSVC installations.

You’ll probably find npm install —build-from-source node-sass fails in the same manner.

@lovell thanks for the pointers, but this is what I’m getting at, other node-gyp based installs are working for me, just not this one. e.g.

Then if I run, npm i sharp directly afterwards:

I’m happy to try and debug things but if you know where I can start that’d be great. I’ve read the other issues but none of the solutions are working for me.

The following suggests node-sass is not compiling from source:

Cached binary found at C:UsersdougaAppDataRoamingnpm-cachenode-sass4.5.3win32-x64-57_binding.node

. so let’s try another example. Does npm install —build-from-source bcrypt fail?

Have you tried everything mentioned in the two Stack Overflow questions linked to in #420 (comment) ?

Aha, progress, yes you’re right the non cached version didn’t build, I didn’t spot that, my mistake. (Sorry not too experienced with node-gyp). I’m currently removing and re-adding the cpp distro as for some reason I can’t seem to correctly set the msvs:

Hmm, ok, re-installed the cpp 2015 build tools and used the manual set:

set VCTargetsPath=C:Program Files (x86)MSBuildMicrosoft.Cppv4.0v140 as it would be on my system.

Got further but now have different errors:

YES! finally got it working! there seemed to be two issues primarily.

No VCTargetsPath set — I set mine as a system level environment variable to the following path C:Program Files (x86)MSBuildMicrosoft.Cppv4.0v140 this seemed to solve the first issue where it couldn’t find the Microsoft.Cpp.Default.props file.

Missing 8.1 SDK from the MS visualcppbuildtools_full.exe — I had only originally selected every except 8.1 and had selected 10. because i’m on windows 10, node-gyp needs 8.1 it seems.

What didn’t aid the confusion was that the paths to the VC build tools are not very clear, here’s my registry structure for example:

Either way it’s all sorted now, if anyone wants to ask specific questions, best be quick whilst I remember the process!

Great, glad to hear you managed to get node-gyp to play nicely with multiple MSVC installs.

Thank you for the detailed updates — these should help others in a similar situation.

Wow even though i dont have a problem related to his program i had the same issue on another, And this works Thankyou so much @lovell ili @dougajmcdonald

115687 verbose stack Error: cloud-explorer@2.0.0 postinstall: npm run build:fonts && npm run build
115687 verbose stack Exit status 1
115687 verbose stack at EventEmitter. (C:UsersadminAppDataRoamingnpmnode_modulesnpmlibutilslifecycle.js:279:16)
115687 verbose stack at emitTwo (events.js:135:13)
115687 verbose stack at EventEmitter.emit (events.js:224:7)
115687 verbose stack at ChildProcess. (C:UsersadminAppDataRoamingnpmnode_modulesnpmlibutilsspawn.js:40:14)
115687 verbose stack at emitTwo (events.js:135:13)
115687 verbose stack at ChildProcess.emit (events.js:224:7)
115687 verbose stack at maybeClose (internal/child_process.js:943:16)
115687 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
115688 verbose pkgid cloud-explorer@2.0.0
115689 verbose cwd E:silexSilexSilex
115690 error Windows_NT 6.1.7601
115691 error argv «C:Program Filesnodejsnode.exe» «C:UsersadminAppDataRoamingnpmnode_modulesnpmbinnpm-cli.js» «install»
115692 error node v9.1.0
115693 error npm v4.3.0
115694 error code ELIFECYCLE
115695 error errno 1
115696 error cloud-explorer@2.0.0 postinstall: npm run build:fonts && npm run build
115696 error Exit status 1
115697 error Failed at the cloud-explorer@2.0.0 postinstall script ‘npm run build:fonts && npm run build’.
115697 error Make sure you have the latest version of node.js and npm installed.
115697 error If you do, this is most likely a problem with the cloud-explorer package,
115697 error not with npm itself.
115697 error Tell the author that this fails on your system:
115697 error npm run build:fonts && npm run build
115697 error You can get information on how to open an issue for this project with:
115697 error npm bugs cloud-explorer
115697 error Or if that isn’t available, you can get their info via:
115697 error npm owner ls cloud-explorer
115697 error There is likely additional logging output above.
115698 verbose exit [ 1, true ]

please help me to solve this issue

kindly provide me installation details of silex static website builder in step by step manner.

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Error msb4019 импортированный проект c microsoft cpp default props не обнаружен

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

After working through the «VCTargetPaths» registry value missing and MSBuild unable to «read it» I am now seeing the following error message when I go to build Apache QPID C++.

«error MSB4019: The imported project «C:Program Files (x86)MSBuildMicrosoft.CppV4.0Microsoft.Cpp.Default.props» was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.»

I can confirm that MSBuild does not exist in «Program Files(x86)» but does in «Program Files». The version in «Program Files» does not have a folder/directory named «Microsoft.CppV4.0». But «Microsoft.Cpp.Default.props» exists in only in «C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDEVCVCTargets».

I have repaired Visual Studio installs and have (unsuccessfully) tried to repair .NET.

Any help would be appreciated!

Answers

Sorry for late reply.

Your suggestion did highlight that there is an issue with the Windows QPID distribution of CMAKE which I have been working through on my own.

The basic issue remains. But perhaps it is rhetorical that I should expect or ask for a product that has been around as long as Visual Studio has been to have better installation and repair facilities.

It seems that product quality, especially stability of the platform, is something to be addressed in the next release. Without a strict mandate to use Visual Studio I would have likely approached this development in Eclipse looking to the support of the gcc community.

Are you following the instructions in the INSTALL-WINDOWS.txt file of Apache QPID C++? That file says it is for «Microsoft Visual Studio 2012 (VC11)». It will need some changes for Visual Studio Community 2017.

In particular, section 3 says you should run this command: cmake -G «Visual Studio 10» ..

I think you need to change that to «Visual Studio 15 2017» as described in Visual Studio 15 2017 — CMake 3.10.0-rc3 Documentation.

If you are instead using Visual Studio’s built-in support for CMake projects, then I don’t know how that works.

Welcome to MSDN forum.

>>After working through the «VCTargetPaths» registry value missing and MSBuild unable to «read it» I am now seeing the following error message when I go to build Apache QPID C++.

Have you make any changes to registry editor?

The location for Microsoft.Cpp.Default.props:

Visual studio 2015 : drive:Program Files (x86)MSBuildMicrosoft.Cpp (x86)v4.0v140

Visual studio 2017 : drive:Program Files (x86)Microsoft Visual StudioyeareditionCommon7IDEVCVCTargets

Contains the primary target files (.targets) and property files (.props) that are used by the targets. By default, the $(VCTargetsPath) macro references this directory.

>>I have repaired Visual Studio installs and have (unsuccessfully) tried to repair .NET.

You can use the tool to repair .net framework.

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.

Thanks for your comments but unfortunately your insights into as to where Microsoft.Cpp.Defaults.props should reside only further highlight my frustrations.

The main frustration is with having to manually update the registry. I, perhaps incorrectly, am making the assumption that insuring that registry values are properly setup is the the purview of an installer or of repairing an installation. Does that seem inappropriate or has configuring and/or repairing Visual Studio to work correctly devolved to manually making changes to items as fundamental as registry values?

As to the use of the .NET Framework repair tool I was remiss in not communicating that it was in fact through the use of that tool that I was unsuccessful at repairing the framework. In that regard I keep receiving a message to reinstall the .NET 4.5 framework and then the subsequent message that the framework is already installed and it all just may be «locked down» by policy.

I will attempt to manually up VCTargets to the location of Microsoft.Cpp.Defaults.props but I am not feeling confident that it will resolve issues.

I received the following error message as a result of manually updating the registry values and attempting to build.

«Microsoft.Cpp.Current.targets(64,5): error MSB4062: The «SetEnv» task could not be loaded from the assembly C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDEVCVCTargetsMicrosoft.Build.CppTasks.Common.dll. Could not load file or assembly ‘Microsoft.Build.Utilities.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.»

Thank you for the update.

What’s your original problem before you update registry? ( Making changes in registry editor is not recommended.)

Please try to repair or reinstall visual studio 2017 and then build your project, check it if the issue persists. After this, if the issue persists, upload the error message.

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.

  • Edited by Joyce Yin Microsoft contingent staff Tuesday, October 31, 2017 9:08 AM

Original problem was unable to compile C++ project (Apache QPID and Proton) kept receiving MSBuild errors regarding VCTarget. Per forum search results I updated registry values.

Background information. I had originally loaded Visual Studio Code but that seemed to be more of a hassle especially with MSBuild and the registry edits («hack») suggested. So I uninstalled everything that had to do with Visual Studio and reinstalled Visual Studio Community. 2017.

I have tried repairing Visual Studio Community a number of times along with uninstalling and reinstalling numerous times to no avail. The Fix .NET tool does not resolve this issue and sends log.

The error message which follows persists!

Anything else I should try?

Failed to run MSBuild command:

to get the value of VCTargetsPath:

Microsoft (R) Build Engine version 4.7.2053.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.

Источник

  • Remove From My Forums
  • Question

  • I use visual studio 2019 to open my example code, build the sample code failed, the below is message:

    What happened? 

    Error MSB4019
    The imported project «C:Program Files (x86)Microsoft Visual Studio2019Communityxxx» was not found.

    Confirm that the expression in the Import declaration «C:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuildMicrosoftVCv160\Microsoft.Cpp.Default.props» is correct, and that the file exists on disk.

    I really appreciate if someone could advise me on this issue.

    • Moved by

      Tuesday, March 31, 2020 8:44 AM

Answers

  • Hi gsegria,

    Thank you for feedback.

    Please check if your windows system is the latest version, if no, please update it. And then download and install

    Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 into your system.

    Look forward to your feedback.

    Best Regards,

    Dylan


    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

    • Marked as answer by
      gsegria
      Wednesday, April 1, 2020 4:57 PM

    • Edited by
      gsegria
      Wednesday, April 1, 2020 4:57 PM
    • Marked as answer by
      gsegria
      Wednesday, April 1, 2020 4:57 PM
  • Remove From My Forums
  • Question

  • I use visual studio 2019 to open my example code, build the sample code failed, the below is message:

    What happened? 

    Error MSB4019
    The imported project «C:Program Files (x86)Microsoft Visual Studio2019Communityxxx» was not found.

    Confirm that the expression in the Import declaration «C:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuildMicrosoftVCv160\Microsoft.Cpp.Default.props» is correct, and that the file exists on disk.

    I really appreciate if someone could advise me on this issue.

    • Moved by

      Tuesday, March 31, 2020 8:44 AM

Answers

  • Hi gsegria,

    Thank you for feedback.

    Please check if your windows system is the latest version, if no, please update it. And then download and install

    Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 into your system.

    Look forward to your feedback.

    Best Regards,

    Dylan


    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

    • Marked as answer by
      gsegria
      Wednesday, April 1, 2020 4:57 PM

    • Edited by
      gsegria
      Wednesday, April 1, 2020 4:57 PM
    • Marked as answer by
      gsegria
      Wednesday, April 1, 2020 4:57 PM

  • How to fix this error on your automated build?

MSBuild: error MSB4019: The imported project "C:Microsoft.Cpp.Default.props" was not found. Confirm that the path in the  declaration is correct, and that the file exists on disk.

This error appears usually when a project was created in a newer visual studio version than the one installed in your build machine  (using a different v… build tools). You can check your version by going into this path and looking for a v… folder:  C:Program Files (x86)MSBuildMicrosoft.Cppv4.0.

For example, if the projects requires V120 and your build machine has v110 installed, do the following in order to fix the build:

  1.  On your MSBuild command add property VCTargetsPath with the correct path: /p:Configuration=Release /p:Platform=Win32 /t:Rebuild  /property:VCTargetsPath="C:Program Files (x86)MSBuildMicrosoft.Cppv4.0v110"
  2.  Open your vcxporject and modify all of your PlatformToolset from v120 to v110:<PlatformToolset>v120</PlatformToolset> should be replaced with:  <PlatformToolset>v110</PlatformToolset>

Alternatively,  of course, you could install the correct Visual Studio version:

i.e.:

v110 (build tools) = require installation of Visual Studio 2012

v120 (build tools) = require installation of Visual Studio 2013

#c #build #msbuild #visual-studio-2019 #teamcity

Вопрос:

Я создаю нереальный проект с помощью TeamCity, и мой msbuild шаг завершается неудачей со следующей ошибкой:

 error MSB4019: The imported project "C:Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.  

У меня установлен VS 2019 и VCTargetsPath установлен на:

 C:Program Files (x86)MSBuildMicrosoft.Cppv4.0v140  

Я могу подтвердить, что файл действительно существует по ссылке выше.

Комментарии:

1. Найдите это в файле вашего проекта. Это может зависеть от переменной среды или чего-то, что вы не установили

2. Вам редко, если вообще когда-либо придется устанавливать VCTargetsPath вручную (хотя TeamCity может потребоваться параметр IIRC env.VisualStudioVersion); кроме того, этот путь указывает на что-то с v14.0, это не то, что обычно использует VS2019, верно? В любом случае проблема может заключаться в том, как вы вызываете msbuild в TeamCity. Какие настройки вы используете и какую сборку используете?

3. Бегун-это .NET с командой MSBuild, использующей кроссплатформенный MSBuild….. По-видимому, это частично решается перезапуском сервера сборки после установки переменной среды. Но теперь моя «Платформа «»Недействительна». Хотя я понятия не имею, как это устроено.

I am trying to build some projects with some msbuild and I get an msb4019 error saying stuff like «The imported project «C:Prog
ram Files (x86)MSBuildMicrosoft.Cppv4.0V120Microsoft.Cpp.Default.props» was not found».

All solutions I have seen mention changing some registry entries and environmental variables having to do with C:Program Files (x86)MSBuildMicrosoft.Cpp, however, this folder simply does not exist for me. I have visual studio professional 2017.

msbuild folder

asked Mar 25, 2019 at 13:43

mython paster's user avatar

6

I know it’s been a long time since anyone said anything, but if someone still finds this problem, as I did yesterday, I found the solution on this website.

As it turned out, the way to find the file Microsoft.Cpp.Default.props and the folder Microsoft.cpp was to look in this location:

drive:Program Files (x86)Microsoft Visual StudioyeareditionCommon7IDEVC
VCTargets

as opposed to the common location which is C:Program Files (x86)MSBuild and which didn’t contain the folder in my case.

In order to find the folder in that location I had to previously install Visual Studio 2017.

Then I created a system environment variable called VCTargetsPath and with the mentioned location as value.

That fixed the issue.

answered Apr 18, 2020 at 10:30

Marnau's user avatar

Make sure you have Visual C++ Windows Build Tools installed

answered Feb 3, 2020 at 12:05

Radu Ursache's user avatar

Понравилась статья? Поделить с друзьями:
  • Error msb4018 непредвиденная ошибка при выполнении задачи resolvepackageassets
  • Error msb4018 the vcmessage task failed unexpectedly
  • Error msb4018 the resolvepackageassets task failed unexpectedly
  • Error msb4018 the generatedepsfile task failed unexpectedly
  • Error msb3721 cuda