当前位置: 动力学知识库 > 问答 > 编程问答 >

f# - error MSB4036: The "WebSharperTask" task was not found

问题描述:

I installed the WebSharper extension on top of Visual Studio 2015 Community Edition under Windows 10 and proceeded to try out the UI.Next Single Page Application project template.

Building it using F5 leads to the below whereas I was expecting it to "just work". What is the best way to fix errors like this? (I'm pretty new to Windows programming).

\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\build\WebSharper.targets(57,5): error MSB4036: The "WebSharperTask" 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:\Program Files (x86)\MSBuild\14.0\bin" directory.

Full build log:

------ Build started: Project: UINextApplication1, Configuration: Debug Any CPU ------

C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\fsc.exe -o:obj\Debug\UINextApplication1.dll -g --debug:full --noframework --define:DEBUG --define:TRACE --optimize- --tailcalls- -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.1.0\FSharp.Core.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\lib\net40\IntelliFactory.Xml.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Numerics.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\lib\net40\WebSharper.Collections.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\lib\net40\WebSharper.Control.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\lib\net40\WebSharper.Core.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\lib\net40\WebSharper.Core.JavaScript.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\lib\net40\WebSharper.Html.Client.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\lib\net40\WebSharper.Html.Server.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\lib\net40\WebSharper.InterfaceGenerator.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\lib\net40\WebSharper.JavaScript.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\lib\net40\WebSharper.JQuery.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\lib\net40\WebSharper.Main.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\lib\net40\WebSharper.Sitelets.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\lib\net40\WebSharper.Testing.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.UI.Next.3.4.8.156\lib\net40\WebSharper.UI.Next.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.UI.Next.3.4.8.156\lib\net40\WebSharper.UI.Next.Templating.dll" -r:"\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\lib\net40\WebSharper.Web.dll" --target:library --warn:3 --warnaserror:76 --vserrors --validate-type-providers --LCID:1033 --utf8output --fullpaths --flaterrors --highentropyva- --sqmsessionguid:9ea02008-985a-4196-a958-a795db92a481 "C:\Users\srid\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.fs" Client.fs Global.asax.fs

\\psf\home\documents\visual studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\build\WebSharper.targets(57,5): error MSB4036: The "WebSharperTask" 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:\Program Files (x86)\MSBuild\14.0\bin" directory.

Done building project "UINextApplication1.fsproj" -- FAILED.

Update: The WebSharper.targets file does have this dll reference:

<WebSharperTaskAssembly Condition=" '$(WebSharperTaskAssembly)' == '' ">$(MSBuildThisFileDirectory)/../tools/net40/WebSharper.MSBuild.dll</WebSharperTaskAssembly>

And the referenced dll (above) exists under this directory as expected: \\psf\Home\Documents\Visual Studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\tools\net40.

That "\psf" thing may be due me running Windows on Mac using Parallels 10. Maybe that is the culprit?

分享给朋友:
您可能感兴趣的文章:
随机阅读: