Nuget Package Manager a very useful Visual Studio 2010 Extension

Sorry folks i have not penned any article since a long time as i was busy with life and wasn’t able to spare out much time for blogging, but from now i will try to post useful things as soon as i find a little time. For today i found out this very useful Visual Studio 2010 Extension called Nuget Package Manager. The beauty of this application is that you get a whole lot of third party dlls at your disposal to use in your application. It will add the references to your application directly and there is no need to download the dlss and include in the project and secondly it will modify your web.config files also automatically. So you just have to click like you did traditionally as “Add Service Reference” and you are ready to go… For installing Nuget Package Manager Extension go to the link http://visualstudiogallery.msdn.microsoft.com/27077b70-9dad-4c64-adcf-c7cf6bc9970c

 After installing nuget you will find it inside the Extension Manager in Visual Studio

 Now in whichever project you want to add any third party assembly you can right click on Reference and do an “Add Library Package Reference”. It will open the Library Package Reference manager for you.

 This manager will display all the available libraries and third party assemblies on Nuget, you can selecte any of those to be added into your project.

 Just select the assembly which you want to add as an example i have added the ELMAH assembly for giving the project an error logging mechanism. Similarly you can add a lot of other assemblies with the help of Nuget. All in all its a very good extension and you need not code anything to add those references and also you needn’t make any changes in your web.config manually, everything is done for you automatically by Nuget.

Its a very good tool which .net developers can leverage to generate cleaner and quick code. Happy Programming !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

del.icio.us Tags: ,

Cannot get the list of output files from the project

If you are a Silverlight developer who likes to keep himself updated on the latest stuff around in technology then you might face this problem. Actually this happens when you upgrade your system to VS2010 , by update i don’t mean that you are changing the target framework to be used to .net framework 4.0 update here just means that your .csproj file now knows that it has to open itself with VS2010 but after sometime if you feel that VS2010 beta is unstable, which looked to me also then you want to revert back to old and tested VS2008 everything can be reverted back without problems but when you will build the project in VS2008 you will notice that it complains “Cannot get the list of output files from the project” this is because the ToolsVersion used is still 4.0 The simple solution is to just go to the .csproj file in any of the text editors and modify the ToolsVersion in every project in the solution which contains your silverlight project. Just replace the ToolsVersion = 4.0 with ToolsVersion= 3.5 and your solution will start working again. That’s it. Happy Programming!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Error 1 The “Validatexaml” task failed unexpectedly.System.IO.FileLoadException.Could not load file or assembly.

If you are facing the ValidateXaml exception and your build fails then it might be due to the new feature of blocking the downloaded content. This means whenever you download a project from the internet it is quite likely that windows will automatically block its content for few dll’s and if it’s so you will get this error. So the easy solution is to look for the file for which its complaining as in the above solution its the Activity control for which it’s complaining, so just navigate to that file right click on the file and press unblock and that’s it , go  and rebuild your solution and everything will work as desired. I have myself faced this problem in Windows Server 2008 and Windows 7. You might try this also in Windows Vista as well.Hope this helps. Happy programming !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!