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
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.
We have the IBM.Data.DB2.Core (3.1.0.300) nuget package installed in our .netstandard2.1 application library, to connect to an external DB2 instance on prem.
On running the following code from a .net core azure function v3 Windows 64bit (from a netcoreapp3.1 project)
var connectionString= "Server=DB2_IP:DB2_Port;Database=DB2_DBNAME;UID=DB2_UserId;PWD=DB2_Password;"
var connection = new DB2Connection(connectionString);
(note the values in the connection string are placeholders for anonymity)
We are receiving the following error
IBM.Data.DB2.Core.DB2Exception (0x80004005): ERROR [58005] [IBM][DB2.NET] SQL0902 An unexpected
exception has occurred in
Process: 21308 Thread 33 AppDomain: Name:Microsoft.Azure.WebJobs.Script.WebHost
There are no context policies. Function: AESEncryptADONET (Encryption Info)
CallStack: at System.Environment.get_StackTrace()
at IBM.Data.DB2.Core.DB2ConnPool.HandleUnknownErrors(String strFncMsg, Exception exception, Boolean bThrow)
at IBM.Data.DB2.Core.DB2ConnPool.EncryptString(String value)
at IBM.Data.DB2.Core.DB2ConnPool.ReplaceConnectionStringParms(DB2Connection connection, String szValue, DB2ConnSettings& pSettings, DB2ConnSettingsInternal& pSettingsInternal, Boolean bAttach, Boolean pushDownStrAppended)
at IBM.Data.DB2.Core.DB2Connection.set_ConnectionString(String value)
at IBM.Data.DB2.Core.DB2Connection..ctor(String connectionString)
Does anyone have any idea where we're going wrong, or alternatively have a coherent end-to-end guide on the setup that may give me a clue.
All documentations I have found thus far has been rather sparse and a little inconsistent.
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
Our TFS build has broken following updating the XAML build definition. Changes included modifying the template and a few parameters. The trace is below
TF215097: An error occurred while initializing a build for build definition [REDACTED]:
Exception Message: Cannot set unknown member 'Microsoft.TeamFoundation.Build.Activities.Git.GitPull.CheckoutSubmodules'. (type XamlObjectWriterException)
Exception Stack Trace: at System.Xaml.XamlObjectWriter.WriteStartMember(XamlMember property)
at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
at System.Activities.XamlIntegration.FuncFactory`1.Evaluate()
at System.Activities.DynamicActivity.OnInternalCacheMetadata(Boolean createEmptyBindings)
at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList`1& validationErrors)
at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack`1& activitiesRemaining, ActivityCallStack parentChain, IList`1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)
at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
at System.Activities.Validation.ActivityValidationServices.InternalActivityValidationServices.InternalValidate()
at Microsoft.TeamFoundation.Build.Workflow.WorkflowHelpers.ValidateWorkflow(Activity activity, ValidationSettings validationSettings)
at Microsoft.TeamFoundation.Build.Hosting.BuildProcessCache.LoadFromXaml(String workflowXaml, TextExpressionImports textExpressionImports)
at Microsoft.TeamFoundation.Build.Hosting.BuildControllerWorkflowManager.PrepareRequestForBuild(WorkflowManagerActivity activity, IBuildDetail build, WorkflowRequest request, IDictionary`2 dataContext)
at Microsoft.TeamFoundation.Build.Hosting.BuildWorkflowManager.TryStartWorkflow(WorkflowRequest request, WorkflowManagerActivity activity, BuildWorkflowInstance& workflowInstance, Exception& error, Boolean& syncLockTaken)
The build fails in the first few seconds as this is the process that is trying to retrieve the source. However, I cannot come to any conclusions as to why this error is happening. A Google search doesn't bring up anything useful.
TFS version 2013
Has anyone encountered this error and if so how did you fix it?
If I need to provide more information please ask.
When you modify the Build process template and therefore it’s no longer in sync with the build definition you may get TF215097 error.
#jessehouwing's suspicion makes sense. I can't find too many articles to elaborate this issue, but in this MSND documentation mentions, if you want to edit a custom template, You must use only Visual Studio 2013 to edit your build process templates of TFS 2013.
Before posting this question I reviewed:
Runtime error when trying to run Fluent NHibernate tutorial example
Fluent nHibernate error - Could not compile the mapping document: (XmlDocument)
and many more similar questions which I was hoping could shed some light on my issue. No luck so far:
I was working a solution for some time now and everything was going fine until my most recent change. The solution still compiles but fails on startup with this exception:
An unhandled exception of type
'FluentNHibernate.Cfg.FluentConfigurationException' occurred in
xx.Initialization.dll
in View Details it says:
An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail."
PotentialReasons: Count = 0
InnerException: Could not compile the mapping document: xx.Website.Persistence.Repository.Mappings.UI.yyDataDto.hbm.xml
Inner exception: JIT Compiler encountered an internal limitation.
The .hbm.xml file that the exception is referring to is intact and there were no changed made to it. All of my code changes are covered by tests and whatever I changed doesn't seem to involve the exception directly.
To troubleshoot this, I committed and pushed all of my changes (feature branch) and asked my co-worker to get latest version. He was able to run the solution without any exceptions. I tried restarting my VS2013, my workstation, deleting my repository and getting the solution from scratch through source control as well as by a direct copy of my co-worker's solution folder (latest version) and still receiving the same error.
Not sure what else to try. Any tips/suggestions would be greatly appreciated. Thanks!
edit/update:
Today I attempted to repair my VS2013 installation, that didn't help. I then updated to latest service pack 4. Also no results.
I'm guessing at this point that something may be wrong with my debugger/settings because if I build the project and launch it (without debugging or by navigating to Bin folder and executing directly) it runs without exceptions. If I debug, I get the exception.
Here's the stacktrace:
at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory()
at Company.Framework.Startup.Behaviour.NHibernateMultiDbBehaviour`2.ConfigureSessionFactory[TFluentMapping](String defaultSchema, String connectionStringKey)
at Company.Framework.Startup.Behaviour.NHibernateMultiDbBehaviour`2.<>c__DisplayClassa`1.<RegisterNHibernate>b__5()
at Castle.MicroKernel.Registration.ComponentRegistration`1.<>c__DisplayClassf`1.<UsingFactoryMethod>b__e(IKernel k, ComponentModel m, CreationContext c)
at Castle.MicroKernel.ComponentActivator.FactoryMethodActivator`1.Instantiate(CreationContext context)
at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context)
at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context)
at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context)
at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired)
at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context, Boolean instanceRequired)
at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)
at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments)
at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service)
at Castle.MicroKernel.DefaultKernel.Resolve(String key, Type service)
at Castle.MicroKernel.DefaultKernel.Resolve[T](String key)
at Company.Framework.Startup.Behaviour.NHibernateMultiDbBehaviour`2.<>c__DisplayClassa`1.<RegisterNHibernate>b__7(IKernel kernel)
at Castle.MicroKernel.Registration.ComponentRegistration`1.<>c__DisplayClass12`1.<UsingFactoryMethod>b__11(IKernel k, ComponentModel m, CreationContext c)
at Castle.MicroKernel.ComponentActivator.FactoryMethodActivator`1.Instantiate(CreationContext context)
at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context)
at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context)
at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired)
at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context, Boolean instanceRequired)
at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)
at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments)
at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service)
at Castle.MicroKernel.DefaultKernel.Resolve(String key, Type service)
at Castle.Windsor.WindsorContainer.Resolve[T](String key)
at Company.Framework.Startup.Behaviour.NHibernateMultiDbBehaviour`2.RegisterNHibernate[TFluentMapping](String factoryName, String sessionName, String defaultSchema, String connectionStringKey)
at Company.Framework.Startup.Behaviour.NHibernateMultiDbBehaviour`2.Start()
at Company.Framework.Startup.Behaviour.BehaviourManager.AddAndInitialize[T](Action`1 initialize)
at Company.Framework.Startup.Behaviour.BehaviourManager.Add[T](Action`1 initialize)
at Company.Project.Initialization.ServiceInitializator.ConfigureBehaviours() in c:\Path\Project.Initialization\ServiceInitializator.cs:line 99
The solution was to uninstall VS2013 completely and re-install it from scratch. After I did that, the exception went away.
I tried to remember what could've caused this and so far my only suspicion is that maybe when I ran CCleaner (prior to this issue appearing), it removed files or registry entries which made VS behave in such a way.