All of sudden Specflow generator is throwing exception with Visual studio 2015.I have not upgraded any new package of Visual Studio or Specflow - specflow

I am using Visual Studio 2015 and Specflow 2017.1..12. I have been using this combination for more than 2 years. Everything was fine until January 2018.
We did not develop any new test in February 2018. As we did not get time to work on automation. I started working on new tests since last week and updating existing tests. When I modified existing specflow feature file and save it, the feature.cs file is not getting generated. It is throwing a generator exception.
I am not sure why we are getting this exception all of sudden. We did not upgrade any Visual Studio or Specflow plugin for more than 1 year.
I have been searching online for a solution, but I could find any answer. Please help!
This is the generator exception:
#error TechTalk.SpecFlow.Generator.Interfaces.TestGenerationError
#error TechTalk.SpecFlow.Generator
#error Server stack trace:
#error at TechTalk.SpecFlow.Generator.Plugins.GeneratorPluginLoader.LoadPlugin(PluginDescriptor pluginDescriptor)
#error at TechTalk.SpecFlow.Generator.GeneratorContainerBuilder.<>c__DisplayClass3.<LoadPlugins>b__1(PluginDescriptor pd)
#error at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
#error at System.Linq.Enumerable.<ConcatIterator>d__58`1.MoveNext()
#error at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
#error at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
#error at TechTalk.SpecFlow.Generator.GeneratorContainerBuilder.LoadPlugins(ObjectContainer container, IGeneratorConfigurationProvider configurationProvider, SpecFlowConfigurationHolder configurationHolder)
#error at TechTalk.SpecFlow.Generator.GeneratorContainerBuilder.CreateContainer(SpecFlowConfigurationHolder configurationHolder, ProjectSettings projectSettings)
#error at TechTalk.SpecFlow.Generator.TestGeneratorFactory.CreateGenerator(ProjectSettings projectSettings)
#error at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
#error at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
#error Exception rethrown at [0]:
#error at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
#error at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
#error at TechTalk.SpecFlow.Generator.Interfaces.ITestGeneratorFactory.CreateGenerator(ProjectSettings projectSettings)
#error at TechTalk.SpecFlow.IdeIntegration.Generator.RemoteAppDomainTestGeneratorFactory.CreateGenerator(ProjectSettings projectSettings)
#error at TechTalk.SpecFlow.IdeIntegration.Generator.GeneratorServices.CreateTestGenerator()
#error at TechTalk.SpecFlow.IdeIntegration.Generator.IdeSingleFileGenerator.GenerateCode(String inputFilePath, String inputFileContent, GeneratorServices generatorServices, ProjectSettings projectSettings)
#error at TechTalk.SpecFlow.IdeIntegration.Generator.IdeSingleFileGenerator.Generate(String inputFilePath, String inputFileContent, GeneratorServices generatorServices, CodeDomHelper codeDomHelper, ProjectSettings projectSettings)

Related

Visual Studio 2017 Error initializing VroomJs.JsEngine

