Archive for the ‘Visual Studio’ Category

Dump SQL Server Express’ DB Schema

Wednesday, June 4th, 2008

I am quite feeling lost since SQL Server 2005, SQL Server Express don’t come with the "Enterprise manager" any more… I used to do many stuff under that Enterprise manager for SQL Server 2000 before.

One simple task I need to do is dump my database schema and transfer to another server, I can easily do that before in Enterprise manager, now I don’t even know hot to dump and generate the SQL statement… fortunately I found this tool:

http://www.codeplex.com/sqlhost

Database Publishing Wizard

Download the Current Release (1.1)

Localized versions of 1.1

The Database Publishing Wizard enables the deployment of SQL Server 2005 databases (both schema and data) into a shared hosting environment on either a SQL Server 2000 or 2005 server.
The tool supports two modes of deployment:

  1. It generates a single SQL script file which can be used to recreate a database when the only connectivity to a server is through a web-based control panel with a script execution window.
  2. It connects to a web service provided by your hoster and directly creates objects on a specified hosted database

The Database Publishing Wizard provide both a graphical and a command-line interface. In addition, it can integrate directly into Visual Studio 2005 or Visual Web Developer 2005.

Problem of Team Explorer after installed Visual Studio 2008 SP1 beta

Tuesday, May 27th, 2008

Problem:

  Visual Studio Team System 2008, SP1 beta1, .Net 3.5 SP1.  After install Team Explorer, every time when I try to open a work item, a error show up:

Could not load type ‘Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemDeniedOrNotExistsException’ from assembly ‘Microsoft.TeamFoundation.WorkItemTracking.Client, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f11d50a3a’.

Found it has been discussed here:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3380330&SiteID=1

Solution:

Reinstall VS 2008 SP1, problem resolved.

ASP.NET MVC + Dynamic Data Sample

Friday, December 14th, 2007

ASP.NET MVC and Dynamic Data are both nice stuff, can they work together? sure! David just blog about it:

Will this work with MVC?

In this initial Preview, Dynamic Data is mostly targeting ’standard’ ASP.NET pages, but we are absolutely planning to support Dynamic Data for MVC.  And the good news is that you can actually try this today!  To do this:

This was completely unadvertised, so most folks probably didn’t see it, but it’s in there for you to play with!  Start by just running it, and then look through the source code, which is all part of the solution.  Of course, it’s all very preliminary, and far from feature complete, but it should give you an idea of where we’re heading.  If there is enough interest, I’ll try to make a screen cast that shows it.

The ASP.NET MVC Toolkit provides HTML rendering helpers and dynamic data support for MVC, it’s separated from the CTP install package.

This is how the blog sample works:

Controller, inherit from DynamicDataController, defined inside the toolkit.

namespace Blog.Controllers {
    public class CommentController : DynamicDataController<Comment> { }
}

The DynamicDataController will render some aspx views default inside “view/shared”.  In the example, the view post define its own view in “view/post/Show.aspx”, since ASP.NET MVC’s RenderView(”Show”) will fist look inside view/<controllerName>/<viewname> first, the customized version will be used over the shared one.

The default “Dynamic Data web” project created by template have very different structure than the MVC Dynamic Data demo project.  I wish in the next release, tge MVCDynamicData can be included by default.

What I expecting is the feature that user can drag database table columns into a web form, and generate the CRUD scaffold with those web form, in that case, database centric web develop will be much easier.  (though FoxPro, PowerBuild, Delphi, or maybe VB,  have this kind of feature for many years)  That’s something that I expected for a long time, can’t believe  this kind of solution doesn’t exist before.

Visual Studio 2008 beta ready for download!

Friday, November 9th, 2007

http://msdn2.microsoft.com/en-us/evalcenter/bb655864.aspx

 

Microsoft Visual Studio 2008

Visual Studio 2008 Beta 2 Professional Edition
Visual Studio 2008 enables developers and development teams to create great connected applications on the latest platforms, including the Web, Windows Vista, the 2007 Office System, SQL Server 2008, and Windows Server 2008.


Download (3.13 GB)

Order
(US only)


Visual Studio Team System 2008 Beta 2 Team Suite
Visual Studio 2008 Team Suite combines the functionality from all four Visual Studio Team System 2008 role-based editions (Test Edition, Architecture Edition, Development Edition and Database Edition) to offer a fully comprehensive development environment for multi-disciplined team members.


Download (3.28 GB)

Order
(US only)


Visual Studio Team System 2008 Beta 2 Team Foundation Server
Visual Studio Team System 2008 Team Foundation Server is the best integrated collaboration server that enables software development teams looking to continually deliver successful applications to come together to effectively manage project work and dramatically increase visibility and predictability of the application development throughout the IT life cycle.


Download (1.5 GB)

Order
(US only)

Convert LPSTR to LPCWSTR

Friday, August 24th, 2007

 

I was stuck on converting a LPSTR to LPCWSTR problem for some while, fortunately dug out the answer from some where in the Internet.

Atlconv.h’s  A2W() could be useful also.

LPCWSTR MultiCharToUniChar(char* mbString)
{
    int len = strlen(mbString) + 1;
    wchar_t *ucString = new wchar_t[len];
    mbstowcs(ucString, mbString, len);
    return (LPCWSTR)ucString;
}

How to get rid of the problem “Unable to debug: The binding handle is invalid.”

Wednesday, June 27th, 2007

After I installed Visual Studio 2005 in my computer (Windows XP SP2), I eagerly open it and type my first “hello world” C# program and then run! …

Guess what? “Boom!” My speaker shout loudly and a message box appeared: Unable to debug, the binding handle is invalid. If I start the program without debug, everything seemed to be fine. I tried to open an existed demo project and try again, the behavior is just the same. I also found that when a program crash and you try to attach Visual Studio to the process to debug, the debug function works well! It’s really wired.

After waste sometime, I finally get the answer through search. Obviously I am not alone, so I decided to record this issue and the solution here, I think it may be helpful to others, too.

Two solutions available:

Solution 1. Make sure “Terminal Service” is running

By default, Visual studio will set the project property “Enable the Visual Studio hosting process” on, at this time, it seemed that it require “terminal service” to work. ‘

To fix:

1) Open the ‘Computer Management’ administration tool
2) Go to Services and Applications->Services
3) Find ‘Terminal Services’ in the list of Services
4) Open properties for it, and startup the service. (it’s better set it to auto start, so you don’t have to run it every time)

Solution 2. Turn off “Enable the Visual Studio hosting process”

disabling the “Visual Studio hosting process” : “Project” -> “[ProjectName] Properties..”. -> “Debug” -> Disable “Enable the Visual Studio hosting process”.

So what does the Visual Studio Host Process means? It’s said that this could make debug performance much better, so we should always try to use it. A detail explain is here: http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2005/11/06/133588.aspx

Two useful links: (I fix this problem by reading following posts)

[1] http://forums.microsoft.com/msdn/showpost.aspx?postid=65188&siteid=1

[2] http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=105751