Closed tommck closed 8 years ago
Tom, is this specific to ASP.NET 5 projects?
I don't know. That's all we have in the solution.
This is what's in our .tfignore file
# Ignore all of the HTML, CSS, JS build assets
\coverage
\dist
\.tmp
\node_modules
\docs
We use gulp to do some building. the "coverage", "docs" and "dist" folders are created during "gulp build". The "node_modules" folder is always ignored, so is the ".tmp". The others always seem to get added to my pending changes and solution explorer view
Tom, could you try with a non asp.net 5 project? It would take me some time to setup an env to test this.
Hmm.. I might be able to (I don't have rights to create new projects in our TFS server to test with).
I would think that .tfignore files would still show up in solution explorer (why would they necessarily be hidden)? But showing up in pending changes definitely sounds wrong...
well, I guess I'm also thinking of a "Web Application" in the past, as opposed to a "web site". Web Applications did not automatically add files to them, Web Sites showed everything in the folder. I would think, with the ".kproj" file (soon to be ".xproj"), this would be more like an "application" than a "site", thus my expectation of not seeing the newly created files.
That's the wrong assumption. kproj tries to be the best of both worlds. There's no explicit list of files in the project file and that's by design. Files on disk are part of the project.
Ah, OK. Too bad for me. I always liked only seeing what files were going into TFS
Base on what was in the project?
Yeah. I only used "web site" if I was doing a non-MSFT tech project or basically static HTML. Otherwise, I used the web app and I liked not seeing files that weren't in my project.
I agree with @Eilon that they should still show up in solution explorer, but the real issue is that .tfignore is ignored and asp.net 5 automatically adds files to source control and they show up in pending changes.
There needs to be a way to explicitly exclude files from version control.
Like #94 mentions, bower_components and node_modules are already ignored.
Well, when using things like "gulp" to build your project, creating one folder for "coverage", another for "dist", etc... It really screws up VS for me. If I search for a file, I get multiple copies.
Find/Replace in the "solution" picks up all these other copies of files too.
It's just not the desired functionality. So, unless I use folders completely outside the folder structure, it will consistently create these problems.
That's a step down in functionality in my mind. I should absolutely be able to hide folders from VS
I think there are two different things involved here. Specifically regarding .tfignore, I dont think things in .tfignore should necessarily be hidden from solution explorer. That is something specifically related to version control.
You are absolutely right though, you should be able to also configure and hide folders or files from the project in solution explorer as well.. that's what something like what #94 mentions would do.
bower_components and node_modules are already hidden in this way, so there should be an additional mechanism (not .tfignore) to configure/unconfigure other folders or files to also be hidden in the same way.
This would both seem to be extremely common scenarios, I'm surprised there aren't more people complaining about it.
It is convenient to have .ts files transpiled to .js files in the same folder for easy debugging at dev time. But I don't want to check the .js files in. Worse, since TF is slow at processing file adds and removes (not checking them in - just tracking the changes), it slows down clean and rebuild, especially if there are many files. Operations with third party bower libraries get really sluggish, since there are so many files.
If you really want to wait, pull in DefinitelyTyped
as a bower component. It would be nice if VS was architected to handle that volume of files.
+1 here! Typescript generated files and anything placed in the wwwroot is automatically added to the TFS check-in include list no matter what is in the tfignore file. I even tried . to ignore everything and it doesn't work. Previous posters mentioned that node_modules and bower_componets are excluded. Is this because of the exclude property in the project.json? If so, then why isn't wwwroot excluded. The only way I can think of to move forward is to turn off automatic typescript compilation and then have all my developers specifically exclude the wwwroot from TFS. However, i'm afraid of a person forgetting and then checking in all the compiled output. Is there another work around other than using git? Can we get this promoted to a defect with some type of resolution by beta 8?
We are also experiencing issues with the tfignore not being considered by TFS online specially for the wwwroot folder.
I am finally able to support a development workflow with ASP.NET 5 now that beta 8 has added excluded folders. However, we can't use the default flow with Typescript because the javascript files are generated next to the typescript files which are still automatically added to the changeset. At this time we are storing all of our typescript files outside of wwwroot and after build, copying them in place. This kind of works, however, when using ES6 modules which are path based we've run into issues with framework projects and are having to work around them.
ASP.NET 5 RC will have the ability to hide files from solution explorer. .
That just sounds like we're treating the symptoms rather than the problem. Having to add folders to both .tfignore and excluded folders in the project.json doesn't seem like the right solution
I believe that if the file/folder is excluded using project.json, it would not then get added to source control automatically. @tommck, you shouldn't need to add to both .tfignore and project.json if you DON'T want the file/folder to be included in your solution. Someone correct me if I am wrong about that.
It is when you DO want the file/folder to be included in the solution that this .tfignore issue becomes relevant. This issue is very specifically for the problem of .tfignore not being honored by asp.net 5 projects, and the inability to exclude files which ARE in the solution from being checked into TFS.
That said, having the ability to hide files from solution explorer is great and is necessary. It is just that this is not what this issue is about. Rather, it addresses issue #94 and that is the issue which should have been closed instead.
I really think this particular issue should be reopened until .tfignore is properly honored..
I want it to be excluded from BOTH places, but the original problem still stands:
\ The .tfignore file is not working. The files are added to "Pending Changes"**
Yes, this issue should NOT be closed @balachir
@tommck, you wont be able to test excluding files till RC is available, but since Beta8 does include the ability to exclude folders.. have been able to test to see if excluding folders also excludes the folder from being checked into TFS? At least, that's the correct way it should work as far as I can tell..
It really seems to me that if you want it excluded from BOTH solution explorer AND source control, that you shouldn't have to worry about .tfignore at all for that specific use case.. just excluding from solution explorer should suffice.
Is that how you see it also?
Reopening for now. We are busy with critical release activities related to rc1 so we may not be able to investigate this right away.
@balachir do you know who owns .tfignore? Perhaps they should reply here.
So I installed RC1 today, prepared to move my entire development team to the supported release of ASP.NET 5, and now DnxInvisibleFolder no longer works!!! So now every time I build, 9000 files are added to my pending changes. This is completely unusable. Are there any tests run against TFSVC or only git? Do I need to create a MSDN support case to get this addressed?
Update: Turns out you already know it's a bug #289.
FYI: I now have RC1 installed and the problem still persists.
It's not a complicated situation. I have an ASPNET5 project. I use gulp scripts to build the HTML and javascript side of things (rest is APIs). The folders generated by the gulp scripts are in the .tfignore file. Every time I do a "gulp clean" and a "guilp build", the files all get added back to my pending files list (after locking up VS for quite a while while it deals with all these added files it's not supposed to be doing anything with)
I excluded the same folders from the solution and it changed nothing. They were actually even visible in the solution explorer after being deleted and re-built.
Unbelievably frustrating.
I also have this error - Can it be a tooling issue with Visual Studio with ASP.NET 5 ?
Our entire project team (30+ people) have this problem.
Steps to reproduce (TFS+VS2015):
Add logs files by making webserver log to web.cong:
1) <httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogFile="..\logs\httpplatform-stdout" stdoutLogEnabled="true" startupTimeLimit="3600"/>
2) Add a ".tfignore" file with the following:
logs
*.log
logs\*.*
3) Run the application in VS2015 and notice that the generated log files are added to TFS regardless of the ".tfignore" file.
Its a problem for me too. I can find no way of excluding the bower packages in wwwroot/lib from tfs source control.
We share the frustrations on this issue. wwwroot is essentially a client side "bin" folder, so it should never be checked into SC. Yes, I know about publishing and that is the real "bin", but wwwroot is a "bin" whilst developing and debugging locally. I urge to treat this issue with a higher priority, it really is getting in the way of developers and is not helping win over any naysayers of this new tooling.
I have the same issue with a Cordova project. I've configured bower to put the libs into /www/app/libs, and added a line to .tfignore to exclude /www/app/libs. Does not work.
BTW: The title is misleading - this bug is not only about VS showing the files but also about the files being checkedin despite .tfsignore
@bluemmc just updated the title to try to express that better. Maybe it'll get more attention now?
Just adding my name to this as another person who is waiting for this frustrating bug to be fixed. People constantly checking in stuff that should not be is really frustrating
This seems like such a simple feature, I'm surprised it's been an issue and hasn't been fixed yet. I share the frustration. I have to exclude a billion folders and files every time I check in - every. single. time. And I forget to include files I've added b/c that list is up to about 30,000 files.
Yeah. It's pretty crazy. It's been happening for about a year now. It wasn't a big deal when everything was alphas and pre-release software. Now, I find it rather disturbing that such a simple thing doesn't work
Thanks everyone for persisting with this. I am able to reproduce this with RC1 and have opened a bug for the issue in our internal bug database. We shall investigate the cause of this issue and let you know.
"183569: Entries in .tfignore still get added as pending changes for ASP.NET 5 project with TypeScript file #18".
Just wanted to add this happens to me with nuget packages. When you run an update those packages (even with packages in the .tfignore) will show up as pending changes. Like everyone else, waiting patiently :)
Also waiting patiently for this issue to be solved
I'm waiting a bit more impatiently than most
Have you any date for a hotfix?
FYI, I brought up this issue to the ASP.NET Community Standup and followed up with an email to Scott Hanselman this morning.
I'm looking at this.
I have Visual Studio 2015 with .tfignore file with: \node_modules Many of the 25 modules within that folder are always successfully ignored by VS, when re-opening the solution, and not listed in Pending changes. Here are 5 modules that are always not ignored, and added to Pending Changes when re-opening the solution after placing them in the node_modules folder. I believe that long path lengths may be related to a module being not ignored. I hope this is useful for any testing. Thanks.
Not ignored modules:
C:\TFS\Dashboard-CCOD\CCODApplication\node_modules\gulp-bowserify
C:\TFS\Dashboard-CCOD\CCODApplication\node_modules\gulp-clean
C:\TFS\Dashboard-CCOD\CCODApplication\node_modules\gulp-karma
C:\TFS\Dashboard-CCOD\CCODApplication\node_modules\gulp-uglify
C:\TFS\Dashboard-CCOD\CCODApplication\node_modules\gulp-usemin
File location of .tfignore:
C:\TFS\Dashboard-CCOD\CCODApplication\.tfignore
This is a big issue for us as well. It has put a damper on our plans to go forward with .NET Core for some of our projects. Hoping a fix is coming soon... Thanks.
We have the same problem here. We just want to ignore a few folders in tfs which are automatically filled with files from gulp tasks.
@FloMaetschke that's also my pain right now (but in my case, it is with grunt). What I'm doing right now is excluding all those generated files before checking in. A solution I'm thinking to implement as soon as I have some time is to create a task that excludes all those files with tf.exe (I don't know what command I'm going to use yet).
+1 This is truly painful. I don't have the option to switch to Git (where this is not an issue).
Using TFS as our Source Control, we have a few folders in our ".tfignore", yet the folders are not ignored by visual studio and always show up in the Solution Explorer and also in the "Pending Changes" view.
So, it's not doing what I think it should be doing.