GVKun编程网logo

npm install -g karma错误MSB4019:找不到导入的项目“ C: Microsoft.Cpp.Default.props”

4

这篇文章主要围绕npminstall-gkarma错误MSB4019:找不到导入的项目“C:Microsoft.Cpp.Default.props”展开,旨在为您提供一份详细的参考资料。我们将全面介绍

这篇文章主要围绕npm install -g karma错误MSB4019:找不到导入的项目“ C: Microsoft.Cpp.Default.props”展开,旨在为您提供一份详细的参考资料。我们将全面介绍npm install -g karma错误MSB4019:找不到导入的项目“ C: Microsoft.Cpp.Default.props”,同时也会为您带来.NET错误:找不到依赖关系“Microsoft.Office.Interop.Excel”、AutoDesk产品,Maya 2018 安装,Microsoft Visual C++ 2012 安装失败,结果 = -2147024546,安装Microsoft Visual C++ 20...、c# – Microsoft语音识别setInputToDefaultAudioDevice抛出异常、C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32 .Targets(147,5): error MSB6006:的实用方法。

本文目录一览:

npm install -g karma错误MSB4019:找不到导入的项目“ C: Microsoft.Cpp.Default.props”

npm install -g karma错误MSB4019:找不到导入的项目“ C: Microsoft.Cpp.Default.props”

我一直在研究AngularJS并遵循其安装步骤,但是运行步骤1时出现错误:

npm install -g karma

这是完整的输出:

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:\Users\Travis>node --version
v0.10.18

C:\Users\Travis>python --version
Python 2.7.3

C:\Users\Travis>npm install -g karma
npm http GET https://registry.npmjs.org/karma
npm http 304 https://registry.npmjs.org/karma
npm http GET https://registry.npmjs.org/di
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/chokidar
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/http-proxy
npm http GET https://registry.npmjs.org/colors/0.6.0-1
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/useragent
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/log4js
npm http GET https://registry.npmjs.org/q
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/connect
npm http GET https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/di
npm http 304 https://registry.npmjs.org/chokidar
npm http 304 https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/colors/0.6.0-1
npm http 304 https://registry.npmjs.org/http-proxy
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/useragent
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/log4js
npm http 304 https://registry.npmjs.org/q
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/connect
npm http 304 https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/socket.io-client/0.9.16
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/base64id/0.1.0
npm http GET https://registry.npmjs.org/redis/0.7.3
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/base64id/0.1.0
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/redis/0.7.3
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.16
npm http GET https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/utile
npm http GET https://registry.npmjs.org/qs/0.6.5
npm http GET https://registry.npmjs.org/cookie-signature/1.0.1
npm http GET https://registry.npmjs.org/formidable/1.0.14
npm http GET https://registry.npmjs.org/cookie/0.1.0
npm http GET https://registry.npmjs.org/buffer-crc32/0.2.1
npm http GET https://registry.npmjs.org/send/0.1.4
npm http GET https://registry.npmjs.org/bytes/0.2.0
npm http GET https://registry.npmjs.org/fresh/0.2.0
npm http GET https://registry.npmjs.org/pause/0.0.1
npm http GET https://registry.npmjs.org/uid2/0.0.2
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/methods/0.0.1
npm http 304 https://registry.npmjs.org/pkginfo
npm http 304 https://registry.npmjs.org/utile
npm http 304 https://registry.npmjs.org/qs/0.6.5
npm http 304 https://registry.npmjs.org/cookie/0.1.0
npm http 304 https://registry.npmjs.org/cookie-signature/1.0.1
npm http 304 https://registry.npmjs.org/buffer-crc32/0.2.1
npm http 304 https://registry.npmjs.org/send/0.1.4
npm http 304 https://registry.npmjs.org/bytes/0.2.0
npm http 304 https://registry.npmjs.org/fresh/0.2.0
npm http 304 https://registry.npmjs.org/pause/0.0.1
npm http 304 https://registry.npmjs.org/formidable/1.0.14
npm http 304 https://registry.npmjs.org/uid2/0.0.2
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/methods/0.0.1
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http GET https://registry.npmjs.org/i
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/deep-equal
npm http GET https://registry.npmjs.org/ncp
npm http GET https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/range-parser/0.0.4
npm http 304 https://registry.npmjs.org/deep-equal
npm http 304 https://registry.npmjs.org/ncp
npm http 304 https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/dequeue/1.0.3
npm http GET https://registry.npmjs.org/async/0.1.15
npm http GET https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/i
npm http GET https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/dequeue/1.0.3
npm http 304 https://registry.npmjs.org/async/0.1.15
npm http 304 https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/zeparser/0.0.5
npm http 304 https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/tinycolor

