Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 128843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:41:57+00:00 2026-05-11T05:41:57+00:00

Is there a way to use add-as-link when dragging and dropping source files or

  • 0

Is there a way to use add-as-link when dragging and dropping source files or entire source trees into a C# project?

Currently, dragging a tree of source files onto a C# project will cause Visual Studio to copy all files to mirror tree below my solution file.

This can be avoided with the the add-as-link option as depicted in the picture below. However, it gets tedious for large trees or when some files in a directory are already part of the project.

Screenshot of the add-as-link functionality in Visual Studio http://jaapsuter.com/images/add_cs_file.jpg

I’ve looked in Tools->Options, searched the web, and held various magic key combinations when dragging and dropping, to no avail.

I’m tempted to write a script that just globs my .cs files and runs a regular expression over my .csproj file. I’m aware of NAnt, Premake, and other solutions – but I’d like something lightweight.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T05:41:58+00:00Added an answer on May 11, 2026 at 5:41 am

    What you can also do if you don’t find a solution is bind a directory to your project by hand once and let the project find all .cs files in that directory automatically when it loads.

    This is easily done by changing your MSBuild file in the following way:

    <ItemGroup>   <Compile Include='SomeDirectory\**\*.cs'/> </ItemGroup> 

    This will take all .cs files in SomeDirectory and include them to the project. This is very useful if there are often a lot of files added to the project. However, it may break on some machine adding useless files. That’s why I would only recommend that on an external project that’s not editable in your current workspace.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 99k
  • Answers 99k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Formulas used in ReportViewer are automatically converted when rendering to… May 11, 2026 at 7:44 pm
  • Editorial Team
    Editorial Team added an answer I'm noticing that in your initWithCoder: method, you're not doing… May 11, 2026 at 7:44 pm
  • Editorial Team
    Editorial Team added an answer Do you mean you want a client-side JQuery autocomplete control… May 11, 2026 at 7:44 pm

Related Questions

I'm attempting to send HTML formatted emails using C# 3 via Outlook.MailItem Outlook.MailItem objMail
I'm trying to figure out how to best lay this out. I'll explain what
Need: Find a way to add a valid tag/attribute/property to a normal html control.
I am dealing with a master page split into various content placeholders as per

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.