To copy a project in C# (C sharp)

Revisiting C# (sharp), the land of abundance

 

Recently I need to make Windows forms application software for a small business.

Tested my old friend, Delphi 2007, the IDE used in my old employer, I found it expired or invalid for some reasons. Asked the old employer to reinstate my gear, but no action! Hmm ~

Microsoft C# (C sharp) happens to be up in my thought. Gratefully and reportedly it is free of charge since years ago. Downloaded and installed, it took me a day to finish everything to upgrade my development environment from Windows XP to Windows 7 .

With good memories of C sharp in early stages, I was excited to confirm this free version of C# 2010 express so robust and versatile in programming duties.

Followed up the installation of application into Windows 8 platform successfully, I am likely to expand the use of C sharp for the future PC programming tasks for a while.

Followings are the rundowns to reuse the projects in C# 2010 express (=IDE). Duplication of the form and code  in a development project  is highly recommended to save time, but somewhat cumbersome and error-prone. That’s why I make this note.

 

To copy and modify the Form1 in C sharp 2010 express

 

Step 1. [IDE] File / New Project

a. Set project name at Name field;
b. Save the target project and exit;

Step 2. [Windows Folder]

a. Copy the original project folder into the target project folder as a subordinate one;

Step 3. [IDE] Solution Explorer Window

a. Right-click the name of solution;
b. Click the “Add” and “Existing Project …”;
c. At “Add Existing Project Form”
…(1) Navigate to the project just copied (=the subordinate folder in step 2);
…(2) Open “.csproj” project file;
d. Confirm the newly copied project (with old stuff) created at the end of the solution component tree;

Step 4. [IDE] Solution Explorer Window

a. Double-click the Form1.cs of newly copied project to open;

Step 5. [IDE] File / Save As

a. Save the opened Form1.cs into the target project;
b. Confirm it if IDE asks the replacement of existing Form1 design file;
c. Confirm it if IDE asks the replacement of existing Form1 code file;
d. Check the check-box if IDE shows it for “Apply to All”;

Step 6. [IDE] Solution Explorer Window

a. R/click at the target project to see the options;
b. Select option “Set as Start Up Project”;
c. R/click at the copied project;
d. Select option “Remove”;

Step 7. [IDE] File / Save All

a. Save all and close the solution;

Step 8. [IDE] File / Open Project

a. Open the target project;

Step 9. [IDE] Solution Explorer Window

a. Double click the “Form1.cs” to open it;

Step 10. [IDE] File / View / Code

a. Wait the code file opened;
b. Find the namespace keyword and the old name given (at a line after the using directive group);
c. Change the old name to new one (typically same as your target project name);
d. If the rename option appears, then accept it;

Step 11. [IDE] File / Save All

a. Save all and close the solution;

Step 12. [Windows Folder]

a. Delete the copied old project folder under the target project folder;

Finish

Finally the Form1 design and codes are duplicated in this new target project. Without affecting the old project, now, we can expand it within the target project.

[Update for large project – 04/28/2014]

1. In case of large project,  all .CS files and. SDF dB files files would be required to be copied into the new project. For that, the object files may be copied at the old project and pasted into the new project within the solution explorer, instead of open/save in Steps 4-5 [IDE].

2. During .SDF duplication, the “Data Source Configuration” wizard shall come up. For the database model, “Dataset” would be given and “Tables” check-box should be marked for the database object.

3. If .RESX files are corrupted, then remove it from the new project and rebuild.

4. DataSet.XSD file should be automatically built if a .SDF DB file be copied.

5. If icon or pictures are involved, the “Resources” folder should be copied into the new project folder additionally. In IDE > Project > Resources menu, Icon file and picture files could be loaded respectively.

6. References may need to be added in IDE. For example,

       .NET > System.Windows.Forms.DataVisualization for Chart
COM > Microsoft Office 15.0 Object Library
.NET > Microsoft.Office.Interop.Excel for Excel embeded
.NET > System.Data.SqlServerCe for SQL Server Compact

7 Comments

Filed under News

NYC Vendor!

NYC_logoNow, we are the member of NYC vendor!

On 25th day of May, 2012, we received the notice from City of New York denoting that our vendor enrollment completed.

And effective immediately all related agencies in NYC will be able to access the most current information about All-That Corp.

Hope to take many projects to contribute our expertise to NYC and foster junior staffs.

Cheers!

Comments Off on NYC Vendor!

Filed under News

Computer Class

Computer classes are open at the KOPHO gallery on March 23 (Thu), 2012. Applicants for computer class can register using any media as follows

Applicants for photography may use the same email and website, but different phone at 516-233-7720

The site address is as follows,

41-23 Murray St. #204 GM Plaza Bld.
Flushing, NY 11355

 

 

컴퓨터 개인지도를 KOPHO 갤러리에서 개최합니다. 대상자는

  • 컴퓨터 스킬연마 또는  컴맹탈출에 실패하신분;
  • 고급 기술 습득을 원하시는 분입니다;

지도 받기를 원하시는 분은 아래 방법으로 문의 및 등록하실 수 있습니다.

사진 강좌를 원하시는 분도 같은 이메일과 웹사이트에서 등록하실 수 있으나,  전화 문의는 516-233-7720 으로 하여 주시기 바랍니다.

강의 시간: 매주 목요일 두시간씩

  • 7-9 PM

수강료

  • $50 / Hour

Comments Off on Computer Class

Filed under News

Hello!

Welcome to ALL-THAT Corporation.

How are you!

You are at the right place to your success with Information Technology (IT) solutions.

“We will stop printing the New York Times sometime in the future, date TBD”

 Arthur Sulzberger told an audience at a London media summit 2010. Sulzberger’s statement came in response to a prediction that the newspaper would go out-of-print by 2015.

We are in the middle of drastic changes. It’s time for us to jump on the IT wagon to survive.  How? And when?

Don’t worry! All-That corp. provides our clients with the best practices acquired through our vast experiences.

From a quick question to a business strategy, we help our clients to get the job done with warm hearts.

Come and sit down to discuss your future and success! Why not!

 

 

 

Comments Off on Hello!

Filed under Home