My project uses Reactjs, and I use Visual Studio 2017. Recently I did an software update on VS 2017, but no code/config changes.
However, when I start my project locally in debug mode, I encountered below error:
No JavaScript engines were registered, falling back to a default config! It is recommended that you configure JavaScriptEngineSwitcher in your app. See https://github.com/Taritsyn/JavaScriptEngineSwitcher/wiki/Registration-of-JS-engines for more information.
Error initialising JavaScriptEngineSwitcher.V8.V8JsEngineFactory: JavaScriptEngineSwitcher.Core.JsEngineLoadException: During loading of V8JsEngine error has occurred.
See more details:
Cannot load V8 interface assembly. Load failure information for v8-ia32.dll:
C:\Users\user1\AppData\Local\Temp\Temporary ASP.NET Files\vs\77655ce5\ca0bb6d0\assembly\dl3\300b733a\003cadac_c3f4d201\v8-ia32.dll: The specified module could not be found
C:\Code\project1\branches\apps\src\DotNet\COMP.project1.Web\v8-ia32.dll: The specified module could not be found
C:\Code\project1\branches\apps\src\DotNet\COMP.project1.Web\bin\v8-ia32.dll: The specified module could not be found ---> System.TypeLoadException: Cannot load V8 interface assembly. Load failure information for v8-ia32.dll:
C:\Users\user1\AppData\Local\Temp\Temporary ASP.NET Files\vs\77655ce5\ca0bb6d0\assembly\dl3\300b733a\003cadac_c3f4d201\v8-ia32.dll: The specified module could not be found
C:\Code\project1\branches\apps\src\DotNet\COMP.project1.Web\v8-ia32.dll: The specified module could not be found
C:\Code\project1\branches\apps\src\DotNet\COMP.project1.Web\bin\v8-ia32.dll: The specified module could not be found
at Microsoft.ClearScript.V8.V8Proxy.LoadNativeLibrary()
at Microsoft.ClearScript.V8.V8Proxy.LoadAssembly()
at Microsoft.ClearScript.V8.V8Proxy.GetAssembly()
at Microsoft.ClearScript.V8.V8Proxy.GetImplType(Type type)
at Microsoft.ClearScript.V8.V8Proxy.CreateImpl[T](Object[] args)
at Microsoft.ClearScript.V8.V8IsolateProxy.Create(String name, V8RuntimeConstraints constraints, Boolean enableDebugging, Int32 debugPort)
at Microsoft.ClearScript.V8.V8Runtime..ctor(String name, V8RuntimeConstraints constraints, V8RuntimeFlags flags, Int32 debugPort)
at Microsoft.ClearScript.V8.V8ScriptEngine..ctor(V8Runtime runtime, String name, V8RuntimeConstraints constraints, V8ScriptEngineFlags flags, Int32 debugPort)
at JavaScriptEngineSwitcher.V8.V8JsEngine..ctor(V8Settings settings)
--- End of inner exception stack trace ---
at JavaScriptEngineSwitcher.V8.V8JsEngine..ctor(V8Settings settings)
at JavaScriptEngineSwitcher.V8.V8JsEngineFactory.CreateEngine()
at React.JavaScriptEngineFactory.GetFactory(JsEngineSwitcher jsEngineSwitcher, Boolean allowMsie)
Error initialising React.VroomJsEngine+Factory: JavaScriptEngineSwitcher.Core.JsEngineLoadException: During loading of VroomJs JavaScript engine error has occurred.
See more details:
The type initializer for 'VroomJs.JsEngine' threw an exception. ---> System.TypeInitializationException: The type initializer for 'VroomJs.JsEngine' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'VroomJsNative': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at VroomJs.JsEngine.js_set_object_marshal_type(JsObjectMarshalType objectMarshalType)
at VroomJs.JsEngine..cctor()
--- End of inner exception stack trace ---
at VroomJs.JsEngine..ctor(Int32 maxYoungSpace, Int32 maxOldSpace)
at React.VroomJsEngine.<>c.<.cctor>b__23_0()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at React.VroomJsEngine.get_Engine()
at React.VroomJsEngine..ctor()
--- End of inner exception stack trace ---
at React.VroomJsEngine..ctor()
at React.VroomJsEngine.Factory.CreateEngine()
at React.JavaScriptEngineFactory.GetFactory(JsEngineSwitcher jsEngineSwitcher, Boolean allowMsie)
This error does not block me from running and testing the code.
Like I said, all I did recently was to update the VS 2017 software...I tried to do a wild search in the project for 'v8-ia32' but nothing found.
To fix these errors I did the following:
Make sure you install the JavaScriptEngineSwitcher.V8, JavaScriptEngineSwitcher.V8.Native.win-x86 and JavaScriptEngineSwitcher.V8.Native.win-x64.
(I didn't install JavaScriptEngineSwitcher.V8.Native.win-x86)
According to https://reactjs.net/getting-started/aspnet.html
edit the ReactConfig.cs, basically, I just added this
JsEngineSwitcher.Current.DefaultEngineName = V8JsEngine.EngineName;
JsEngineSwitcher.Current.EngineFactories.AddV8();
Rebuild the project.

Visual Studio for Mac: Guid should contain 32 digits with 4 dashes (xxxx...)

I'm a noob for Visual Studio for Mac. My intention was to check out Xamarin development. My Visual Studio version is 7.3 (Build 799) Community Edition, I've installed on a MB Pro 2015 Mid model.
When I try to create a project in following way,
Multiplatform
App
Games (iOS, Mac)
SpriteKit Game (2D)
And then proceeded with the steps until pressing the create button giving project name and all it just gives me the following Alert and I cannot create the project.
Updated:
I found following Log by going to "Open Log Directory" menu item.
ERROR [2017-12-14 00:46:07Z]: The project could not be created
System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
at System.Guid+GuidResult.SetFailure (System.Guid+ParseFailureKind failure, System.String failureMessageID, System.Object failureMessageFormatArgument, System.String failureArgumentName, System.Exception innerException) [0x00034] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:200
at System.Guid+GuidResult.SetFailure (System.Guid+ParseFailureKind failure, System.String failureMessageID) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:184
at System.Guid.TryParseGuidWithNoStyle (System.String guidString, System.Guid+GuidResult& result) [0x0000e] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:611
at System.Guid.TryParseGuid (System.String g, System.Guid+GuidStyles flags, System.Guid+GuidResult& result) [0x000f8] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:451
at System.Guid..ctor (System.String g) [0x00029] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/guid.cs:244
at Xamarin.AndroidDesigner.MonoDevelop.AndroidDesignerInitializer+<>c.<SupportsObject>b__1_0 (System.String g) [0x00000] in /Users/vsts/agent/2.126.0/work/3/s/Xamarin.Designer.Android/Xamarin.AndroidDesigner.MonoDevelop/AndroidDesignerInitializer.cs:23
at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/AnyAll.cs:38
at Xamarin.AndroidDesigner.MonoDevelop.AndroidDesignerInitializer.SupportsObject (MonoDevelop.Projects.WorkspaceObject item) [0x00014] in /Users/vsts/agent/2.126.0/work/3/s/Xamarin.Designer.Android/Xamarin.AndroidDesigner.MonoDevelop/AndroidDesignerInitializer.cs:23
at MonoDevelop.Projects.WorkspaceObject.InitializeExtensionChain () [0x00091] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceObject.cs:382
at MonoDevelop.Projects.WorkspaceObject.EnsureInitialized () [0x00021] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceObject.cs:74
at MonoDevelop.Projects.MSBuild.MSBuildProjectService.CreateProject (System.String typeGuid, MonoDevelop.Projects.ProjectCreateInformation info, System.Xml.XmlElement projectOptions, System.String[] flavorGuids) [0x00046] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildProjectService.cs:526
at MonoDevelop.Projects.ProjectService.CreateProject (System.String typeAlias, MonoDevelop.Projects.ProjectCreateInformation info, System.Xml.XmlElement projectOptions, System.String[] flavorGuids) [0x00000] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs:341
at MonoDevelop.Ide.Templates.ProjectDescriptor.CreateItem (MonoDevelop.Projects.ProjectCreateInformation projectCreateInformation, System.String defaultLanguage) [0x0012b] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectDescriptor.cs:140
at MonoDevelop.Ide.Templates.SolutionDescriptor.CreateEntry (MonoDevelop.Projects.ProjectCreateInformation projectCreateInformation, System.String defaultLanguage) [0x001e9] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SolutionDescriptor.cs:161
at MonoDevelop.Ide.Templates.ProjectTemplate.CreateWorkspaceItem (MonoDevelop.Projects.ProjectCreateInformation cInfo) [0x00000] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplate.cs:311
at MonoDevelop.Ide.Templates.ProjectTemplatingProvider.ProcessTemplate (MonoDevelop.Ide.Templates.DefaultSolutionTemplate template, MonoDevelop.Ide.Projects.NewProjectConfiguration config, MonoDevelop.Projects.SolutionFolder parentFolder) [0x0000e] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplatingProvider.cs:67
at MonoDevelop.Ide.Templates.ProjectTemplatingProvider.ProcessTemplate (MonoDevelop.Ide.Templates.SolutionTemplate template, MonoDevelop.Ide.Projects.NewProjectConfiguration config, MonoDevelop.Projects.SolutionFolder parentFolder) [0x00000] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplatingProvider.cs:58
at MonoDevelop.Ide.Templates.TemplatingService+<ProcessTemplate>d__13.MoveNext () [0x00024] in /Users/builder/data/lanes/5402/df590420/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/TemplatingService.cs:150
Has anybody out there encountered this kind of an issue? Any solutions or workarounds you already have worked out?
So the problem seems to be that if one of the project types used by the project template is unsupported then an unknown project type is created with an empty flavor guid. This then causes an exception in the Android designer.
In this case the Xamarin.iOS project type was considered to be unsupported since Xamarin.iOS was not installed.
This seems to be a bug in Visual Studio for Mac. Either the project template should not attempt to create a Xamarin.iOS project if it is not supported, or the unknown project should be created with no flavor guids instead of using an empty string.

Error 500 while running a Fluent NHibernate Project with Visual Studio 2015 for Mac

So, I'm trying to run an ASP.NET MVC 5 with NHibernate and FluentNHibernate targeting SQL Server 2012 with Visual Studio 2015 for Mac and XSP Webserver, and it fails with the exception below. I'm using .NET Framework 4.5 and packages are updated to the very last version.
System.ArgumentNullException
Value cannot be null.
Parameter name: type
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Core.
Exception stack trace:
at System.Dynamic.Utils.ContractUtils.RequiresNotNull (System.Object value, System.String paramName) [0x00003] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/external/corefx/src/Common/src/System/Dynamic/Utils/ContractUtils.cs:67
at System.Linq.Expressions.Expression.Convert (System.Linq.Expressions.Expression expression, System.Type type, System.Reflection.MethodInfo method) [0x0000b] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/UnaryExpression.cs:780
at System.Linq.Expressions.Expression.Convert (System.Linq.Expressions.Expression expression, System.Type type) [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/UnaryExpression.cs:763
at NHibernate.Util.DelegateHelper.BuildPropertySetter[T] (System.Type type, System.String propertyName) [0x00015] in <1c5d1dfd6b734554b068885679d8b49d>:0
at NHibernate.AdoNet.SqlClientSqlCommandSet..cctor () [0x00019] in <1c5d1dfd6b734554b068885679d8b49d>:0
Maybe this is a NHibernate or FluentNHibernate bug?
I think I've found a solution. Because of a bug or something, we need to configure the database with a batch size of zero to avoid this exception:
return Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2012.ConnectionString(
x => x.FromConnectionStringWithKey("ConexaoBanco")).ShowSql())
.Mappings(m =>
m.FluentMappings.AddFromAssemblyOf<HomeController>())
.ExposeConfiguration(cfg => cfg.SetProperty("adonet.batch_size", "0"))
.BuildSessionFactory();
I should give proper credit to sta-blockhead for the solution: http://sta-blockhead.blogspot.com.br/2009/06/systemdatasqlclientsqlcommandset.html

Executing c# code in f# script has unexpected behavior

I have a F# fake script which works with Nuge.Core to extract package files. If I try to do this with c# console app everything works properly. However if I execute exactly the same script in a f# fake script it is not working. There are so many dependencies here and I have no idea where to look for a help: docker.dotnet, fake, f#, nuget.core
To reproduce this you need to download Docker.DotNet.2.124.3.nupkg
For the c# sample you need console application and to install nuget.core nuget package. This is working!
class Program
{
static void Main()
{
var zip = new NuGet.ZipPackage(#"Docker.DotNet.2.124.3.nupkg");
foreach (var file in zip.GetFiles())
{
System.Console.WriteLine(file.Path);
}
}
}
For the f# sample you need these two files side by side:
https://gist.github.com/mynkow/e6f0e550fcacc268dd1e9b743e17d344
ERROR:
==============================================================================
FsiEvaluationException:
Error: System.InvalidOperationException: 'NETStandard.Library' already has a dependency defined for 'Microsoft.NETCore.Platforms'.
at NuGet.Manifest.ValidateDependencySets(IPackageMetadata metadata)
at NuGet.Manifest.Validate(Manifest manifest)
at NuGet.Manifest.ReadFrom(Stream stream, IPropertyProvider propertyProvider, Boolean validateSchema)
at NuGet.LocalPackage.ReadManifest(Stream manifestStream)
at NuGet.ZipPackage.EnsureManifest(Func`1 manifestStreamFactory)
at NuGet.ZipPackage..ctor(String filePath, Boolean enableCaching)
at <StartupCode$FSI_0005>.$FSI_0005_Test$fsx.main#() in C:\Users\mynkow\Desktop\Reproduce\test.fsx:line 12
Stopped due to error
Output: [Loading C:\Users\mynkow\Desktop\Reproduce\test.fsx]
==============================================================================
Input: C:\Users\mynkow\Desktop\Reproduce\test.fsx
\Arguments:
C:\fsi.exe
Exception: Yaaf.FSharp.Scripting.FsiEvaluationException: Error while compiling or executing fsharp snippet. ---> System.Exception: Operation failed. The error text has been print the error stream. To return the corresponding FSharpErrorInfo use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing
at Microsoft.FSharp.Compiler.Interactive.Shell.FsiEvaluationSession.commitResult[a,b](FSharpChoice`2 res)
at Microsoft.FSharp.Compiler.Interactive.Shell.FsiEvaluationSession.EvalScript(String filePath)
at Yaaf.FSharp.Scripting.Helper.evalScript#1303.Invoke(String arg00) in C:\code\FAKE\paket-files\matthid\Yaaf.FSharp.Scripting\src\source\Yaaf.FSharp.Scripting\YaafFSharpScripting.fs:line 1303
at Yaaf.FSharp.Scripting.Helper.save_#1276-2.Invoke(Unit unitVar0) in C:\code\FAKE\paket-files\matthid\Yaaf.FSharp.Scripting\src\source\Yaaf.FSharp.Scripting\YaafFSharpScripting.fs:line 1277
at Yaaf.FSharp.Scripting.Helper.consoleCapture[a](TextWriter out, TextWriter err, FSharpFunc`2 f) in C:\code\FAKE\paket-files\matthid\Yaaf.FSharp.Scripting\src\source\Yaaf.FSharp.Scripting\YaafFSharpScripting.fs:line 1221
at Yaaf.FSharp.Scripting.Helper.redirectOut#1247[a](Boolean preventStdOut, OutStreamHelper out, OutStreamHelper err, FSharpFunc`2 f) in C:\code\FAKE\paket-files\matthid\Yaaf.FSharp.Scripting\src\source\Yaaf.FSharp.Scripting\YaafFSharpScripting.fs:line 1254
at Yaaf.FSharp.Scripting.Helper.save_#1275-1.Invoke(String text) in C:\code\FAKE\paket-files\matthid\Yaaf.FSharp.Scripting\src\source\Yaaf.FSharp.Scripting\YaafFSharpScripting.fs:line 1276
--- End of inner exception stack trace ---
at Yaaf.FSharp.Scripting.Helper.save_#1275-1.Invoke(String text) in C:\code\FAKE\paket-files\matthid\Yaaf.FSharp.Scripting\src\source\Yaaf.FSharp.Scripting\YaafFSharpScripting.fs:line 1284
at Yaaf.FSharp.Scripting.Helper.session#1306.Yaaf-FSharp-Scripting-IFsiSession-EvalScriptWithOutput(String ) in C:\code\FAKE\paket-files\matthid\Yaaf.FSharp.Scripting\src\source\Yaaf.FSharp.Scripting\YaafFSharpScripting.fs:line 1308
at Fake.FSIHelper.runScriptUncached(Boolean useCache, String scriptPath, IEnumerable`1 fsiOptions, Boolean printDetails, CacheInfo cacheInfo, TextWriter out, TextWriter err) in C:\code\FAKE\src\app\FakeLib\FSIHelper.fs:line 471
System.InvalidOperationException: 'NETStandard.Library' already has a dependency defined for 'Microsoft.NETCore.Platforms'.
at NuGet.Manifest.ValidateDependencySets(IPackageMetadata metadata)
at NuGet.Manifest.Validate(Manifest manifest)
at NuGet.Manifest.ReadFrom(Stream stream, IPropertyProvider propertyProvider, Boolean validateSchema)
at NuGet.LocalPackage.ReadManifest(Stream manifestStream)
at NuGet.ZipPackage.EnsureManifest(Func`1 manifestStreamFactory)
at NuGet.ZipPackage..ctor(String filePath, Boolean enableCaching)
at <StartupCode$FSI_0005>.$FSI_0005_Test$fsx.main#() in C:\Users\mynkow\Desktop\Reproduce\test.fsx:line 12
Stopped due to error
I have tried with the 5 latest versions of all possible dependencies and the results are exactly the same => c# is working, f# is not. Do you have any clue or just anything which you can advise me to try to fix this?
DIRTY SOLUTION:
This is how the Docker.DotNet.2.124.3.nupkg looks like inside
If I remove for example the netstandard1.6 everything works. This means that the problem is in nuget.core, right? But why it is working in c# console app? No idea!
UPDATE: I am able to execute properly the code from F# console application
I've downloaded the packages with paket, and changed the script this way:
#r #"./packages/FAKE/tools/FakeLib.dll"
#r #"./packages/NuGet.Core/lib/net40-Client/NuGet.Core.dll"
open System
open System.Collections.Generic
open System.IO
open Fake
Target "Test" (fun _ ->
printfn "=============================================================================="
global.NuGet.ZipPackage(#"Docker.DotNet.2.124.3.nupkg").GetFiles() |> Seq.iter(fun x -> printfn "%s" x.Path )
)
RunParameterTargetOrDefault "target" "test"
It gives this
Microsoft (R) F# Interactive version 14.0.23413.0
Copyright (c) Microsoft Corporation. All Rights Reserved.
For help type #help;;
>
--> Referenced 'C:\tmp\visualfsharp.issue.nuget\./packages/FAKE/tools/FakeLib.dll'
--> Referenced 'C:\tmp\visualfsharp.issue.nuget\./packages/NuGet.Core/lib/net40-Client/NuGet.Core.dll'
Building project with version: LocalBuild
Shortened DependencyGraph for Target Test:
<== Test
The resulting target order is:
- Test
Starting Target: Test
==============================================================================
Running build failed.
Error:
System.InvalidOperationException: The schema version of 'Docker.DotNet' is incompatible with version 1.6.30117.9648 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.
at NuGet.Manifest.CheckSchemaVersion(XDocument document)
at NuGet.Manifest.ValidateManifestSchema(XDocument document, String schemaNamespace)
at NuGet.Manifest.ReadFrom(Stream stream, IPropertyProvider propertyProvider)
at NuGet.ZipPackage.EnsureManifest()
at FSI_0002.clo#9.Invoke(Unit _arg1) in C:\tmp\visualfsharp.issue.nuget\test.fsx:line 11
at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in C:\code\FAKE\src\app\FakeLib\TargetHelper.fs:line 493
---------------------------------------------------------------------
Build Time Report
No target was successfully completed
---------------------------------------------------------------------
---------------------------------------------------------------------
val it : unit = ()
>
The version of NuGet.Core is 2.12, and I'm seeing it is referencing Microsoft.Web.Xdt which is not loaded.
Maybe you can achieve what you want by simply using paket and adding Docker.DotNet as a dependency, it will extract it for you.
If you have reproducible error that you described, please make a zip and post an issue to visualfsharp repository.

Unable to get ImageMagick .Net working with Asp.Net 4.0

I have downloaded the ImageMagick.Net source code from Codeplex and compiled using Visual Studio 2010. It builds but when I use the generated ImageMagickNET.dll into my Asp.Net 4.0 application I get the following error.
External component has thrown an exception.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.SEHException: External component has thrown an exception.
Source Error:
Line 1049: void Image::Read(System::String^ imageSpec)
Line 1050: {
Line 1051: image->read(Marshaller::SystemStringToStdString(imageSpec));
Line 1052: }
Line 1053:
Source File: d:\dev\projects\imagemagick-63489\imagemagick.net\imagemagicknet\image.cpp Line: 1051
Stack Trace:
[SEHException (0x80004005): External component has thrown an exception.]
Magick.Image.read(Image* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* ) +0
ImageMagickNET.Image.Read(String imageSpec_) in d:\dev\projects\imagemagick-63489\imagemagick.net\imagemagicknet\image.cpp:1051
ImageMagickTest._Default.Page_Load(Object sender, EventArgs e) in D:\Sites\ImageMagickTest\ImageMagickTest\Default.aspx.cs:22
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
Has anyone got ImagMagick.Net working by compiling from the source code?
I know this is a bit of an old question, but this looks similar to an issue with unmatched ImageMagick versions that I was seeing.
If you are using the ImageMagickNET from their sources, you need to make sure you have ImageMagick 6.5.3-10 installed. This probably means building that release from sources, as I don't think the binaries are available anywhere (at least for Windows).
If you updated the ImageMagickNET project with sources from a new ImageMagick release, then you can use it with your newer installed version of ImageMagick. However, I experience several crashes when trying this approach with ImageMagick 6.6.6-10 on Windows. It may be that too much has changed in the underlying library for the ImageMagickNET wrapper to work correctly with this more recent version.

Resources