.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

MSBuild: Best Practices For Creating Reliable Builds, Part 2

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

Find out here how you can use MSBuild to better manage and control large build projects in Visual Studio.

Sayed Ibrahim Hashimi

MSDN Magazine March 2009

View Complete Post

More Related Resource Links

MSBuild: Best Practices For Creating Reliable Builds, Part 1


This article describes some basic practices and techniques that you can use in MSBuild to better manage and control your build projects in Visual Studio.

Sayed Ibrahim Hashimi

MSDN Magazine February 2009

Creating a Basic SharePoint Web Part

This programming task includes the steps for creating a basic custom Windows SharePoint Services Web Part. It is a simple Web Part that allows you to change the Web Part's Title property, which is a Windows SharePoint Services WebPart base class property that sets the text in the title bar of the Web Part.

Creating a SharePoint 2010 Web Part That Can Read and Write Data to an External Data Source

Learn to use Visual Studio 2010 to create a Visual Web Part that uses a BCS external content type in SharePoint Server 2010 to read and write data to the AdventureWorks sample database.

Sample: Creating a SharePoint 2010 Web Part That Can Read and Write Data to an External Data Source

Explore the code in this visual how-to article as you learn to use Visual Studio 2010 to create a Visual Web Part that uses a BCS external content type in SharePoint Server 2010.

SPFeatureReceiver: Creating report viewer web part programmatically


I have a feature that adds a report viewer web part (SP integrated mode) into the newly created site page.

Problem: The feature activates without any problem through the UI, but I cannot activate it through STSADM (which will be the case when going to production).

Here is my code block that adds the web part to the page. This code block exists in FeatureActivated:

Assembly currentAssembly = Assembly.GetExecutingAssembly();
string dwpStr = string.Empty;

    using (Stream resourceStream = currentAssembly.GetManifestResourceStream("Report.dwp"))
        using (StreamReader sr = new StreamReader(resourceStream))
            dwpStr = sr.ReadToEnd();
            dwpStr = string.Format(dwpStr, web.Url);

    using (StringReader sr = new StringReader(dwpStr))
        string err = string.Empty;
        System.Web.UI.WebControls.WebParts.WebPart wp = wpMan.ImportWebPart((XmlReader.Create(sr as TextReader)), out err); //Exception thrown from this line
        wpMan.AddWebPart(wp, "HeaderZone", 0);
catch (Exception ex)
    //Log errors
Report.dwp is as follows:
<?xml version="1.0" encoding="utf-8"?>
<WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&q

Problem re-creating web part page



I've got some web part pages which are being setup programatically. I want to be able to refresh those pages, i.e. delete all webpart on them and recreate the content from scratch. When I try this, the following exception is thrown:

The transformer type "Microsoft.SharePoint.Portal.WebControls.TransformableFilterValuesToEntityInstanceTransformer" is not allowed to be used on this page.

The exception comes from the following line:

SPWebPartConnection newConnection = wpmngr.SPConnectWebParts(providerWebPart, providerConnection, consumerWebPart, consumerConnection, transformer);

So I thought "let's delete the page and then just recreate it". Doesn't work either, same exception is thrown. I have no idea why this code would work the first time, but doesn't work a second time. It seems like something get's stuck preventing the same action twice, but I have no clue what to look for.

MCTS in Web Application Development in .NET 2.0

Creating a custom search Web Part to Search the Document Libraries only with in a site and its subsi



I am trying to write a code for a custom search which will search only the Document Libraries and Display the results.

I thought of using CAML for this but i am not able to send the search word from a textbox to a CAML query.

this is my code


void ExecuteKeywordQuery(string querytext)



SPSite site = SPContext.Current.Site;


SPWebCollection webs = site.AllWebs;


Best Practices For Creating MenuITems in WPF



I am new to WPF and want to know if there are some guidelines to follow if we are creating menuitems specially using MVVM. We have the application that's way complex and we have redundancy in menus that we need to remove. SO wanted to know if any body can help me in this. Can we create some separate xaml where we can put common menus and then use them.

thanks in advance.

Creating a Text change event as web part



I have a list, in which I have added a column( asp.net textbox) using SharePoint designer.

