I have done an Assembly with exported methods using R. Gieseckes UnmanagedExports dll. Building this assembly within VS 2012 works great. But building the assembly as part of
a larger solution with FinalBuilder throws the following error:
Parse IL: Parsing 1517 lines of IL took 120 ms.
C:\BuildSource\branches\Standard\Projects\Intf_New\Interfaces\StdInterface\packages\UnmanagedExports.1.2.4.23262\tools\RGiesecke.DllExport.targets(42,5): error : Der Index, basierend auf 0 (null), muss größer als oder gleich Null sein, und kleiner als die Größe der Argumentenliste.
bei System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
bei System.String.Format(IFormatProvider provider, String format, Object[] args)
bei RGiesecke.DllExport.DllExportNotifier.Notify(Int32 severity, String code, String fileName, Nullable1 startPosition, Nullable1 endPosition, String message, Object[] values) in d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\DllExportNotifier.cs:Zeile 135.
bei RGiesecke.DllExport.DllExportNotifier.Notify(Int32 severity, String code, String message, Object[] values) in d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\DllExportNotifier.cs:Zeile 119.
bei RGiesecke.DllExport.Parsing.IlAsm.RunLibTool(CpuPlatform cpu, String fileName, String directory) in d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\Parsing\ILAsm.cs:Zeile 212.
bei RGiesecke.DllExport.Parsing.IlAsm.RunCore(CpuPlatform cpu, String fileName, String ressourceParam, String ilSuffix) in d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\Parsing\ILAsm.cs:Zeile 186.
bei RGiesecke.DllExport.Parsing.IlAsm.Run(String outputFile, String ilSuffix, CpuPlatform cpu) in d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\Parsing\ILAsm.cs:Zeile 123.
bei RGiesecke.DllExport.Parsing.IlAsm.ReassembleFile(String outputFile, String ilSuffix, CpuPlatform cpu) in d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\Parsing\ILAsm.cs:Zeile 75.
bei RGiesecke.DllExport.DllExportWeaver.RunIlAsm(IlAsm ilAsm) in d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\DllExportWeaver.cs:Zeile 151.
bei RGiesecke.DllExport.DllExportWeaver.Run() in d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport\DllExportWeaver.cs:Zeile 81.
bei RGiesecke.DllExport.MSBuild.ExportTaskImplementation`1.Execute() in d:\Work\Libraries\RGiesecke.DllExport\RGiesecke.DllExport.MSBuild\ExportTaskImplementation.cs:Zeile 243.
Anyone having seen this before? Any hints?
Regards
All I can think is the nugget package that's collecting the component is not loaded has been updated in the project reference or that there is CPU architecture x86/x64 complication.
Looks like you have a combination of d:\Work\Libraries\ and C:\BuildSource\branches\ directories and you might have unexpected links in your project file that are hard coded to different directories rather than using relative references. Have a look at the *.*proj files and hint paths.
Some times I open the VS Solution in the build directory and check for compile issues.
Make sure you use a clean build directory each time. Try running Finalbuilder on a non dev machine to see how well you can build it. I found I had lots of implicit links, so I had to upgrade my Repository to include them or use Nugget actions prior to building the solution.
Related
OS: Mac M1
Framework: .Net 6.0
IDE: Rider
NuGet packages:
Microsoft.ClearScript (v7.2.1)
Microsoft.ClearScript.V8 (v7.2.1)
My simple JavaScript REPL:
using Microsoft.ClearScript.V8;
using myConsole = System.Console;
var v8 = new V8ScriptEngine();
v8.AddHostType("myConsole", typeof(Console));
// JavaScript REPL
while (true)
{
myConsole.WriteLine("> ");
var expression = myConsole.ReadLine();
if(string.IsNullOrEmpty(expression)) continue;
if(expression.Equals("exit", StringComparison.InvariantCultureIgnoreCase)) Environment.Exit(0);
try
{
_ = v8.Evaluate(expression);
}
catch (Exception ex)
{
myConsole.WriteLine(ex.Message);
}
}
I can build it without any problems. But if I run my code I get the error. I see it can't find file ClearScriptV8.osx-arm64.dylib:
/Users/andrey/RiderProjects/ConsoleApp1/ConsoleApp1/bin/Debug/net6.0/ConsoleApp1
Unhandled exception. System.TypeLoadException: Cannot load ClearScript V8 library. Load failure information for ClearScriptV8.osx-arm64.dylib:
/Users/andrey/RiderProjects/ConsoleApp1/ConsoleApp1/bin/Debug/net6.0/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib: Unable to load shared library '/Users/andrey/RiderProjects/ConsoleApp1/ConsoleApp1/bin/Debug/net6.0/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(/Users/andrey/RiderProjects/ConsoleApp1/ConsoleApp1/bin/Debug/net6.0/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib, 0x0001): tried: '/Users/andrey/RiderProjects/ConsoleApp1/ConsoleApp1/bin/Debug/net6.0/runtimes/osx-arm64/native/ClearScriptV8.osx-arm64.dylib' (no such file), '/usr/local/lib/ClearScriptV8.osx-arm64.dylib' (no such file), '/usr/lib/ClearScriptV8.osx-arm64.dylib' (no such file)
/Users/andrey/RiderProjects/ConsoleApp1/ConsoleApp1/bin/Debug/net6.0/ClearScriptV8.osx-arm64.dylib: Unable to load shared library '/Users/andrey/RiderProjects/ConsoleApp1/ConsoleApp1/bin/Debug/net6.0/ClearScriptV8.osx-arm64.dylib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(/Users/andrey/RiderProjects/ConsoleApp1/ConsoleApp1/bin/Debug/net6.0/ClearScriptV8.osx-arm64.dylib, 0x0001): tried: '/Users/andrey/RiderProjects/ConsoleApp1/ConsoleApp1/bin/Debug/net6.0/ClearScriptV8.osx-arm64.dylib' (no such file), '/usr/local/lib/ClearScriptV8.osx-arm64.dylib' (no such file), '/usr/lib/ClearScriptV8.osx-arm64.dylib' (no such file)
/System/ClearScriptV8.osx-arm64.dylib: Unable to load shared library '/System/ClearScriptV8.osx-arm64.dylib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(/System/ClearScriptV8.osx-arm64.dylib, 0x0001): tried: '/System/ClearScriptV8.osx-arm64.dylib' (no such file), '/usr/local/lib/ClearScriptV8.osx-arm64.dylib' (no such file), '/usr/lib/ClearScriptV8.osx-arm64.dylib' (no such file)
at Microsoft.ClearScript.V8.V8Proxy.LoadNativeLibrary(String baseName, String platform, String architecture, String extension)
at Microsoft.ClearScript.V8.V8Proxy.LoadNativeAssembly()
at Microsoft.ClearScript.V8.V8Proxy.OnEntityHolderCreated()
at Microsoft.ClearScript.V8.SplitProxy.V8EntityHolder..ctor(String name, Func`1 acquireHandle)
at Microsoft.ClearScript.V8.SplitProxy.V8IsolateProxyImpl..ctor(String name, V8RuntimeConstraints constraints, V8RuntimeFlags flags, Int32 debugPort)
at Microsoft.ClearScript.V8.V8IsolateProxy.Create(String name, V8RuntimeConstraints constraints, V8RuntimeFlags flags, Int32 debugPort)
at Microsoft.ClearScript.V8.V8Runtime..ctor(String name, V8RuntimeConstraints constraints, V8RuntimeFlags flags, Int32 debugPort)
at Microsoft.ClearScript.V8.V8Runtime..ctor(String name, V8RuntimeConstraints constraints, V8RuntimeFlags flags)
at Microsoft.ClearScript.V8.V8Runtime..ctor(String name, V8RuntimeConstraints constraints)
at Microsoft.ClearScript.V8.V8ScriptEngine..ctor(V8Runtime runtime, String name, V8RuntimeConstraints constraints, V8ScriptEngineFlags flags, Int32 debugPort)
at Microsoft.ClearScript.V8.V8ScriptEngine..ctor(String name, V8RuntimeConstraints constraints, V8ScriptEngineFlags flags, Int32 debugPort)
at Microsoft.ClearScript.V8.V8ScriptEngine..ctor(String name, V8RuntimeConstraints constraints, V8ScriptEngineFlags flags)
at Microsoft.ClearScript.V8.V8ScriptEngine..ctor(String name, V8RuntimeConstraints constraints)
at Microsoft.ClearScript.V8.V8ScriptEngine..ctor()
at Program.<Main>$(String[] args) in /Users/andrey/RiderProjects/ConsoleApp1/ConsoleApp1/Program.cs:line 4
Process finished with exit code 134.
Is it possible to use ClearScript on Mac M1? If "yes" then how can I fix the problem?
The problem solved. A solution was provided in the following GitHub issue: here.
The solution is to use the Microsoft.ClearScript.osx-arm64 package.
when I add a new Telerik form in my project I got an Error.
Error occurred while running wizard.
Telerik.VSX.WizardEngine.ScenarioManagerException: Category: General
Item template: Telerik RadForm
Item name: RadForm1
DTE version: 16.0
Original message: Could not find a part of the path 'c:\users\username\appdata\local\microsoft\visualstudio\16.0_243928ab\extensions\g4vyklmu.pkf\ControlScenarios'. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\users\username\appdata\local\microsoft\visualstudio\16.0_243928ab\extensions\g4vyklmu.pkf\ControlScenarios'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator1.CommonInit() at System.IO.FileSystemEnumerableIterator1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler1 resultHandler, Boolean checkHost) at System.IO.DirectoryInfo.InternalGetDirectories(String searchPattern, SearchOption searchOption) at System.IO.DirectoryInfo.GetDirectories() at Telerik.VSX.WizardEngine.ScenarioManagement.FileBasedScenarioFolder.PopulateSubFolders() at Telerik.VSX.WizardEngine.ScenarioManagement.FileBasedScenarioFolder.get_SubFolders() at Telerik.VSX.Helpers.ScenarioFolderNavigator.GetImmediateSubFolder(String scenarioFolderName, IScenarioFolder folder) at Telerik.VSX.Helpers.ScenarioFolderNavigator.GetSubFolder(String scenarioRelativePath, IScenarioFolder folder) at Telerik.VSX.Helpers.ScenarioFolderNavigator.GetScenario(String scenarioRelativePath, String scenarioName) at Telerik.WinControls.VSX.TemplateProcessing.WFScenarioManager.Launch(IServiceProvider serviceProvider, String itemName, String scenarioPath, String scenarioName) --- End of inner exception stack trace --- at Telerik.WinControls.VSX.TemplateProcessing.WFScenarioManager.Launch(IServiceProvider serviceProvider, String itemName, String scenarioPath, String scenarioName) at Telerik.WinControls.VSPackage.VSItemTemplateWizard.LaunchScenarioManager(ServiceProvider serviceProvider, Dictionary2 replacementsDictionary)
at Telerik.VSX.VSPackage.ItemTemplateWizardBase.RunStarted(Object automationObject, Dictionary`2 replacementsDictionary, WizardRunKind runKind, Object[] customParams)
at Telerik.VSX.VSPackage.WizardBase.<>c__DisplayClass11_0.<Microsoft.VisualStudio.TemplateWizard.IWizard.RunStarted>b__0()
at Telerik.VSX.VSPackage.WizardBase.CatchExceptionAndSendReport(Action action)
how to fix this problem?
This error is a known issue that is related to shared resources across multiple Telerik extensions. In your case most likely they are Progress Telerik UI for WinForms Extension and Progress Telerik WinForms Converter. To work around the problem you can disable or remove the Telerik WinForms Converter extension from Extensions -> Manage Extensions -> Installed.
Best,
Rumen
I am running specflow+ example test from here on mac catalina( x64) using Visual Studio for mac but I get this error
ExecutionThreadApartmentState option not supported for framework: .NETCoreApp,Version=v3.1.
Since apartmentState property is not supported on mac as mentioned here
I tried by removing apartmentState from <execution> element and also tried removing the whole <execution> element from Default.srprofile but still get same error in test results output. (test just keeps on running. Upon cancelling shows error in test output)
Tried x64 in platform settings in build but I get below when try to run test
Test run will use DLL(s) built for framework .NETCoreApp,Version=v3.1 and platform X86. Following DLL(s) do not match framework/platform settings.
TestApplication.UiTests.dll is built for Framework .NETCoreApp,Version=v3.1 and Platform X64.
Is it that the example tests mentioned above can not be run on mac os (x64) ? or am I missing some other thing?
EDIT
I installed and targeted .net core 3.0 and the still get
ExecutionThreadApartmentState option not supported for framework: .NETCoreApp,Version=v3.0.
EDIT2
The error I see in the logs is below. I think the above error about ExecutionThreadApartmentState may be just a warning because I still see it in test output
2020-04-29T13:55:54.5764790-04:00:Executing test executor at '/usr/bin/dotnet' 'exec "/Users/../Desktop/../projects/specflow/SpecFlow.Plus.Examples-master/SeleniumWebTest/TestApplication.UiTests/bin/Debug/netcoreapp3.0/SpecFlowPlusRunner/netcoreapp3.0/TechTalk.SpecRun.Framework.Executor.anycpu.netcoreapp3_0.dll" --remoteRunnerPid 37116 --uniqueId "2020-04-29T135554" --outputFolder "/Users/../Desktop/../projects/specflow/SpecFlow.Plus.Examples-master/SeleniumWebTest/TestApplication.UiTests/obj/TestResults" --callbackPort 32770 --loggerPort 32771' in '/Users/../Desktop/../projects/specflow/SpecFlow.Plus.Examples-master/SeleniumWebTest/TestApplication.UiTests/bin/Debug/netcoreapp3.0'
2020-04-29T13:55:54.6057600-04:00:System.ComponentModel.Win32Exception (2): No such file or directory
at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at TechTalk.SpecRun.Framework.Execution.OutOfProc.OutProcExecutorManager.StartProcess(ExecutorProcessInfo executorProcessInfo)
at TechTalk.SpecRun.VisualStudio.TestAdapter.VsOutProcExecutorManager.StartProcess(ExecutorProcessInfo executorProcessInfo)
at TechTalk.SpecRun.Framework.Execution.OutOfProc.StreamJsonRPC.OutOfProcessTestAssemblyExecutorHost.Initialize(Int32 threadId, ITestExecutionManager executionManager, IAssemblyReference testAssembly, ITestLogger currentLogger, String testAssemblyFullPath, String testAssemblyConfigFilePath, TestExecutionConfiguration testExecutionConfiguration, String target)
I'm no expert, not yet;) but I got this error too. and I found that it happened because a Class variable I declared in the Test - in its constructor there was a call to a method of an object stored in a field of the class with I/O from the Console.
when I removed the call from the constructor the tests (unit test) could run ok again.
I am quite new to dotnet and Keras.NET, and I was trying to set it up on a goorm.io container. After installing the prerequisites (adding $HOME/.keras/keras.json for Tensorflow backend and pip install numpy), and then adding Keras.NET, I tried to run the XOR sample code, but ran into an error.
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'python37' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libpython37: cannot open shared object file: No such file or directory
at Python.Runtime.Runtime.Py_IsInitialized()
at Python.Runtime.Runtime.Initialize(Boolean initSigs)
at Python.Runtime.PythonEngine.Initialize(IEnumerable1 args, Boolean setSysArgv, Boolean initSigs) at Python.Runtime.PythonEngine.Initialize(Boolean setSysArgv, Boolean initSigs) at Python.Runtime.PythonEngine.Initialize() at Numpy.np.InstallAndImport(Boolean force) at Numpy.np.<>c.<.cctor>b__599_0() at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue()
at System.Lazy1.get_Value() at Numpy.np.get_self() at Numpy.np.get_float32() at Numpy.DtypeExtensions.GetDtype(Object obj) at Numpy.np.array[T](T[,] object, Dtype dtype, Nullable1 copy, String order, Nullable1 subok, Nullable1 ndmin)
at Proj.Program.Main(String[] args) in /workspace/XOR/Proj/Program.cs:line 14
I do not know how to share with the python37 directory. If someone could direct me in the right direction, it would be much appreciated. By the way, I am using Linux if that helps.
Thanks
Does anyone know what this means? I am getting this error in my CI build (CruiseControl.Net + NAnt + MSBuild), locally this project compiles just fine...
My.Web.csproj: Error MSB4014: The build was aborted because of an internal failure.
Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: refCount should not be less than 1.
at Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(String message, Exception innerException, Object[] args)
at Microsoft.Build.Collections.CopyOnWriteDictionary\`2.CopyOnWriteBackingDictionary\`2.get_HasNoClones()
at Microsoft.Build.Collections.CopyOnWriteDictionary\`2.set_Item(K key, V value)
at Microsoft.Build.Collections.CopyOnWriteDictionary`2.System.Collections.IDictionary.set_Item(Object key, Object value)
at Microsoft.Build.BuildEngine.BuildItem..ctor(String itemName, ITaskItem taskItem)
at Microsoft.Build.BuildEngine.TaskEngine.GatherTaskItemOutputs(Lookup lookup, TaskOutput taskOutputSpecification, String itemName, String propertyName, Object outputs)
at Microsoft.Build.BuildEngine.TaskEngine.GatherGeneratedTaskOutputs(Lookup lookup, TaskOutput taskOutputSpecification, String taskParameterName, String itemName, String propertyName, ITask task)
at Microsoft.Build.BuildEngine.TaskEngine.GatherTaskOutputs(TaskExecutionMode howToExecuteTask, ITask task, ItemBucket bucket)
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteBucket(EngineProxy engineProxy, ItemBucket bucket, Int32 bucketNumber, TaskExecutionMode howToExecuteTask)
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(TaskExecutionMode howToExecuteTask, Lookup lookup)
at Microsoft.Build.BuildEngine.TaskExecutionState.TaskEngineExecuteTask(TaskEngine taskEngine, TaskExecutionMode howTaskShouldBeExecuted, Lookup lookup)
at Microsoft.Build.BuildEngine.TaskExecutionState.ExecuteTask()
at Microsoft.Build.BuildEngine.TaskExecutionModule.ExecuteTask(TaskExecutionState taskState)
at Microsoft.Build.BuildEngine.TargetExecutionWrapper.SubmitNonIntrinsicTask(XmlElement taskNode, ITaskHost hostObject, ProjectBuildState buildContext)
at Microsoft.Build.BuildEngine.TargetExecutionWrapper.ExecuteCurrentTask(ProjectBuildState buildContext)
at Microsoft.Build.BuildEngine.TargetExecutionWrapper.ContinueRunningTasks(ProjectBuildState buildContext, TaskExecutionContext taskExecutionContext, Boolean startingFirstTask)
at Microsoft.Build.BuildEngine.TargetExecutionWrapper.ContinueBuild(ProjectBuildState buildContext, TaskExecutionContext taskExecutionContext)
at Microsoft.Build.BuildEngine.Project.ExecuteNextActionForProjectContext(ProjectBuildState buildContext, Boolean initialCall)
at Microsoft.Build.BuildEngine.Project.CalculateNextActionForProjectContext(ProjectBuildState buildContext)
at Microsoft.Build.BuildEngine.Project.ContinueBuild(ProjectBuildState buildContext, TaskExecutionContext taskExecutionContext)
at Microsoft.Build.BuildEngine.Project.BuildInternal(BuildRequest buildRequest)
at Microsoft.Build.BuildEngine.Engine.BuildProjectInternalInitial(BuildRequest buildRequest, Project project)
at Microsoft.Build.BuildEngine.Engine.BuildProjectInternal(BuildRequest buildRequest, ProjectBuildState buildContext, TaskExecutionContext taskExecutionContext, Boolean initialCall)
at Microsoft.Build.BuildEngine.Engine.EngineBuildLoop(BuildRequest terminatingBuildRequest)
at Microsoft.Build.BuildEngine.Engine.PostProjectEvaluationRequests(Project project, String[] projectFiles, String[][] targetNames, BuildPropertyGroup[] globalPropertiesPerProject, IDictionary[] targetOutputsPerProject, BuildSettings buildFlags, String[] toolVersions)
Unexpected error while compiling project 'My.Web'
Exception has been thrown by the target of an invocation.
MSB0001: Internal MSBuild Error: refCount should not be less than 1.
I ran into the same problem in a similar environment. In my case, the project had a COM reference to the Active DS Type Library, which wasn't installed on the build server.
To fix the problem, I dropped the COM reference and added a reference to an interop assembly, which was then deployed to the build server.
Found the solution: instead of using <solution> in the build target I called msbuild directly with <exec>. Everything works now.
My problem it's similar with you, I'm have to eliminate two projects that relationship with my solution in mobil enviroment, that cause the conflict with the others projects in my solution.
My other projects are desktop, mvc, webapi enviroment.
I have to create a new solution for my others mobil projects