Using GIT with Visual Studio and a Local project

Git usage with visual studio has become easier in recent times, but I always still have a bit of a headache remembering a few basic items. For instance, I use bitbucket.org for a lot of private repositories, and I often will have source code on my local machine that I’d like to add to git and then sycn with bitbucket. Visual studio seems to not like creating a new git repository in a folder that has files in it already, but I don’t usually want to move files into a new folder. Apparently I have to drop to the commandline and run:

cd <my project path>
git init

After this, you can go back into visual studio and add the newly initialized git repo to it, while you already have the solution open: go to Add, then navigate to the folder and add it.

Then, do a commit.

Then, you can go to sync, to sync it with bitbucket- but you’ll need to go to bitbucket and create the repo there first, then copy the url to the repo. Enter this in the visual studio prompt and then complete the sync.

 

 

Could not load file or assembly Newtonsoft.Json

I’ve run into this problem a few times, usually when source control is involved. 

-Delete the package from you /packages folder

-open nuget package manager, it will notify that things are out of sync- click the resolve button. 

-if you have version conflicts, edit your dependentAssembly bindingRedirect so that the older version(s) are redirected to the newer. 

-You may also try uninstalling using nuget and reinstalling, but this usually doesn’t fix everything. 

VDPROJ in Visual Studio 2012

Seems a lot of backwards steps being taken by MS as they progress “forward” (see: Windows 8, Metro, Silverlight, etc).  In the world of .Net development, a recent one to bite me was the fact that .Net 4.5 is not supported on windows xp.

 

But a strange one this is- Visual Studio 2012 no longer support the VDPROJ project type- this is the delployment project type often used for winforms or wpf apps. I’ve tried using clickonce and it works… 80%… which means it is 20% completely unuseable.

The VDPROJ project type was nothing great, more frustrating than useful. But it was the best thing around for throwing together a quickie installer to get out the door. If I recall, the MSI format it used is getting phased out as well (another Win8 victim if memory serves), so it makes some sense that they would no longer support it.

The odd part though is that no good or improved replacement was brought in. MS recommends using a light version of installshield. Ok sure, now we’re being forced back into a third party solution.

MS does also recommend using WiX, an XML based deployment build toolset… at least I think that’s what it is. It has no built-in support in VS2012, and apparently I’m now supposed to become an expert at manually editing XML files to make a deployment project. Huh??

So, great, my quickie update to an old project today has turned into an exercise in figuring out some new deployment technology and fiddle with it all afternoon to try to get back to the point my vdproj already had me at years ago. Thanks MS…

CS0433 in ASP.NET

Recently had some work done in ASP.Net, but when I published the project on the server, I kept getting compiler errors- complaining about missing an object type, and spitting out a bunch of references to the asp.net temporary folders.

The first inclination is that there is junk in those temp folders, so delete them and try again. Same error.

After trying a few more things, finally found it: The project was last compiled in debug mode, but when running the “publish project”, the release option was selected. Apparently this pulled some out-of-date files from the Release folder to be published. Switching this to debug fixed the problem, and I assume switching the actual project to release mode and recompiling would have fixed things as well.

Logged here for the inevitable revisitation of this project in the future ๐Ÿ˜‰

Installshield sucks. Thanks Microsoft.

Adding an installation project to my solution in vs2010, i notice an “installshield le” option for installation projects. ok, whats this? I do some research and apparently microsoft is abandoning their own installation projects, and will be moving everyone to use this “light edition” of installshield in the future.

I’ve used installshield in the past. Surely it’s not as bad as it used to be.

I add the new installshield le project, and am instructed I need to download it. this requires registration with “flexera”, who apparently now owns installshield, or whatever. create an account, give all my personal info. get a registration key in the mail. download installer and run it.

now, go back to visual studio, try to add the installer project again. Please enter serial number first problem – error, cant authorize. what? go through registration process again and try with new key. finally works.

now i finally have an install project in my solution. go through the setup steps using the weird navigation system (yes, it’s weird).

ok, we’re ready! build. what? errors?

get some kind of crazy “cant set codepage for lcid 1033”, as well as some other nonsense. click the error message, and am take to the “flexera” site, which lists a bunch of matches on this error message. no real solutions found, the matches listed date back to 2009 and 2007, so definitely not something new. I still haven’t resolved this, but do not look forward to dealing with it.

So, not much has changed. Same old cryptic BS dealing with installshield, and apparently microsoft has given up trying to provide something better. So this is what you get with a mult-thousand dollar license of visual studio 2010. Thanks Microsoft! for the opportunity to remember something i hate worse than crystal report.