[英]Trying to clean specflow BDD test error: Test assembly not found. Please build the project to enable the SpecFlow Visual Studio Extension features
[英]Build error in visual studio “Error 102: The ”___“ task was not found.”
我正在使用Visual Studio,但在構建項目時遇到問題。 我不確定該如何解決。
我收到此錯誤:
Error 289 The "CreateProjectReferenceDefineConstants" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" directory. C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets 1279 6 ProcedureManagerSetup
我雙擊此錯誤,這將導致我進入這段代碼:
<Target
Name="AddProjectReferenceDefineConstants"
Condition=" '@(_ResolvedProjectReferencePaths)' != '' ">
<CreateProjectReferenceDefineConstants
ProjectReferencePaths="@(_ResolvedProjectReferencePaths)"
ProjectConfigurations="$(VSProjectConfigurations)">
<Output TaskParameter="DefineConstants" PropertyName="ProjectReferenceDefineConstants" />
</CreateProjectReferenceDefineConstants>
</Target>
它專門指向以下行:
<CreateProjectReferenceDefineConstants
自從我的Windows 10更新以來,這種情況就發生了。 我注意到,雖然以前使用的是.NET 3.5。 更新后,它更改為.NET 4.0。 我不確定這是否是造成這種情況的主要原因,但值得一提。
這解決了我的問題:
您添加跟隨鍵您的注冊表。
打開regedit(您在“運行”收件箱中編寫了regedit)
並且您找到HKEY_LOCAL_MACHINE \\ SYSTEM \\ CurrentControlSet \\ Services \\ EventLog \\ Application文件夾
然后添加新文件夾。
您的新文件夾名稱:“ HKEY_LOCAL_MACHINE \\ SYSTEM \\ CurrentControlSet \\ Services \\ EventLog \\ Application \\ ASP.NET 4.0.30319”
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.