-
Notifications
You must be signed in to change notification settings - Fork 124
Need a way to exclude a folder from VS #94
Comments
@BillHiebert any ideas? |
Only solution is to create shorter paths. which usually means placing the project near the root of the drive. Unfortunately, windows is limited to 250 characters and the node tools create very deep paths. |
That is a problem, worthy of its own issue #. My issue is that I can't exclude a folder from the project. The tooling knows to ignore node and bower but doesn't appear to be configurable |
Just an update.. it seems RTM no longer automatically excludes This definitely needs to be configurable.. |
@da1rren You are wrong. RC did definitely exclude And more importantly, @BillHiebert and @sayedihashimi, please note that the 260 character limit issue is a totally separate thing from the problem highlighted in the OP, worthy of it's own issue as @BradBarnich said. This issue is highlighting the critical need for a configurable method to specify folders to not be automatically included within an ASP.net 5 project. The use case has already clearly been shown as necessary to handle intermediate output from gulp/grunt tasks. The Issue #18 also highlights the very distinctly different but equally important need for items to be included in the project, but not automatically checked into source control. For that, the |
Ever since upgrading from Visual Studio 2015 RC to 2015 Release, this issue has been causing me substantial frustration. My app is written in TypeScript and I use tsd to automatically manage and update my declaration file dependencies. I use bower to pull in packages like angular-ui-router which comes with an out of date, barely documented .d.ts file. Since I cannot seem to tell VS to ignore the bower_components folder, go to definition always takes me to the wrong version of the file. It also causes the TypeScript compiler to error due to conflicting declarations of the same module. |
Changed the declarations of all internal typescript modules, replacing the module keyword with the new namespace keyword. Added a grunt task to remove typescript declaration files included as part of certain bower packages (e.g. angular-ui-router), as they are generally out of date and cause multiple defintion errors in VS, conflicting with the declaration files managed by tsd. Ideally the bower_components folder would simply be excluded from the VS project, but as per aspnet/Tooling#94 this is not yet supported and VS 2015 does not ignore bower_components by default but the pre-release versions did which is why this became a problem. Upgraded to TypeScript 1.5.3 Updated Angular to 1.4.4.
I've been able to exclude folders from source control by adding a cloak to the folder in TFS since the .tfignore file doesn't work but the issue then is it CONSTANTLY prompts me about "You are attempting to add an item to a source-controlled project, but the item's path has no mapping...." It does this because I have a gulp watch running for when we change the client files (angularjs project) and we copy them to the wwwroot folder. The .tfignore problem needs fixed either that or give me the ability to turn off the frustrating source control dialog. |
A workaround for this issue.
Ofcourse, it's absolutely nuts that this is necessary but it has allowed me to move forwards - my issue is that I am using Incidentally the 'node_modules' folder is excluded from the project in Solution Explorer and I assumed this was due to the |
Thanks for the feedback everyone. This is a known issue and we have a backlog item to address it. I'm hoping that we can get that in the next public release, but we are not fully committed to that yet. |
Thanks sayedihashimi for responding. Could you tell me what issue the backlog item addresses? Does it address only the exclude section or also TFS not adhering to the tfignore file? |
Is it not as simple as adding something like the following to the xproj?
|
@dougludlow When you right click a folder within Solution Explorer and then click "Hide from Solution Explorer" the following is what gets added to the xproj file by VS.
However, VS just keep showing that folder within the Solution Explorer. |
Do you have Show All Files enabled in Solution Explorer? If so, toggle it. |
@sayedihashimi You are right. Toggling the switch helped me get rid of the bower_components folder within Solution Explorer. What confused me was having By the way, the Pending Changes pane still does not ignore the changes in the bower_components directory. I get the auto generated files added to TFS even though I would prefer them to stay out. |
Can you attach a screen shot? In away from my computer. For the pending changes we are tracking that. |
So, The same goes for I don't have any of the previous VS releases so I cannot compare but as far as I can recall, previous VS releases had a way of clearly displaying custom hidden directories and files with different than standard icons. Changing the opacity of standard icons was the way they went if I am not wrong. |
Let's see what @madskristensen says. |
Alright. By the way, one of the biggest problem with not being able to completely hide a folder is that VS tries to update the |
I'm bumping my support for this. Trying to do anything with bower is a complete pain because it causes visual studio to slog through thousands of files. The only recourse I've found is to move the Even hiding the |
@ciel Perhaps not exactly helpful to your situation, but have you tried using this instead of Bower? https://visualstudiogallery.msdn.microsoft.com/4cd5e0e0-2c38-426b-9f43-1d3688cc8be1 |
That's a really neat extension, but I've already invested a lot of time and
|
@sayedihashimi I don't think bower_components should be hidden, but it should not take down VS when installing hundreds or thousands of files. |
Ideally, I feel we should be able to exclude any folder from the solution.
|
@madskristensen there should be a new issue opened for the problem of visual studio coming to a crawl when many new files are added.. but this issue is specifically for enabling a configurable means to hide bower_components or any other folder |
I'm not sure I would say software slowing down when 3000+ huge files are
|
There is even an This seems like a trivial fix, can anyone from the team comment if this will be fixed for RC2? It was a complete showstopper for my organization's use of asp.net core. |
Excluding folders from source control isn't the problem. That can be done
|
@ciel But for TFS users it is a problem to exclude it from soruce control. The .tfignore simply does not work in ASP.NET 5 projects.
|
That's fine, but that's really not the purpose of this thread. It might be
|
It's more likely to attract the attention of people that care about that
|
I literally just ran into this issue locally, it looks like the xproj is trying to dig into some node_modules that I don't want it to. I've tried adding InvisibleFolder, but it doesn't seem to impact anything-- I still have to wait for VS to sit on a full progress bar and white screen for about 15 seconds before I see this: I've tried adding this side by side with my other ignores: And it's not working, I've moved it to the top of the xproj and the bottom, it really just doesn't seem to work. At this point, I find myself having to make a really weird decision about where a folder should be located because of a "project" based IDE interfering with a traditional web workflow, so it seems like something that should be addressed. |
It's been a few weeks -- Is there any update on this? I'm using gulp to build and I'm seeing visual studio "go white" when I do a gulp build even with folders excluded. |
I've been digging into this. Right now, having a DNX VS project open is causing my output files to get locked intermittently (even though I have them marked as ignored). I've looked into potential causes:
Note that I see this at times in the projet tree: System.AggregateException: One or more errors occurred. ---> Microsoft.VisualStudio.ProjectSystem.Utilities.Designers.ProjectTreeCorruptionException: Failed to update the project tree. ---> System.ArgumentException: An item with the caption "angular-resource.min.js.map" already exists in the tree with the same sort order as the item being added. @madskristensen , this is getting in the way of pretty straightforward gulp task usage . Is there anything I can do to get VS to "really" ignore folders? |
@brphelps I don't think there is but I believe @BillHiebert made some great perf improvements for the RC2 release. |
Just our 2cents: on VS 2015 Community Ed.. Situation
WorkaroundWe applied two workarounds at same time, so not sure which one was critical:
<ItemGroup>
<DnxInvisibleFolder Include="buildOutput\" />
<DnxInvisibleFolder Include="typings\" />
<DnxInvisibleFolder Include="node_modules\" />
</ItemGroup> OutcomeNow Find in files seems quite speedy, and does not report results found within |
+1 - Edit: This was my mistake / oversight. You can get compile to ignore a folder in RC2 but adding to your project.json within build options:
More detail in CLI Bug 2841 |
TFS Bug#231280 |
Thanks for logging this. I am also running into this for bower components, but bower components are loaded into wwwroot/lib which is not ignored. Some of the bower components have .ts files as well as .tsconfig files which causes tsc.exe to exit with errors for various reasons. I tried to use the above exclude directive in the project.json but it is not working for me. Thanks |
Also need this. Have project which builds using a temp folder. Visual studio, attempting to update both TFS and read with TSC (Typescript Compiler), white screens attempting to read this folder. |
So has there been any update to this? It's literally not possible to create large web applications in Visual Studio using node or bower because of this. It just kills performance to the point where it's not usable... |
It's unfortunate but I believe the "open source" movement is taking away resources from Visual Studio (and its loyal users). If there was no Visual Studio Code most of these Visual Studio issues would have been fixed BEFORE release of ASP.NET 5/Core. While I do like the support for JavaScript frameworks and tooling I think the TypeScript support is still much less than perfect. I have several TypeScript files that I added to the ASP.NET Core solution (with the latest VS tooling) and the Visual Studio/TFS integration want's to add/check-in all the JS and Map files by default because they are part of the solution. Who wants that? All I need in TFS is the TypeScript files and maybe some selected straight JS files that I specify. Having the files in the file system drive the solution structure MAY BE an OK idea but is one that did not consider typescript projects (which are growing exponentially). Who wants to write direct JavaScript anymore? Also, still constantly fighting with debugging TypeScript files because the JS/Map files are cached by IE so I have to clean my solution, delete history in IE, and then debug after every TS file change I make. I hope I am missing something here because it's hard to believe that the developers of the tooling have not run into this problem while testing/debugging a TS solution. While I'm at it I may as well mention the "TypeScript Virtual Project" which I have no idea what that is or why I need it but it seems to be getting in my way. |
This problem makes Visual Studio unusable for large web projects. It literally can't function like this. Please, do something soon. |
Hiding files from the Solution Explorer doesn't stop Visual Studio from trying to do things with them. This problem is so bad that I dare say it shouldn't be legal to say Visual Studio can build web projects, anymore. Anything more than adding |
@ciel You hit it right on the button. I started monitoring this thread awhile ago but I finally had to make the obvious decision of not using asp.net core. The built in npm, typescript, etc... functionality just isn't ready for use on projects of size. |
@ciel @bjporada It seems we are the victims of hostile takeover from the OSS guys in the name of community. They literally hijacked VS but thankfully haven't ruined it completely because it's still the best tool for legacy projects. What seems obvious is the apparent lack of experience within the #aspnetcore team of any kind of ISV work. I bet these guys never actually used VS to build web sites/web apps for paying clients. BTW, the same goes for IIS/Kestrel integration which even today is at rudimentary level. |
I think brandishing insults and unfounded accusations isn't likely to get I'm not sure what gives you the idea that this has anything to do with OSS. You sound like a gamer elitist that talks down to girls at conventions On Sep 6, 2016 2:32 PM, "Marko Hrovatic" notifications@github.com wrote:
|
Because subpar VS tooling and the general idea that everyone should use VS Code now. btw I don't understand where you saw insults and unfounded accusations, I think it's an accurate observation otherwise I don't know why would you kill a feature that literally every developer needs a couple of times per day |
close VS and cut the folder from work space and paste in another destination, and open VS and delete the folder from VS and close VS and return folder to his place and open VS |
This is so frustrating, nothing on this post is yet to work! :( |
I cann't believe I'm having such an issue in VS + ASP.NET Core project! Using Ember-cli is a pain, because when you build *.js files, the ember-cli uses "tmp" folder to place there huge amount of files (about 350-500 Mb). Then VS immediately starts to process them and hangs for about 3-5 minutes! That is just crazy. Please, add the ability to exclude folders and files from VS solution |
I agree with enterpub, please make this a high priority fix. It makes my project very, very hard to work with! |
The GitHub Issue Tracker for the aspnet/Tooling repo is being deprecated in favor of Visual Studio's Report a Problem tool. If this issue is still a problem with the RTW release of Visual Studio 2017, please report a new issue using the Report a Problem tool. While you can still use .NET Core and ASP.NET Preview tools with Visual Studio 2015, Visual Studio 2017 is now the officially supported tool for developing .NET Core and ASP.NET Core projects. By using the Report a Problem tool (available in both VS 2017 and VS 2015), you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See Visual Studio's Talk to Us page for more details. Please use the discussion topic here for feedback and questions on the deprecation of this issue tracker. Thanks! |
all: As requests by the Please direct comments and vote for the problem here: https://developercommunity.visualstudio.com/content/problem/117014/we-need-a-way-to-exclude-a-folder-from-projects.html |
For instance a temp folder storing intermediate output from a grunt build.
node_modules
andbower_components
are automatically excluded, but it doesn't appear to be configurable.exclude
in project.json has no effect on VS.As a result, VS will hang trying to keep up with all the file and folder changes.
This was using a project.json project using one of the beta versions of the asp.net tooling.
The text was updated successfully, but these errors were encountered: