Showing posts with label visual studio. Show all posts
Showing posts with label visual studio. Show all posts

Wednesday, March 7, 2012

github first time

GitHub is free for open-source projects, so let's try to make the excels / forms i've been using into a web project using VS2010.
Since i'm fairly new with VS2010 i went with the usual Web C# project. Installed Git Extensions and followed:

http://help.github.com/set-your-user-name-email-and-github-token/
http://help.github.com/create-a-repo/

Now i created a VS Project inside that directory and when i tried to push i got an error. "No supported authentication methods available"

So, it ends up you need to create a ppk file and configure putty to use it (if you installed github with putty = the default option).

Go ahead to Remotes -> PuTTY -> Generate or import key. Now, go to Conversions -> Import key. Browse to the .ssh folder, and find 'id_rsa' (it was named exactly that here, WITHOUT an extension). Select it, and press open. Enter the password for your key (this is the key that Git uses to communicate to the GitHub server, as it appears). Then, select Save Private Key, and save it somewhere (I did in the .ssh folder)

Now you have the option select the ppk file when the "No supported authentication methods available" arises, and it should work. (of course, you need the private key, silly!).

http://stackoverflow.com/questions/6138493/unable-to-push-to-repository-using-git-extensions

Tuesday, March 23, 2010

Subversion reported an error: 'path' is already a working copy for a different URL

If you want to create a new directory in a subversion server, but the local copy has already been linked to another directory/server you will get this error. Most of the fix for this on the internet will point to use svn commands. This might not be the case, since your old remote directory/server might not be available, and you might be using a client like Ankh where command line implementation is limited.

Ankh will spread a hidden .svn directory in every directory that has been linked with the old remote server/directory. Ankh also creates a ankh.load file in the project root.

The solution is to remove all this .svn directories and ankh.load file. This will make sure your local code will loose link with the old inexistent repository. You can do this by creating a .bat file with the following single line:
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q "%%G"
The usage is simple:
deletesvn.bat "c:\projects\project1"
(if deletesvn.bat was the name you gave to your batch file and c:\projects\project1 is the root of the directories linked with the old repository)

TIP: Make sure your batch file deleted all .svn directories and you manually deleted the ankh.load file before trying to create a new directory on the new repository.

Wednesday, March 17, 2010

Warning: the dependency 'file' in project 'project' cannot be copied to the run directory because it would overwrite the reference 'file.'

In Visual Studio 2003 (.net 1.1) you will see this error on your compiler everytime you update the version of a dll on the reference.
The official fix will tell you to add the dll to the GAC, or to make a link to the project (projects -> add reference) instead of linking to a file. If you link a project you can make sure that you recompile the projects from which you depend on. If you put the dll in the GAC, GAC will do version control for you.

The stupid thing about this error though, is that you don't really add version information when you first link the dll, and most times you just want to upgrade the dll version, not keep both of them, so what's the catch?

It seems that this error will occur if you use VS.net dll reference property "copy locally". If you set copy locally to false for each dll referenced and copy them by hand to the bin (or whatever folder you choose under project properties), the error will disapear. The error is misleading since, as far as i can tell, the conflict happens when VS will try to overwrite the file with itself.

I'll buy a coffee to the person that can tell me what is the internal file where VS is recording the referenced dll version information.