I want to create a web part, in which on the textchange event of the textbox, i want to do some server transactions and update another asp.net textbox in the list page.

I have created the list. Created a textbox and in the Textbox datafield, associated it with the column created in list through the site.

How to create a textchange event as a web part?

Thank you

Creating a web-part in sharepoint showing charts connected through a database

here's what I intend to do: 1) Import data from a database(through creating a connection to database) 2) create a graph or chart using the values from the database(in excel) 3) then import that chart to the sharepoint site as a web-part. My question is how to accomplish the task. (all the three steps) So, whenever the values are updated in the database, the sharepoint site will be automatically updated. Any help would be greatlly appreciated.

Sample: Creating Simple Web Part Mashups with InfoPath 2010

Explore the code as you learn to create a simple Web Part mashup on SharePoint Server 2010 with InfoPath 2010 and the InfoPath Form Web Part.

Creating a Simple Web Part Mashups with InfoPath 2010

Learn how to create a simple Web Part mashup on SharePoint Server with InfoPath and the InfoPath Form Web Part.

How to automatically enable web part connections when creating a publishing page based on a custom p


I have created a simple custom page layout in SharePoint Designer, added a couple of web part zones, and a custom web part on each zone.

These web parts have a custom provider-consumer set of interfaces. I configured the connection between the web parts in SharePoint Designer (using Add Connection wizard), and saved the page layout.

After that, I checked in the layout and approved it in SP's web interface.

Finally, I created a Publishing Page based on my layout, but the connection between the web parts was not set. I can set the connection manually and it works fine, but I would like the connection to be automatically set on each page I create based on the layout.

Is this the expected behavior? If so, is there a way to configure the connection automatically either programmatically or declaratively?

Is there a step I'm missing?

Creating My Site collection on new web app causes web part errors


I'm configuring a brand new SharePoint 2010 Enterprise instance for the first time.  We have 2 WFE, 1 app server and 1 DB server.  Having read it is best practice, I created a new web application for My Sites.  I chose to use the same IIS site and IP address as the main SharePoint site collection but a different host header (my.sharepoint).  The problem I've come against is that opening http://my.sharepoint from any location except the application server throws a bunch of web part errors.  (Web Part Error: This page has encountered a critical error. Contact your system administrator if this problem persists.)  However, when I open the site from the application server box, I don't get the errors.  I think the problem has to do with the WFEs.  I'm seeing a bunch of DCOM errors on the WFEs complaining about security but I don't know if that is related or how to change the security of the DCOM components, the buttons are greyed out.

Can anybody help me start trouble shooting this? 

WPF: If Heineken did MVVM Frameworks Part 4

MVVM is to have an instance of a particular Model (say currentPerson) inside my ViewModel (say PeopleViewModel) which is exposed to the View (say PeopleView). The View binds and edits the Model directly.

This definitely flies in the face of what most people consider to be the holy grail of MVVM pattern, but it's a fairly new pattern, so people are still finding their way with it every day, and this works for me very well. The reason I do what I do, is for the following reasons:

1.I have always had the luxury of being able to write my own UI specific Model classes. I would even do this if I was using some other Model classes first, such as LINQ to SQL or LINQ to Entity Framework. As these classes don't have everything a proper WPF Model class needs in my humble opinion. Though, they are pretty good, as they are Partial classes and use INotifyPropertyChanged/DataContract etc etc
2.I am a pragmatist and I do not like writing code for the sake of writing code. I have seen some MVVM apps where the author has had a Model with 50 properties on it, that are simply repeated in the ViewModel abstraction, where the ViewModel added nothing. On that day I decided I would never do that unless I have to.
3.I honestly see no harm in writing directly to the Model from the View, JUST SO LONG AS if the Model is InValid its data NEVER makes its way to the database. I honestly see no pro

ASP.NET Best Practices for High Performance Applications

This article lists the techniques that you can use to maximize the performance of your ASP.NET applications. It provides common issues, design guidelines, and coding tips to build optimal and robust solutions.

Creating your SharePoint Governance Plan

One of the most common questions that I get from prospects as I'm talking to them about the creation of a governance plan and process is what does it look like. In other words, there are materials available which describe what should be in a governance plan but there isn't a ton of guidance on what the process of creating a governance plan and process are.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend