Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable automatic addition of new files in Visual Studio 2015 for ASP.NET 5 projects

Is there any way to disable or opt-out of the automatic addition of new files for ASP.NET 5 in Visual Studio 2015?

Our software development shop has a single user checkout policy in place, where developers can only check out files one at a time. This is causing issues with ASP.NET 5, as any generated files are automatically being added to the project in Visual Studio 2015, which in turn are causing them to be added to TFS. This causes one developer to block another, as they cannot build and generate the same output files.

For example, Typescript files are being compiled and copied to folders under wwwroot. The first developer that does this causes Visual Studio 2015 to add those files to the solution, which in turn causes them to be added to TFS. The next developer then can't build because these files are currently checked out to another developer.

We have been able to temporarily prevent this by cloaking the wwwroot folder in TFS. However, we would not want to have every developer have to remember to do this. Plus we have to decloak wwwroot to make code changes to web.config, for example, and then have to re-cloak it afterwards. And then developers have to decloak to get the latest version of the changes to this file, then re-cloak afterwards.

We would rather explicitly choose to add a file to the project in Visual Studio 2015, so generated files aren't automatically added to the project.

We also cannot change the TFS checkout policy to allow multi-user checkouts. If we could set a multi-user checkout policy at a folder level in Source Control Explorer in TFS 2010, that might solve some of these problems as well. But TFS 2010 doesn't allow this.

like image 866
Jeff Avatar asked Dec 02 '15 00:12

Jeff


People also ask

How do I add an existing file to Visual Studio project?

You can add existing files to your project by right-clicking on the Project node and selecting Add > Add Files.... Alternatively, to add an entire folder, select Add > Add Existing Folder.... The file browser is shown. It lets you search your system for the required item to add.

What is the solution file in Visual Studio?

A solution is a structure for organizing projects in Visual Studio. The solution maintains the state information for projects in two files: . sln file (text-based, shared) .

How do I create a solution to an existing project?

To create an empty solutionOn the menu bar, select File > New > Project. On the Create a new project page, type solution into the search box. Select the Blank Solution template, and then click Next. Enter Name and Location values for your solution, and then select Create.


1 Answers

I believe this is one of those situations where you're fighting against a tool/process instead of just "going with the flow". Either you need to reform your checkin/checkout process to conform to the new ASP.NET 5 methodologies (including the new xproj format) or you need to stick to older technology that supports your process.

like image 73
Brandon Martinez Avatar answered Dec 10 '22 13:12

Brandon Martinez