错误MSB4036:找不到“WebSharperTask”任务

时间:2015-08-03 03:12:08

标签: compiler-errors f# visual-studio-2015 websharper

我在Windows 10下的Visual Studio 2015 Community Edition上安装了WebSharper extension,然后继续试用UI.Next单页应用程序项目模板。

使用F5构建它导致了下面,而我期待它“正常工作”。修复这样的错误的最佳方法是什么? (我对Windows编程很陌生。)

\\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.

完整构建日志:

------ 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.

更新WebSharper.targets文件确实有此dll参考:

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

引用的dll(上面)按预期存在于此目录下:\\psf\Home\Documents\Visual Studio 2015\Projects\UINextApplication1\packages\WebSharper.3.4.8.187\tools\net40

那个“\ psf”的东西可能是因为我使用Parallels 10在Mac上运行Windows。也许这就是罪魁祸首?

0 个答案:

没有答案