It seems that KB983583 affects MSBuild. All my builds are hanging after installing this update on Windows Server 2003 SP2.
Here is a part of thread dump from TeamCity:
Thread id=3708 priority=8 state=Wait reason=ExecutionDelay
at System.Globalization.CultureInfo.GetNativeSortKey(System.Int32 lcid, System.Int32 flags, System.String source, System.Int32 cchSrc, System.Byte sortKey)
at System.Globalization.CultureTableRecord.GetScriptTag(System.Int32 lcid, System.String script)
at System.Globalization.CultureTableRecord.CacheSyntheticNameLcidMapping()
at System.Globalization.CultureTableRecord.InitSyntheticMapping()
at System.Globalization.CultureTable.GetCultures(System.Globalization.CultureTypes types)
at Microsoft.Build.Tasks.CultureStringUtilities.PopulateCultureInfoArray()
at Microsoft.Build.Tasks.CultureStringUtilities.IsValidCultureString(System.String cultureString)
at Microsoft.Build.Tasks.ReferenceTable.FindSatellites(Microsoft.Build.Tasks.Reference reference)
at Microsoft.Build.Tasks.ReferenceTable.FindAssociatedFiles()
at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure()
...
After uninstalling KB983583 everything works.
Did anybody reproduce this issue?
Related
When using the Mono framework 5.10.0.16 (regardless of IDE: VS for Mac, JetBrains Rider and MonoDevelop) the same error occurs and I cannot make sense of it:
Microsoft.VisualBasic.Core.targets(73, 5): [MSB3883] Unexpected exception:
Microsoft.VisualBasic.Core.targets(73, 5): [null] System.ComponentModel.Win32Exception (0x80004005): ApplicationName='vbnc.exe', CommandLine=' /noconfig #"/var/folders/sj/sblgn2q93b1084nm213419f80000gn/T/tmp54fb2d36c21545118516981a1817b134.rsp"', CurrentDirectory='', Native error= Cannot find the specified file
at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x002dc] in <f8bb3922e51744d9ace1aa6aedc374ea>:0
at System.Diagnostics.Process.Start () [0x0003a] in <f8bb3922e51744d9ace1aa6aedc374ea>:0
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
at Microsoft.Build.Utilities.ToolTask.ExecuteTool (System.String pathToTool, System.String responseFileCommands, System.String commandLineCommands) [0x000c9] in <0027e94ddd2948b0b937f5e2d51fcfe1>:0
at Microsoft.CodeAnalysis.BuildTasks.ManagedCompiler.ExecuteTool (System.String pathToTool, System.String responseFileCommands, System.String commandLineCommands) [0x00066] in <896b154c97654cea80889fd96e18abdc>:0
I have tried installing different versions, the error persists, I'm not sure what to make of it but I notice a vnbc.exe
I am using MacOSX version 10.13.4
This issue in mono https://github.com/mono/mono/issues/7756. It's already fixed. We are waiting for new release.
I have written an app that runs on my target Linux BeagleBone Black with Debian 8 derived OS.
It will run if I install the whole mono-runtime. This is too big for the final targets that I will be running it on.
I would like to use mkbundle to create a static package that has everything embedded.
The problem I am having is that I am using MEF and dependancy injection in this app and when I run the final bundle that mkbundle creates I am getting the error shown below.
I suspect that is because that MEF and / or my app is written to load most of the exports by loading DLL assemblies and they are embedded inside the bundle.
Can anyone shed some light on this?
Here is the error:
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: 'path' cannot be an empty string ("").
Parameter name: path
at Microsoft.Internal.Requires.NotNullOrEmpty (System.String value, System.String parameterName) [0x00022] in <0007e672dd7f4959adc6f8103d9c843f>:0
at System.ComponentModel.Composition.Hosting.DirectoryCatalog..ctor (System.String path, System.String searchPattern) [0x00011] in <0007e672dd7f4959adc6f8103d9c843f>:0
at NonWindowsCommon.MefDI.<DirectoryCatalogContainer>m__1 (System.String path) [0x00022] in <15e2f18d34444e41a666c99ead602eed>:0
at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x00064] in <63992662b765477a898ef49cdcc99ee2>:0
at System.Diagnostics.Contracts.Contract.ForAll[T] (System.Collections.Generic.IEnumerable`1[T] collection, System.Predicate`1[T] predicate) [0x00048] in <8f2c484307284b51944a1a13a14c0266>:0
at Microsoft.Internal.Requires.NotNullElements[T] (System.Collections.Generic.IEnumerable`1[T] values, System.String parameterName) [0x00013] in <0007e672dd7f4959adc6f8103d9c843f>:0
at Microsoft.Internal.Requires.NullOrNotNullElements[T] (System.Collections.Generic.IEnumerable`1[T] values, System.String parameterName) [0x00000] in <0007e672dd7f4959adc6f8103d9c843f>:0
at System.ComponentModel.Composition.Hosting.AggregateCatalog..ctor (System.Collections.Generic.IEnumerable`1[T] catalogs) [0x00006] in <0007e672dd7f4959adc6f8103d9c843f>:0
at NonWindowsCommon.MefDI.DirectoryCatalogContainer (System.String basepath) [0x0002c] in <15e2f18d34444e41a666c99ead602eed>:0
at Ignition.CommandLine.Program.Configure () [0x0006b] in <c9925f8b4dd141c2a6ea39dd7842d0d4>:0
at Ignition.CommandLine.Program..ctor () [0x00012] in <c9925f8b4dd141c2a6ea39dd7842d0d4>:0
at Ignition.CommandLine.Program.Main (System.String[] args) [0x00001] in <c9925f8b4dd141c2a6ea39dd7842d0d4>:0
Turns out that the code one of our other devs had written was creating our composition container using the exe path. This exe path is "" for the main EXE when run from inside of an mkbundle created EXE.
This was causing the code that dev had written to use an empty path.
I was able to solve it by simply keeping track of the true EXE path and passing that in the the method used to create the container.
I have a project that is a .NET Core console application with just a model and some seed data. On a development desktop I can go to the application directory, run dotnet ef database update and everything is fine (I need to copy appsettings.json to bin\... directory, but OK).
The problem is when I need to run this in the client environment (with VPN access, and without Visual Studio there). First, I am not sure what exactly I need to copy to the remote machine. But let's say, I copied the whole project. First, when I run, I get the following error:
Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path '.nuget\packages.tools\Microsoft.EntityFrameworkCore.Tools'.
I have a directory .nuget\packages\Microsoft.EntityFrameworkCore.Tools but not under .tools. Out of despair I created .tools and copied this directory under it, but now I am getting the following exception:
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver. ResolveCommandSpecFromToolLibrary(LibraryRange toolLibraryRange, String commandName, IEnumerable`1 args, ProjectContext projectContext)
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver. ResolveCommandSpecFromAllToolLibraries(IEnumerable`1 toolsLibraries, String commandName, IEnumerable`1 args, ProjectContext projectContext)
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver. ResolveFromProjectTools(String commandName, IEnumerable`1 args, String projectDirectory)
at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.Resolve (CommandResolverArguments commandResolverArguments)
at Microsoft.DotNet.Cli.Utils.CompositeCommandResolver.Resolve (CommandResolverArguments commandResolverArguments)
at Microsoft.DotNet.Cli.Utils.CommandResolver.TryResolveCommandSpec(String commandName, IEnumerable`1 args, NuGetFramework framework, String configuration, String outputPath)
at Microsoft.DotNet.Cli.Utils.Command.Create(String commandName, IEnumerable`1 args, NuGetFramework framework, String configuration, String outputPath)
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryClient)
at Microsoft.DotNet.Cli.Program.Main(String[] args)
Clearly, my trial and error attempts to find the right way hit a wall. Is there some substantive (not just syntax) documentation as to how to run EF Core commands outside Visual Studio? .NET is version 1.1 if that matters
It seems that you have not removed Entity framework completly hence the error that path: .nuget\packages.tools\Microsoft.EntityFrameworkCore.Tools is not found.
Somewhere in code there must be a reference to this file. If you are using project.json try checking your tools and depenedencies for Microsoft.EntityFrameworkCore.Tools.
If you are using the .csproj SDK version. Check your project file for any of these references and remove them.
The ServiceStack website has build / install instructions for windows (Nuget). There are many posts referring to mono based ServiceStack, but never any instructions for how to build on Centos for example. I downloaded and built ServiceStack on windows and tried to bring the files over to Centos. So far this has not worked for my integration with mono-fastcgi. I get errors in the browser: "Parser Error Message: Cannot find type ServiceStack.Examples.Host.Web.Global" for example. This particular error is not really my question, unless it can get me further towards a ServiceStack installation that works. The real question is what is the best way to install ServiceStack and build it on Centos? (And getting Nuget to work on Centos is not a solution.. at least I can't get Nuget to build).
After working the steps listed below in discussion with Scott, the nuget.exe command line package manager gets the following errors:
[root#buffer1 nuget]# /usr/local/bin/mono nuget.exe install ServiceStack -Verbosity detailed -ConfigFile /root/nuget/NuGet.config
WARNING: Invalid certificate received from server. Error code: 0xffffffff800b010a
System.InvalidOperationException: Unable to find package 'ServiceStack'.
at NuGet.PackageRepositoryHelper.ResolvePackage (IPackageRepository sourceRepository, IPackageRepository localRepository, IPackageConstraintProvider constraintProvider, System.String packageId, NuGet.SemanticVersion version, Boolean allowPrereleaseVersions) [0x00000] in <filename unknown>:0
at NuGet.PackageRepositoryHelper.ResolvePackage (IPackageRepository sourceRepository, IPackageRepository localRepository, System.String packageId, NuGet.SemanticVersion version, Boolean allowPrereleaseVersions) [0x00000] in <filename unknown>:0
at NuGet.PackageManager.InstallPackage (System.String packageId, NuGet.SemanticVersion version, Boolean ignoreDependencies, Boolean allowPrereleaseVersions) [0x00000] in <filename unknown>:0
at NuGet.Commands.InstallCommand.InstallPackage (IFileSystem fileSystem, System.String packageId, NuGet.SemanticVersion version) [0x00000] in <filename unknown>:0
at NuGet.Commands.InstallCommand.ExecuteCommand () [0x00000] in <filename unknown>:0
at NuGet.Commands.Command.Execute () [0x00000] in <filename unknown>:0
at NuGet.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
[root#buffer1 nuget]#
Any ideas on using the command line nuget?
You mentioned that you have managed to get Mono to build on CentOS.
Don't build ServiceStack from source:
While it is possible, it's unnecessary. You can copy the existing ServiceStack dlls you may have from Windows; you don't need a special build, nor do you have to build them yourself on CentOS.
No Build instructions ... use NuGet:
There aren't specific instructions for building ServiceStack on CentOS, because there aren't instructions for building it from source at all. The recommended approach is to obtain the ServiceStack dlls from NuGet. But you'll only want to do that if you are using the CentOS machine as your development machine. In which case you can download the NuGet command line tool. Then simply run:
mono nuget.exe install ServiceStack
Then in you development IDE (I recommend monodevelop) reference the files that were downloaded by NuGet. See here for instructions on how to get Mono and MonoDevelop running on CentOS.
Invalid Certificate Warning:
This occurs when you haven't added the Mozilla Trusted Root Certificate Providers to the mono trusted providers store. You just need to do this action once, and mono will start trusting SSL certificates from the standard trusted sources:
mozroots --import --sync
See here for more information about Mono SSL Security.
Deploying:
It's just a case of copying your published project to CentOS and following these configuration instructions from the documentation. Except instead of using apt-get to install nginx you will need to use yum. But the configuration of nginx and fastcgi is the same.
I have recently encountered some rather baffling behavior while up-converting a VB.NET solution from VS2005 to VS2010. For reference, the solution targets .NET 2.0 and was running without error in the debugger prior to the conversion. In addition to the IDE change, corporate has seen it fit to refresh my device from Win XP (x86) to Win 7 (x64).
Now that I have converted the solution to VS2010, I receive a Socket exception as soon as the debugger loads (details below). This ONLY occurs in the debugger. Building the solution in its Release configuration produces a MSI that correctly installs and runs without error.
The details of the exception received are as follows:
System.Net.Sockets.SocketException was unhandled
Message=An invalid argument was supplied
Source=System
ErrorCode=10022
NativeErrorCode=10022
StackTrace:
at System.Net.Sockets.Socket..ctor(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType)
at System.Net.Sockets.TcpListener..ctor(IPAddress localaddr, Int32 port)
at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupChannel()
at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider, IAuthorizeRemotingConnection authorizeCallback)
at System.Runtime.Remoting.Channels.Tcp.TcpChannel..ctor(IDictionary properties, IClientChannelSinkProvider clientSinkProvider, IServerChannelSinkProvider serverSinkProvider)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.RegisterChannel(Boolean SecureChannel)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at FSASYSTEM.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
The truly confusing part is that this exception is generated before a single line of my code is executed. The Main method is generated via VB.NET (managed code) and I am not able to breakpoint it, trap errors within it (due to kernel / application context switching, as I understand it), nor symbolically debug into it.
A possible fix for this would be to target another .NET framework version, however I am really interested in understanding WHY this is happening. I fail to understand why such an error would only manifest itself in the debugger and not in the released code. And, yes, I have tried restarting the machine to ensure that there weren't any left-over sockets still listening, causing binding failures.
Thank you in advance for your time and assistance.
After much work and a heaping helping of creative swearing, I was able to resolve my problem. Turns out that the issue had to do with running the code from a network location. Our company is moving to ClearCase, which stores all code in a pseudo-network drive. As it turns out, .NET 4 removed the ability to target assemblies on a 'remote' host by default. Since my code appeared to be on the M: drive, my guess is the runtime was rejecting the load of a particular assembly.
To fix this, I added the following tag to my app.config:
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
This appears to have fixed the issue. However, if anyone knows how that particular error message was generated as a result of resolving assemblies across a virtual network, I would love to hear it. Also, if the internet is to be believed, this security measure was introduced in .NET 4 yet it still caused problems despite the fact that I had explicitly targeted framework 2.0.
Hopefully, this can save someone down the road a good amount of time. And, for your literary pleasure, some supplemental reading:
http://through-the-interface.typepad.com/through_the_interface/2011/07/loading-blocked-and-network-hosted-assemblies-with-net-4.html
Could not load file or assembly HRESULT: 0x80131515 (When adding controller to MVC project that has assembly references on network drive)