Sorry that the internal error is not printed well, but it must have been this: https://github.com/dotnet-websharper/core/blob/master/src/compiler/WebSharper.FSharp/Program.fs#L287

Can you paste your command line for wsfsc.exe? It must have got multiple project type flags somehow. Thanks a lot!

By on 2/12/2018 3:55 PM ()

I am not sure how to get hold of the command line. Here is the "Other Flags" entry of the Visual Studio project properties: --ws:"Bundle" --project:"D:\fsharp\projects\Strts.messedup\Creator\Creator.fsproj" --wsoutput:"D:\fsharp\projects\Strts.messedup\Creator" --wsoutput:"Content" --jsmap

And here is the complete error message with pointers to the Program.fs code. FSC: error : Global error 'Parsing argument failed: '--ws:Bundle' - Exception of type 'WebSharper.FSharp.Program+ArgumentError' was thrown.' at at WebSharper.FSharp.Program.compileMain@347.Invoke(String message) at WebSharper.FSharp.Program.compileMain$cont@245(String[] argv, Unit unitVar) at WebSharper.FSharp.Program.main(String[] argv)

By on 2/13/2018 12:47 AM ()

Hi, checking full command line in VS: Ctrl-Q "msbuild" then set project build output verbosity to Detailed.

The log will be long, but you can search for wsfsc.exe.

I am still not sure about what can cause this. Have you also tested with 4.2-beta? There are changes around command lines there, adding a new option to configure settings with a wsconfig.json. (A bugfix release is coming really soon, fixing debugging experience.)

By on 2/13/2018 5:19 AM ()

