10

I have my grunt file building the TS files and placing them in to the wwwroot folder. TFS/VS Keeps thinking that they are new files and adding them to the pending changes.

How do I make is so this is not happen. I only want the TS file in source control.

Update: I have tried using .tfignore file

# Ignore all files in the wwwroot sub-folder
\wwwroot\
1
  • Do you actually use TFVC? If you use Git, you need a .gitignore file.
    – cremor
    May 7, 2015 at 8:52

4 Answers 4

2

TL;DR

If you want to do front-end dev in Visual Studio 2015, don't use the ASP.NET 5 project template. Use the ASP.NET 4.5.2 Empty Web Project template. NPM, Bower, Gulp, Task Runner all work there too. Just add the appropriate config files through the New Item dialog (NPM Configuration File, Bower Configuration File, etc.).


Though ASP.NET 5 was released with Visual Studio, it is still very much beta. That doesn't only apply to the server-side features. The VS project type is also not ready for prime-time. The project properties are very limited in the UI. You can't choose to exclude items from the project. package.config exclusions don't appear to affect anything. VS doesn't behave with TFS on these projects and performs a TFS ADD on any generated file. This means that if I don't manually fiddle with TFS changes, eventually gulp builds will fail because it will want to make changes which TFS will block (e.g. delete when there is already a pending change).

All in all, the ASP.NET 5 project type is not full baked just yet. Fortunately, the only thing it really provides over the 4.5.2 project (that I've noticed) for the front-end developer is the Dependencies node in the project tree. That has some utility, but is not worth the cost currently. Instead, I installed the Visual Studio Command Line extension, which makes it convenient to run bower and npm commands as needed. I had to do this anyway for tsd (TypeScript definitions) since it doesn't have a GUI, intellisense, or bindings for its config file.

6
  • I understand that asp.net is in beta. But we are using it now and will ship after RTM of it so we will keep using asp.net 5!!!!! Aug 6, 2015 at 16:29
  • My mistake. I assumed that you were doing front-end dev as a separate project. I'll leave the answer for now, because it may apply to others with the same issue. Aug 6, 2015 at 16:49
  • As I start adding more packages, the VS 2015 stop responding. I don't know is the JavaScript Language Service in the output causing this problem. Aug 17, 2015 at 20:42
  • When you add packages and save the config file, VS automatically downloads them. If you add a lot at a time, I imagine it might take some time for it to finish. But also the product is new, so it could be a bug. Aug 19, 2015 at 16:17
  • 1
    @scuba88, no. They are not in the project file, but are downloaded into the project folder. Oct 1, 2015 at 19:50
0

Add a .tfignore file. Details here: https://msdn.microsoft.com/en-us/library/ms245454.aspx#tfignore

1
0

You are using a Web Site project type and not Web Application.

Web site is only provided for legacy support and does not support features added to visual studio after... Well.. For a very long time > 5 years. Web site projects are inherently greedy with files and this is by design and can't be changed.

You should upgrade your project to a web application by creating a blank web application and doing the core files into your website and then opening it in vs. You will see that it has no files and you need to manually tell it which files to load.

1
  • 1
    I have the same problem, but no web site projects in the solution (unless the new ASP.NET 5 project type is a web site project). I checked the project type GUIDs to make sure. Aug 5, 2015 at 13:19
0

This was a bug in the asp.net core tooling/TFS souce control interaction and has been fixed in VS 2015 Update 3, where the .tfignore file instructions should now be honoured:

https://github.com/aspnet/Tooling/issues/18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.