I have been stuck here for quite a while.
I know this is pretty basic, but plss help me out on this one.
I am familiar with Visual Studio for quite some time. So decided to give VS Code a shot.
I wanted to compile and run a simple 'Hello World' program in C#.[ref. Brackeys(Youtube)]
I have followed all the steps, but when I type in the cmd "dotnet run"
Failed to create CoreCLR, HRESULT: 0x80070057
This is what happens.
Are there any steps missing? Or some installation error, or I am missing some steps?
I am running this on :
Windows 10 [x64]
dotnet-sdk-3.1.402-win-x64
VSCodeUserSetup-x64-1.49.2
[
I think you've found a bug in the .NET SDK. It doesn't appear to like the folder name for the project being ;).
If I have it in #Code it runs fine. If I put it in #Code\;) then it fails with the same error.
I've opened an issue here: https://github.com/dotnet/sdk/issues/13954
The offending character is actually the ; (semicolon) character in your path. I had a similar issue, and once I renamed the path, my solution ran fine. Also note that having the ^ character (caret) can cause different issues in Visual Studio. Beyond those two, the path can contain any special character other than \/:*?"<>| which are prohibited by Windows.
Related
Description
When launching any Console Application, the code stops running immediately on an AccessViolationException (Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt). More info included in the next section.
Technical Symptoms
The Call Stack only contains external code:
Exception:Thrown: "The message filter indicated that the application is busy. >(Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))" (System.Runtime.InteropServices.COMException)
A System.Runtime.InteropServices.COMException was thrown: "The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))"
Time: 12/10/2015 10:59:55 AM
Thread:vshost.NotifyLoad[15344]
I created a new Console Application, containing only Console.WriteLine("Hello world!");
Running the new Hello world app results in the same exception and an identical
call stack.
Background
I suspect this has nothing to do with the issue, as I will explain, but I feel it is important to answer the obvious question, "what were you doing when the issue happend?" The last change I made was adding an extension to my Selenium Driver to hotkey logout from an application:
public static void logout(this IWebDriver Driver)
{
Driver.FindElement(By.TagName("body")).Click();
new Actions(Driver)
.SendKeys(Keys.Control + Keys.Shift + "x")
.Perform();
}
I also made a change in my App.Config file for one of my projects, but reverting this had no impact either.
Removing this code (the Driver extension and/or the App.Config change) does not resolve this issue. Retrieving a previous check-in does not resolve the issue. I am the only person currently working on this solution.
Discoveries
As mentioned, this is happening for an empty Console Application. Windows Form Applications launch fine. Unit Test Projects launch fine as well.
Research
I've spent hours looking into this. It seems like every similar issue I have looked into is pertinent to debugging only or a .NET version. For me, the issue occurs with a Release as well. Additionally, I have been using .NET 4.5 without any issues or changes on that front. I can't find any articles that seem worth posting, but I might be overlooking something.
Visual Studio Info
Microsoft Visual Studio Ultimate 2013
Version 12.0.30501.00 Update 2
.NET Version 4.6.00081 (just noticed it says 4.5 in my project properties, though)
Running as Administrator
Feedback
When Running from devenv.exe /SafeMode, Visual Studio loaded with:
An exception was encountered while constructing the content of this frame. This information is also logged in "C:\Users\UserName\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml".
Exception details:
System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid& context)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage()
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()
Additionally, when trying to run, I get an error message of "Error while trying to run project: Invalid Pointer" (again, VS in devenv.exe /SafeMode - see how to run visual studio without plugin and all third party feature if unfamiliar)
Please let me know if I can provide any additional information.
It may be because when you name the project you can't put spaces, I put them and it gave me a AccessViolationException aswell, try using capitals to separate your words, but only use letters and no spaces to be sure.
I also faced this issue with Visual Studio 2010. More interestingly I had several projects in my solution (Console application, WPF application, Windows Forms application) but it was failing only when, I was setting the project which was of type "Console Application" as start up project. Following change finally helped me nail down the issue: Go to project properties of the console application project -> Go to "Debug" tab -> Go to "Enable Debuggers" section in right pane -> Check the "Enable unmanaged code debugging" check box as shown in the snapshot below. Root cause of why it happened is still not known to me. Only thing which I observed as fishy was that there were lot of windows updates which had got installed on my machine the previous night which mostly constituted of office updates and OS updates (More than a dozen KB articles).
i've just installed MonoGame and XNA and i'm having some issues from the jump, from googling it seems as though i need to add 'C:\Windows\System32' to my path environment variables, i've tried adding it here
but i'm still getting these errors
Error 1
The command "SETX MONOGAME_PLATFORM "PSM" > NUL" exited with code 9009. MyMonoGameContent
Error 2
Metadata file 'C:\Users\Benji\documents\visual studio 2013\Projects\myMonoGame\MyMonoGameContent\MyMonoGameContent\bin\PSM\IgnoreMe.dll' could not be found C:\Users\Benji\documents\visual studio 2013\Projects\myMonoGame\myMonoGame\CSC myMonoGame
This happens when i try to compile after referencing my content project
i'm following these http://rbwhitaker.wikidot.com/monogame-tutorials
no idea what's up, was that the wrong place to set the enviroment variable? i've tried looking for a user property sheet but can't find one in my project
I wouldn't expect that you would want to create content for the PSM (PlayStation Mobile). Check the targeted platform of the ContentBuilder project to ensure you are building for Windows.
Built this game through Unity, and managed to compile through xCode once before. Without any apparent changes, however, this error message turns up. I don't understand where to start looking for a fix, but maybe someone else have a clue? I've seen similar looking errors through searches, though the fixes seem arbitrary compared to mine.
Anyone able to shed some light? Thank you!!
0 0x1034de0e7 __assert_rtn + 144
1 0x10351350c archive::File<arm>::makeObjectFileForMember(archive::File<arm>::Entry const*) const + 1142
2 0x103512c9a archive::File<arm>::forEachAtom(ld::File::AtomHandler&) const + 416
3 0x10352a6a1 ld::tool::InputFiles::forEachInitialAtom(ld::File::AtomHandler&, ld::Internal&) + 465
4 0x10353490e ld::tool::Resolver::resolve() + 48
5 0x1034dec47 main + 679
A linker snapshot was created at:
/tmp/wingOstar-2014-09-26-171939.ld-snapshot
ld: Assertion failed: (memberIndex != 0), function makeObjectFileForMember, file /SourceCache/ld64/ld64-236.4/src/ld/parsers/archive_file.cpp, line 355.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This seems like the kid of error the Xcode developers hope you never actually see...
The part of that message that is likely most useful for searching against will be the ld: Assertion failed: (memberIndex != 0), since that is the root of the error rather than supporting information.
I probably found the same few sources you did, but they indicated that this is caused by corruption in one of the resources Xcode is trying to link your program against, rather than something immediately caused by your own code. A file becoming corrupted by some external action would explain how this can happen despite no obvious changes in your program source.
So the obvious suggestion for fixing this would be to repair the corruption by making sure whatever is causing it gets recompiled. The first thing to do is to completely clean your project so that no older precompiled files are used and all of your own code is rebuilt. Since your error mentions a source cache, follow the recommendation here to wipe all caches, not just those cleared by the Product->Clean option.
The error message also gives a suggestion to use the -v flag to see what ld is actually doing, which may help you narrow down which object files could be corrupt (by showing you which ones are actually used). To add the flag, go to Build Settings in your project's settings, go down to Linking->Other linker flags, and add -v to those. Once you've rebuilt the project, look at the Build messages in the Report Navigator panel, and expand the linker messages for a full list of linked objects. If any of these options refer to libraries you provided, consider deleting and rebuilding them, before cleaning and rebuilding your project again.
I have a program that interfacing SWI-Prolog in Visual Studio. Previously, I used VS2010 (XP) and everything works fine. Then I upgrade my VS to become VS2012 (Win7) and now I have a problem in my code.
When it comes to the following code:
PlEngine.Initialize(param);
it always gives me the following exception message:
The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Can anybody spot what mistake that I made or if possible some modification that I have to do, due to the upgrading process?
Additional information regarding my code:
I used the most updated swiPLCs library (version: 1.1.60301.0)
my 'param' in my code above is: string[] param = { "-q", "-f", #"c:\program files (x86)\pl\"};
I have set the path environment variable to: c:\program files (x86)\pl\ and c:\program files (x86)\pl\bin
I have this setting in my code: Environment.SetEnvironmentVariable("SWI_HOME_DIR", Global.g_prologLocation);
I had the reference to: swiPLcs.dll
I already tried to use the SWIProlog 64 bit, but I still have the same problem
Any help is really appreciated.
Many thanks
I finally got the answer myself.
Unlike VS2010, In VS2012 it seems that you have to add SWI-Prolog package into VS2012.
So add SWI.Prolog package using Nuget.
How?
See: https://nuget.org/packages/SWI.Prolog
And VS2012 will recognize the SWI.Prolog now.
Thanks anyway
Since yesterday I have a problem with Visual C# Express 2010. When I start my app in debug mode, I can't stop id from Visual. It causes Exception:
EventType : clr20r3 P1 : vcsexpress.exe P2 : 10.0.30319.1
P3 : 4ba1faa8
It starts to shutdown and after a while throws another error:
AppName: vcsexpress.exe AppVer: 10.0.30319.1 AppStamp:4ba1faa8
ModName: unknown ModVer: 0.0.0.0 ModStamp:00000000
fDebug: 0 Offset: 0ca09a88
I don't think its problem of my app, because I can push close btn on my app and it closes properly.
Do You have any ideas what could cause the problem and / or how to fix it?
This might be a crazy idea, but can you go back to the source of your project from the day before? It may not be your app, but it may in some odd way. Try debugging an earlier version of your app to see what happens.
If it runs ok, try to incrementally make the changes since that version to see whree it breaks.
I saw odd debug behavior years ago that ended up being related to some COM objects I was trying to use. Not suggesting you're using COM objects, but I too assumed it was VS's problem. It wasn't.
I was trying to solve the problem for quite some time. Then I left the project for a while and work on sth else. Recently I was reprogramming the project again and there were some problems again. I had no idea so one more time i reinstalled all dotNets and Visual Studio. What a surprise - problems are gone.I guess another mystery I can put into Microsofts X-File.
Thx for Your answers.