I have not tested 4.2 yet. Here is the wsfsc command line and output

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
1>	Task "Fsc"
1>		D:\fsharp\projects\Strts.messedup\packages\WebSharper.FSharp.4.1.6.207\build\..\tools\WsFsc.exe -o:obj\Debug\Creator.dll
1>-g
1>--debug:full
1>--noframework
1>--define:TRACE
1>--define:DEBUG
1>--define:CREATOR
1>--optimize-
1>--tailcalls-
1>-r:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\PublicAssemblies\FSharp.Core.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\WebSharper.UI.4.1.1.64\lib\net40\HtmlAgilityPack.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\MSTest.TestFramework.1.2.0\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\MSTest.TestFramework.1.2.0\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\mscorlib.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Core.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Numerics.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Web.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Xml.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Xml.Linq.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\WebSharper.4.1.1.175\lib\net40\WebSharper.Collections.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\WebSharper.4.1.1.175\lib\net40\WebSharper.Control.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\WebSharper.4.1.1.175\lib\net40\WebSharper.Core.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\WebSharper.4.1.1.175\lib\net40\WebSharper.Core.JavaScript.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\WebSharper.4.1.1.175\lib\net40\WebSharper.InterfaceGenerator.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\WebSharper.4.1.1.175\lib\net40\WebSharper.JavaScript.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\WebSharper.4.1.1.175\lib\net40\WebSharper.JQuery.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\WebSharper.4.1.1.175\lib\net40\WebSharper.Main.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\WebSharper.4.1.1.175\lib\net40\WebSharper.Sitelets.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\WebSharper.UI.4.1.1.64\lib\net40\WebSharper.UI.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\WebSharper.UI.4.1.1.64\lib\net40\WebSharper.UI.Templating.Common.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\WebSharper.UI.4.1.1.64\lib\net40\WebSharper.UI.Templating.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\WebSharper.UI.4.1.1.64\lib\net40\WebSharper.UI.Templating.Runtime.dll
1>-r:D:\fsharp\projects\Strts.messedup\packages\WebSharper.4.1.1.175\lib\net40\WebSharper.Web.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Collections.Concurrent.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Collections.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ComponentModel.Annotations.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ComponentModel.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ComponentModel.EventBasedAsync.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Diagnostics.Contracts.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Diagnostics.Debug.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Diagnostics.Tools.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Diagnostics.Tracing.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Dynamic.Runtime.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Globalization.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.IO.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Linq.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Linq.Expressions.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Linq.Parallel.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Linq.Queryable.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Net.NetworkInformation.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Net.Primitives.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Net.Requests.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Net.WebHeaderCollection.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ObjectModel.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Reflection.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Reflection.Emit.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Reflection.Emit.ILGeneration.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Reflection.Emit.Lightweight.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Reflection.Extensions.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Reflection.Primitives.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Resources.ResourceManager.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.Extensions.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.Handles.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.InteropServices.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.InteropServices.WindowsRuntime.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.Numerics.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.Serialization.Json.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.Serialization.Primitives.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.Serialization.Xml.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Security.Principal.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ServiceModel.Duplex.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ServiceModel.Http.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ServiceModel.NetTcp.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ServiceModel.Primitives.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.ServiceModel.Security.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Text.Encoding.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Text.Encoding.Extensions.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Text.RegularExpressions.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Threading.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Threading.Tasks.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Threading.Tasks.Parallel.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Threading.Timer.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Xml.ReaderWriter.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Xml.XDocument.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Xml.XmlSerializer.dll
1>--target:library
1>--warnaserror:76
1>--vserrors
1>--preferreduilang:en-US
1>--utf8output
1>--fullpaths
1>--flaterrors
1>--subsystemversion:6.00
1>--highentropyva+
1>--ws:Bundle
1>--project:D:\fsharp\projects\Strts.messedup\Creator\Creator.fsproj
1>--wsoutput:D:\fsharp\projects\Strts.messedup\Creator
1>--wsoutput:Content
1>--jsmap
1>--ws:Bundle
1>--project:D:\fsharp\projects\Strts.messedup\Creator\Creator.fsproj
1>--wsoutput:D:\fsharp\projects\Strts.messedup\Creator
1>--wsoutput:Content
1>--jsmap
1>--ws:Bundle
1>--project:D:\fsharp\projects\Strts.messedup\Creator\Creator.fsproj
1>--wsoutput:D:\fsharp\projects\Strts.messedup\Creator
1>--wsoutput:Content
1>--jsmap
1>AssemblyInfo.fs
1>Catalog.fs
1>Helpers.fs
1>Types.fs
1>Algorithms.fs
1>Cycle.fs
1>SolutionTree.fs
1>Tests.fs
1>Templates.fs
1>Editor.fs
1>Store.fs
1>Reviewer.fs
1>Main.fs
1>Global.asax.fs
1>C:\Users\Martin\AppData\Local\Temp\.NETFramework,Version=v4.6.1.AssemblyAttributes.fs
1>
1>FSC: error : Global error 'Parsing argument failed: '--ws:Bundle' - Exception of type 'WebSharper.FSharp.Program+ArgumentError' was thrown.' at    at WebSharper.FSharp.Program.compileMain@347.Invoke(String message)   at WebSharper.FSharp.Program.compileMain$cont@245(String[] argv, Unit unitVar)   at WebSharper.FSharp.Program.main(String[] argv)
1>		The command exited with code 1.
By on 2/13/2018 8:00 AM ()

Yes, I can see that there are multiple --ws:Bundle flags, and WebSharper 4.1 does not like this (although there is no strong reason, just to invalidate unexpected input).

My guess would be that there are multiple Import tags for WebSharp.FSharp.targets files in the project file, maybe old ones not cleaned up properly by a NuGet update. Can you make sure that there is only one? (Possibly by uninstalling WS packages, removing anything related from project file then reinstalling. Or convert to Paket and remove older NuGet references.)

By on 2/13/2018 9:40 AM ()

It seems that indeed I did not properly deinstall the old version, so that I had two import lines in the project file. But now, after deinstalling both versions and reinstalling 4.1.6, I have just a single import of the target file:

<Import Project="..\packages\WebSharper.FSharp.4.1.6.207\build\WebSharper.FSharp.targets" Condition="Exists('..\packages\WebSharper.FSharp.4.1.6.207\build\WebSharper.FSharp.targets')" />

but still the flags are twice (no longer three times!) in the command line (and also in the build flags field of the project properties in VS).

By on 2/14/2018 6:39 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper