Wednesday, July 30, 2014

Updating package wtih nuget, installs fine, the reference is there, but when you compile, it says it's not there?



At work today, we had updated all out NuGet packages for our internal libraries.


I applied them to one of my solutions, a ton of projects...


most of them were fine... but for some of them, even though I could see the reference,
when I compiled it, it said the reference wasn't there.


Intelligence saw it, and my using statements were not RED..


WTF!


The answer of course is, assumptions...


Turns out, that the project in questions was referencing .Net4.0, and the Package referenced 4.5


there was even a yellow warning about it in my output window after the compile...
but who looks at those!(DOH)


I hope this saves someone else the pain...

Friday, July 25, 2014

Updating a large Soloution with lots fo projects wtih Nuget? How to remove the suq! (Nuget Commands to Remember #2)





Say you've got a large *.sln and it has lots of *.csproj s in it... and you made a fundamental change to nugget packages...


Updating it manually package after package and project after project, is uber painful... aka "The Suq"
I found several neat commands in NuGet that work across solutions Here: StackOverflow
but this is my favorite... In vs2013 (I have not tried it in earlier version of NuGet) at the
PackageManagerConsole Prompt type this
Update-Package
Then hit <return>, it will go through your packages, one by one, checking to see if it needs updating in EACH Solution.



Let it chew and your entire SLN is updated...
Man that ROCKS...
Hope you enjoy it.

Monday, July 7, 2014

Where do we keep the excel data sheets...

I keep forgetting where we put this excel sheet at work,
I'm making a not e to myself where it is.


D:\TFS\_Deployment\EFolderReportGenerator3G\SqlExcelSheets\



Copying a soloution to a new soloution, and renaming.





Often times, you want to take an existing project and reshape it into something new. This is especially true with utilities and other small project that you create to make your life easier.




Here is a quick and dirty SLN copier and renamer I wrote. It comes with the "It worked on my box" certification.




https://drive.google.com/file/d/0B8Bg9eVVQhaYTlEtQXNCUGpKSlk/edit?usp=sharing




It basically brute copies the entire directory tree, searching each file/folder name and each file contents for the SLN name, and replacing it with the new sln name.




Note that you can't use the old sln name in the new sln name. so BOB to BOB2 will fail...
but BOB2 to BOB will work okay.


I hope you find it helpful.

Wednesday, July 2, 2014

Sql thread blocking.





If you 've never dealt with a blocked Spid in SQL, it can be pretty intimidating...




But really it's pretty basic...




One thread (spid) has locked the table to modify it, and hasn't let it go.


Usually this is just a SQLcommand that's you've sent and you forgot to commit it.


Find that command and add the commit and you're all good. Usually...