Start Detached AddIn

יום שני, אוגוסט 18, 2008

This Addin add new option to the debug menu for each project (When right clicking from Solution  Explorer).   Features Starts a new instance for the selected project. In case the project is not executable, a dialog is popped asking the user what to do.   Requirements Microsoft .NET Framework 2.0 Visual Studio 2008     For more information click here.   Download Version 1.0.0
6 תגובות

Build Error on empty lines in Post-build event command line

יום ראשון, יולי 6, 2008

The following error message raised when trying to compile a Project with an empty line on the Post-build event command line:   The empty line in the Post-build event command line:     Resolving this problem is simply to delete the empty line in the Post-build event command line.
תגיות: , ,
אין תגובות

Code Snippet RW (Response.Write)

יום ראשון, מאי 4, 2008

Code Snippet For Response.Write   Ok, this code snippet must be the oldest trick in the book, but still I think it will help to developers how doesn't know about it.   1. Create a file name rw.snippet 2. Copy this XML code and save it. 3. From the tools menu in VS, select "Code Snippets manager". 4. Select import, and point it to the saved file. 5. To use the snippet write rw in the code editor. 6. Enjoy!   <?xml version="1.0" encoding="utf-8" ?> ...
2 תגובות

LINQ To SQL – Performing Inner Join Queries

יום ראשון, פברואר 24, 2008

Its amazing how simple it is to create inner join queries with LINQ.   Assuming you have the AdventureWorks Database installed.   public void GetEmployeeByID(int employeeID) { AdventureWorksDataContext aw = new AdventureWorksDataContext(); aw.Log = Console.Out; var entities = from e in aw.Employees join ea in aw.EmployeeAddresses on e.EmployeeID equals ea.EmployeeID ...
תגיות: , ,
אין תגובות

LINQ To SQL – Get the SQL text query

Usually when we perform a LINQ Query on a SQL table, we don't see the actual query. Assuming you have the AdventureWorks Database installed. To see the query text, use the Log method: aw.Log = Console.Out   public List<Employee> GetEmployees() { AdventureWorksDataContext aw = new AdventureWorksDataContext(); var employees = from emps in aw.Employees select emps; aw.Log = Console.Out; return...
תגיות: , ,
אין תגובות

JOY, Visual Studio 2008 JavaScript Inteliscence Support

יום רביעי, דצמבר 5, 2007

Yet, another great feature in Visual Studio 2008. JavaScript Inteliscence This is wonderful, i can finally write JavaScript prototypes and see them in the Inteliscence. It was so hard to write Object Oriented in VS2005 because of no Inteliscence support.   To see this in action, first, I've created a new JS file called JScript.js, within i created a new class called Test(). Then i created 2 new prototypes function under Test() called DoSomthing1() and DoSomthing2().   Then i created a new instance of Test(), and here you can see my methods under the Test class.     Even more, when i created a new ASPX file, and...
תגיות: ,
אין תגובות

LINQ – Handling Legacy Code

יום שלישי, דצמבר 4, 2007

LINQ is for queries, no doubt about it. Yet - we can do some interesting thins with LINQ, and not just queries. For example, we all deal sometimes with legacy code inherited from some old project - so here some interesting ways to handle this code with few simple lambda expressions.   For this example, I will use this Employee class: public class Employee { public Employee(string firstName) { this._firstName = firstName; ...
תגיות: , , ,
2 תגובות

WCF – IIS Integrated Security

Usually when we developing a WCF service in Intranet environment, we need to enable users to authenticate on IIS with there login credentials - Integrated Security.   Assuming we using basicHttpBinding and we host the service library on IIS web site, This can be accomplished by the following settings: <bindings> <basicHttpBinding> <binding name="basicHttpBindingConfig"> <security mode="TransportCredentialOnly"> <transport...
תגיות: , ,
אין תגובות

WCF – Binding and Security

יום שני, דצמבר 3, 2007

How do we know which binding to use and when? How do we know which security schema goes with our selected binding configuration?   There's allot of considerations with the binding configuration: Is there IIS involved. Are we going to use IIS Integrated Security. Are we going to use net.tcp binding?   There's also security issues we need to address: How we going to secure our services communication. Do we use the...
תגיות: , , ,
אין תגובות

LINQ to SQL Classes

יום רביעי, אוקטובר 31, 2007

One can only wish everybody to speak LINQ!   The following solution demonstrate how to query database tables with object relational data classes. For this example you need to download and install the AdventureWorks Database provided by Microsoft.   First, create a new console project:    Open the "Server Explorer", click on the "Connect to Database" button:   Select the Microsoft SQL Server:   The next step is to connect to your AdventureWorks Database Server, from the "Add Connection" window. Select the appropriate Server and Database (AdventureWorks) and click OK. After that, you should see the AdventureWorks.dbo in...
2 תגובות