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
Related
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 9 years ago.
Improve this question
How can I tell the difference between source and published .NET code?
I am looking at some inherited code that I have not touched in about a year. The original designer had me first publish locally before uploading the published code to the internet server. Now I am looking a number of backed up source folders as well bas backed up published folders. I should have done a better job at naming the folders, I guess. Now I wonder: How can I tell the difference between source and published .NET code? Is there some easy way to see if some folder that contains only published code is lacking a file or xml setting?
As changes are made, they are published in the UI, so that means there should be some new files, or deleted files, and the directory tree may not be 100% the same. What you could do is download the deployed code to your local machine, and use a tool like Beyond Compare or some other directory comparer and let it determine the markup changes for you. There are several tools that do a good job for this.
That would give you an idea of the difference between files, but won't parse DLL's. That you would have to use a tool like reflector or Telerik's JustDecompile to compare the code, but I really wouldn't go that far, but you could.
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 9 years ago.
Improve this question
I am programming in C# since half a year. I have made a database project. What I want to do is, now that my project is finished, I want that no one should be able to edit any of the code of my C# project. How can I make my C# project uneditable?
You can hide give out DLLs of the compiled code to others, which they could then use without being able to see / edit the source code.
You can't make code permanently read only / I can't think of a reason why you'd want to (since if you had a bug you'd need to edit this code). However if you put your code into source control (e.g. TFS (free for small teams at http://tfs.visualstudio.com)) you can have a copy of your code with a full change log, so even if someone changed it, you could pull back a version as of today which didn't include their changes.
Alternatively you can use file permissions to stop others from editting the code, or make the files read only if you're worried about accidentally updating the code - but you'd still be able to edit it by amending those permissions / removing the read only flag at a later date.
As others have indicated you cannot really make your code readonly. What you can do is sign your assemblies. Other people will still be able to read and change your code. But as long as you keep your private key private, they will not be able to create the same signed assembly.
This does require that all the assemblies you reference are signed as well and that you store your private key in a safe place. If someone else gets your key, he or she will be able to recreate your assemblies, if you loose your key you will not be able to recreate them.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm starting on the second version of a large Solution/Project that I created and was wondering about the best way to go about it. I'll be changing allot of the core code, classes and projects of the solution and that makes want to make this into a separate solution and separate repository.
I've never really started on a version 2 before, so if anybody could give me advice on the best way to go about it I would truly appreciate it.
For the record I am coding in C# and using VS2012.
Thank You
Create a Branch in the repository called Version2 or something (maybe a better code name) and do all the new dev work in that. That way you still have the original Trunk if you need to go back to it. Maybe also create a Tag with the current project that will never change so you basically take a snapshot of it before making any substantial changes.
I usually keep everything in one solution and just evolve the solution. There are several benefits to this:
You refactor your tests along with the project (hope you do have some!)
Keep a tracked version of all the changes in your source control
It's easier to make sure your project is still stable after the refactoring by running test suits or running the executables in debug mode
It is safer to refactor little bits and peaces, than a global re-write, there is a risk you will go a little bit to far with refactoring
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 7 years ago.
Improve this question
Members at work have come across a C# project posted on Google code that provides a nice solution to a problem they have in a current project. What are the implications/restrictions on using those ideas (or in some cases code snippets) to use in their own project?
I must express that my colleagues are not trying to rip off somebody else’s code and call it their own, but like the way that the Google project is structured and tackles a specific problem. I believe they are looking to refactor their code to a similar architecture and use one or two code snippets from the source code.
The code itself does not come with any licence or terms just a solution.
I have never come across this before but don’t want to get involved doing this work if it I could be liable to comebacks. I have suggested that some form of recognition be added to the code pages that use any snippets.
Thanks
If there are no license or terms you cannot use any code snippets from the original work. Ask the creator of the original work for permission to use it in the way you like.
https://stackoverflow.com/questions/1190628/what-license-is-public-code-under-if-no-license-is-specified
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
A couple of months ago I've coded a tiny tool that we needed at work for a specific task, and I've decided to share it on CodePlex. It's written in C# and honestly it's not big deal but since it's the first project I've ever built from scratch in that language and with the goal of opening it from the very beginning, one ends getting sort of emotionally attached to it, I mean you'd wish that the people will actually participate, be it criticism, bug reporting, or what have you.
So my question is, what can I do to actually encourage participation, stimulate curiosity or just recieve more feedback about it?
By the way this is the project I'm talking about: http://www.codeplex.com/winxmlcook/
You should:
Promote it where you think it would be relevant (forums,mailing lists etc.). Try not to spam though - it will create a backlash.
continue to provide updates as to create the appearance of an active project until more people pick it up.
Find project leaders, they are the sort of contributors that encourage others to contribute as well.
Blog about it and link to relevant blogs (creating ping-backs). Also leave comments at relevant blog posts.
Basically, your generic Internet marketing tactics ;)
You first have to acquire users by marketing the tool. Once you have users, that naturally means you'll start getting feedback.
One thing I noticed is your project description doesn't sell the project well. For example, type "winxmlcook" into Google, what gets shown is your project description but it's not likely to get someone to click on it.
I know I sound like a broken record constantly posting this book, but just about everything you could ever need to know about running an open source project is here. In particular, pay attention to these two chapters:
Getting Started
Managing Volunteers