Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
A quick question here lads, cannot run a visual studio project on another machine, receiving the CLR20r3 System.IO.DirectoryNotFound. The thing is that it has all resources needed inside the exe itself, and it's launching perfectly for me, both on debug and release versions, while crashing on any other machine. What can it possibly mean? Tried creating an installer, of course, same result. Works for me, doesn't work for others.
Thanks in advance.
Looks like the directory that you are trying to find is not present on the other machine.It would be hard to find and fix this error without knowing from where exactly the exception is thrown. Better add a try catch and log the exception somewhere like a text file or a remote database. Once you are able to get hold of the line where the exception is thrown and the actual exception, it would be lot easier to fix it. Hope it helps.
A silly mistake with not uploading properties with the project. And some weird problem with custom font, had to refer to it from properties directly. Case closed.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
How i can add code editor C#,which will compile the code in live
I tried something with Ace, but nothing so far
Thank you.
If I understand correctly, you want to propose an input to user. They had C# code (no matter what) and your server executes it.
If yes, take a look at that.
It creates a project and build it in memory before executing it.
Be careful cause if you execute the code no matter what it will be a security breach into your server. For example, someone could execute a code which will download a file onto your server and open a backdoor to it.
Check this site:
https://dotnet.microsoft.com/platform/try-dotnet
This is embeddable .Net compiler which you could use without any preparations and setups
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
This is more of a blanket question than specific, but in my case I have a program I was given, but unfortunately it's broken. (It worked before, which was a while ago)
The program is a C# WPF .exe, but I'm just learning programming and I have no clue how to fix it. I can view the code behind it, I think, when I decompile it (dotPeek, but it seems to be read only), but I've no clue how to edit and recompile the program to work just like previously. I tried googling but I wasn't sure what terms would answer this question and the ones I've used proved fruitless.
Tl;dr - how to modify programs (especially C# WPF .exe)
Incorporated comments from #PaulF:
Programs don't tend to break of their own accord - beyond getting corrupted - if that is the case then decompiling wont work. So you need to understand why it has stopped working - it is likely that a decompile & recompile will not work. What has changed from when it worked to when it stopped working (maybe operating system version or PC)? Can you go back to a state where it was working ?
If that's not the issue, then:
Do you have access to the source code? If not, you cannot make it work without re-writing it and re-deploying it, which isn't a bad thing. Then you would be able to have the source code and hopefully source control it.
dotPeek allows you to see decompiled code, but you cannot do anything to the file safely.
Those are about your only three options:
Figure out what dependencies/configurations have changed
Get the source and modify that
Re-write it
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I wonder is there a way to save errors and exceptions to sql database to see all my mistake later? Copy and paste are easy way. I searched codes to save errors but found nothing. Please help.
Use ELMAH (Error Logging Modules and Handlers) library. Log the errors in try catch. ELMAH exposes errors as URL to view logs like http://domainname/elmah.axd.
There is a useful library called NLog. Read through the documentation, it's very easy to set up and use. And this Wiki will walk you through setting up a database target.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
Okay, so hopefully the issue was explained properly in the title, but if not then basically in my program I have an array which is loaded with a ton of data straight off a .csv file when the program is launched and so I need to make it so that when the set up is run the file destination of the .csv in the code is correct.
Otherwise it won't load the array with anything and so ultimately my question is how do I do that? Here are some screenshots of what I've already tried, and some snippets of code, if anyone could even point me in the direction of a YT video that may even be helpful enough, thanks StackOverflow users. https://pastebin.com/cEmZxujx
Maybe check the reference with
System.IO.File.Exists("filename")
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I'm trying to run my .exe file for a console app I made. When I go to /bin/debug/~~~.exe it won't run. However, it still manages to build from inside Visual Studio.
How can I get this to work?
I have experienced the same situation, my exe is just a simple Hello World console. After a lot of trials and errors, I figured out it is just my antivirus (Avast Free Antivirus) pausing it. Whitelisting my exe solves the problem. Hope it is your case too.
Its my antivirus which is blocking my application. After uninstalling everything is working properly.