> ws@0.4.30 install C:\Users\Travis\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io
-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)


C:\Users\Travis\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules
\ws>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js"
rebuild
Building the projects in this solution one at a time. To enable parallel build,please add the "/m" switch.
C:\Users\Travis\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_module
s\ws\build\bufferutil.vcxproj(18,3): 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.
C:\Users\Travis\AppData\Roaming\npm\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_module
s\ws\build\validation.vcxproj(18,and that the file exists on disk.
C:\Users\Travis\AppData\Roaming\npm\karma -> C:\Users\Travis\AppData\Roaming\npm\node_modules\karma\bin\karma
karma@0.10.2 C:\Users\Travis\AppData\Roaming\npm\node_modules\karma
├── di@0.0.1
├── rimraf@2.1.4
├── colors@0.6.0-1
├── graceful-fs@1.2.3
├── mime@1.2.11
├── chokidar@0.6.3
├── q@0.9.7
├── coffee-script@1.6.3
├── minimatch@0.2.12 (sigmund@1.0.0,lru-cache@2.3.1)
├── glob@3.1.21 (inherits@1.0.0)
├── optimist@0.3.7 (wordwrap@0.0.2)
├── lodash@1.1.1
├── useragent@2.0.7 (lru-cache@2.2.4)
├── connect@2.8.8 (methods@0.0.1,uid2@0.0.2,cookie-signature@1.0.1,pause@0.0.1,fresh@0.2.0,bytes@0.2.0,qs@0.6.5,b
uffer-crc32@0.2.1,cookie@0.1.0,debug@0.7.2,formidable@1.0.14,send@0.1.4)
├── http-proxy@0.10.3 (pkginfo@0.2.3,utile@0.1.7)
├── log4js@0.6.8 (dequeue@1.0.3,semver@1.1.4,async@0.1.15,readable-stream@1.0.17)
└── socket.io@0.9.16 (base64id@0.1.0,policyfile@0.0.4,redis@0.7.3,socket.io-client@0.9.16)

听起来好像正在运行的MSBuild版本(我相信是12.0)无法正确解析文件中的$(VCTargetsPath)变量vcxproj

.NET错误:找不到依赖关系“Microsoft.Office.Interop.Excel”

.NET错误:找不到依赖关系“Microsoft.Office.Interop.Excel”

我的同事写了一个驱动Excel的DLL.
当我在我的.NET应用程序中引用他的DLL时,我得到一个警告:
The dependency 'Microsoft.Office.Interop.Excel' Could not be found.

我的应用程序将编译.
但是,当我使用我的同事的DLL来访问Excel时,会抛出异常,并显示上面的消息.

我们应该有相同的设置:Windows XP Pro SP3,VS2003,.NET 1.1,Office 2003

我的问题似乎与this question类似,但我不知道是否一样.

任何帮助或建议感激不尽!

更新:

感谢您的答复!

我没有添加对Microsoft.Office.Interop.Excel的显式引用.
当然我不应该这样吗?
但是:当我尝试添加此引用时,我在添加引用对话框中找不到Microsoft.Office.Interop.Excel.

大概这意味着我缺少一个DLL?
…但我不明白怎么会发生?

更新(固定):

@ConcernedOfTunbridgeWells有解决这个问题的答案:安装主要互操作程序集.

您可能需要安装 Primary Interop Assemblies for Office,可以从 Here.下载.根据您安装Visual Studio和Office的顺序,默认情况下可能不会安装它们.

AutoDesk产品,Maya 2018 安装,Microsoft Visual C++ 2012 安装失败,结果 = -2147024546,安装Microsoft Visual C++ 20...

AutoDesk产品,Maya 2018 安装,Microsoft Visual C++ 2012 安装失败,结果 = -2147024546,安装Microsoft Visual C++ 20...

今日老弟装Maya 2018出现问题,我帮忙解决了一下问题,过程颇为曲折,记录一下,看能否帮到有类似困惑的朋友。

我和老弟的电脑牌子一样,就现在自己电脑上装了,竟然开始和他的错误是一样的!都是Microsoft Visual C++ 2012 安装失败,结果 = -2147024546,应该是以前装的没卸载干净。

首先我去下载了个叫做 AutoDesk官方卸载工具的鬼软件,但是删不干净。

然后我就下载了一个叫Windows Installer Clean Up的软件继续卸载Microsoft Visual C++ 2012 Redistributable(X86),最后发现删掉以后重装装不了。我查Autodesk官方帮助文档才发现原来每个软件其实都带有VS C++运行库,像Maya 2018 开始安装的一个组件好像就是VC运行库,比如VC 2012就在安装文件目录:\Maya 2018\Autodesk_Maya_2018_EN_JP_ZH_Win_64bit_dlm\3rdParty\x86\VCRedist\2012UPD4  里面。

 

 

 

问题是VC 2012现在卸也卸不了,装也装不上,maya安装第一步就死掉了。

那么现在的问题就是要先解决像Microsoft Visual C++ 2012 Redistributable(X86)这样的运行库的安装。

期间查网上好多资料都不管用,什么修改组策略,删注册表的。我感觉问题就在注册表,可是也不太懂,而且注册表千千万条根本不能一条一条删。试了好多软件都没用,后来在微软人员的博客里面看到了subinacl这个小工具,我就按着他的步骤搞了那个reset.cmd试了一下,运行了好长时间。最后发现VC运行库试能卸载了,但是装不上,错误就是0x80070005访问拒绝,(之前是什么错误忘了>_<.) 继续折腾了好久还是没解决,但我隐约觉得应该不是什么大问题了,因为博客说了subinacl.exe 对解决0x80070005很有帮助。我觉得这就是个访问权限的问题,但是我一直不明白为什么怎么就没权限了,我这账户是管理员啊!

实在没辙了,这个博客https://www.cnblogs.com/xiongjiajia/p/10173269.html有看上去能解决问题的软件,下载后发现是收费的,但一看19块用20天,也还行,人家搞这个也不容易。主要是老弟要用。。。

然后我选的修复,没有深度请理,深度可能效果更好。修复完再装VC2012运行库,发现有说什么类似没权限,然后是大括号里面一大串,应该是注册表某个选项。然后结合那个软件的教程,直接定位到HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components,我直接在Installer层右键权限里面让我的账户获得完全控制。后来再安装就一路顺丰了。。。

所以,我在想是不是之前我要是直接在注册表这里获得权限就不需要买软件直接就能用了?但毕竟自己并不是专业搞计算机的,也不太明白。希望能有朋友解惑!

最后,把我的密钥分享给有用的人吧(10月10号注册的,应该能用到月底。其实也感谢软件作者最后帮了我大忙,付点钱也是可以接受的。):

【y59xaArzyha8oXXzo6ymA5XahzhbAJmo##】
此密钥仅可适用于8.8.79
20天使用权期限,不限制台数/次数

 

参考链接

【1】.https://knowledge.autodesk.com/zh-hans/search-result/caas/sfdcarticles/sfdcarticles/CHS/Error-Microsoft-Visual-C-2012-install-failed-Result-2147024546.html

【2】.https://blogs.msdn.microsoft.com/astebner/2006/09/04/solving-setup-errors-by-using-the-subinacl-tool-to-repair-file-and-registry-permissions/

【3】.https://knowledge.autodesk.com/zh-hans/search-result/caas/sfdcarticles/sfdcarticles/CHS/How-to-reinstall-Microsoft-Visual-C-Runtime-Libraries-from-Autodesk-software-installation-package.html

【4】.https://knowledge.autodesk.com/zh-hans/search-result/caas/sfdcarticles/sfdcarticles/CHS/How-to-remove-and-reinstall-Microsoft-Visual-C-Runtime-Libraries.html

【5】.https://zhuanlan.zhihu.com/p/83573733

 

c# – Microsoft语音识别setInputToDefaultAudioDevice抛出异常

c# – Microsoft语音识别setInputToDefaultAudioDevice抛出异常

你好,我在MS语音识别方面遇到了麻烦.

我的代码很简单.

static void init()
    {
        string enUsEngine = string.Empty;


        foreach (RecognizerInfo ri in SpeechRecognitionEngine.InstalledRecognizers())
        {
            Console.WriteLine(ri.Culture);
            if (ri.Culture.Name.Equals("en-US") == true)
            {
                enUsEngine = ri.Id;
            }
        }

        SpeechRecognitionEngine recogEngine = new SpeechRecognitionEngine(enUsEngine);

        Grammar grammar = new Grammar("grammar.xml");
        recogEngine.LoadGrammar(grammar);

        recogEngine.SpeechRecognized += recogEngine_SpeechRecognized;
        recogEngine.RecognizeCompleted += recogEngine_RecognizeCompleted;

        recogEngine.SetInputToDefaultAudioDevice();

        recogEngine.RecognizeAsync(RecognizeMode.Multiple);

    }

然后在调用中抛出InvalidOperationException

(system.invalidOperationException: Cannot find the requested data
item,such as a data key or value.)

SetInputToDefaultAudioDevice();方法

我下载了Msspeech sdk并安装了它(Microsoft.speech.dll).
还下载了语言包. (en-us,ko-kr)

还在控制面板中安装并启用了我的麦克风驱动程序.

请帮我.

我的操作系统是Windows 10是使用语音识别API的问题吗?

解决方法

@H_301_36@ 很可能你使用的是Microsoft.Speech.Recognition,你应该使用System.Speech.Recognition.

改变这个:

using Microsoft.Speech.Recognition;

对此:

using System.Speech.Recognition;

您可以保留其余代码.

瓦?那么这里有一些答案:
What is the difference between System.Speech.Recognition and Microsoft.Speech.Recognition?

简而言之,Microsoft.Speech.Recognition适用于服务器,可以在呼叫中心(用于自动化等)中使用低质量音频,这意味着它与所有音频输入设备不兼容.

相反,System.Speech.Recognition适用于桌面应用程序,它完全支持Windows上安装的默认录制设备.

C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32 .Targets(147,5): error MSB6006:

C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32 .Targets(147,5): error MSB6006:

node-gyp  build 报错

C:\Users\Administrator\Desktop\testc>node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@3.4.0
gyp info using node@4.4.2 | win32 | ia32
gyp info spawn C:\windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
gyp info spawn args [ ''build/binding.sln'',
gyp info spawn args   ''/clp:Verbosity=minimal'',
gyp info spawn args   ''/nologo'',
gyp info spawn args   ''/p:Configuration=Release;Platform=Win32'' ]
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
  TRACKER :
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32
.Targets(147,5): error MSB6006: “CL.exe”已退出,代码为 5。 [C:\Users\Administr
ator\Desk
top\testc\build\hello.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\Administrator\AppData\Roamin
g\npm\node_modules\node-gyp\lib\build.js:276: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 Files\\nodejs\\node.exe" "C:\\Users\\Administrator
\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build"
gyp ERR! cwd C:\Users\Administrator\Desktop\testc
gyp ERR! node -v v4.4.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok

找来找去,没有运行出来
http://snoopyxdy.blog.163.com/blog/static/601174402012102391344617/

我运行到 node-gyp build 时就报这个错误,群里没人解决,来这里请教下大神,谢谢!!

今天的关于npm install -g karma错误MSB4019:找不到导入的项目“ C: Microsoft.Cpp.Default.props”的分享已经结束,谢谢您的关注,如果想了解更多关于.NET错误:找不到依赖关系“Microsoft.Office.Interop.Excel”、AutoDesk产品,Maya 2018 安装,Microsoft Visual C++ 2012 安装失败,结果 = -2147024546,安装Microsoft Visual C++ 20...、c# – Microsoft语音识别setInputToDefaultAudioDevice抛出异常、C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32 .Targets(147,5): error MSB6006:的相关知识,请在本站进行查询。

本文标签: