Visual Studio + ASP.NET Core + Resharper = "tmp" folder makes visual studio hang up to 5 mins


#1

I’m developing web app with ASP.NET Core framework, using Visual Studio 2015 (VS) and Resharper. I use Ember 2.10 for client side. The problem is ember-cli “build” command generates huge amount of files in “tmp” folder (about 300-500 Mb) and VS + Resharper immediately tries to process all of them. Processing of those files takes up to 5 mins and VS just hangs all this time. It is very inconvenient to work.

Turning off Reshrper helps a little, but still processing files takes much time + working without Reshrper is not convenient. I have not found how to tell VS ignore files in some specific folder - looks like it is impossible. Resharper has such option, but nothing changes.

Is it possible to specify custom folder for files in “tmp” folder? If yes, placing it to outside VS source code would be a solution.

Thank you for answer


#2

As a JetBrains product try add tmp/ file to ignore folder


#3

Unfortunately provided link is for JetBrains IntelliJ IDEA, but not for Visual Studio as I use.


#4

which version of resharper do you use? If I remember correctly directories exclusion feature has appeared in one of the latest version of resharper. Have you tried to suspend resharper for while and reopen your solution? Just to check if it’s a resharper problem.

You could also try to make tmp, and node_modules directories hidden. Probably it could force vs to ignore them?


#5

@beatle, I using ReSharper Ultimate 2016.3 (the latest at the moment) and VS 2015 update 3. When I started this post I used ReSharper Ultimate 2016.2, then upgraded to 2016.3, but the issue is not solved. I’ve added tmp folder under Code Inspections -> Settings -> Elements to skip for both 2016.2 and 2016.3 versions

After I turned off Resharper, VS processing faster, but not fast enough for comfort work. Hm, I’ll try to made the folders hidden.

I’m sure the solution is to move tmp folder outside VS source code base. I just do not know how and did not find how.


#6

We had the same problem before and ended up splitting the solution in order to use VS for the back-end and VS Code / JetBrains WebStorm for ember.


#7

@beatle Unfortunately hiding “tmp” filder did not help. I’ve found other people say this trick does not work any more


#8

I agree with Cemarte. Visual Studio is simply not build for having /tmp, /node_modules, /bowe_components folders containing combined several hundred thousand files. We have switched to clients like VS code for the frontend stuff. The client does support to have stuff like excluding certain files form search and/or the overview. These settings can be global on your own editor, or is a .vscode file located in your project folder:

{
"search.exclude": {
	"**/dist": true,
		"**/tmp": true,
		"**/bower_components": true,
		"**/node_modules": true,
		"**/vendor": true,
		"**/typings": true
	},
	"files.exclude": {
		"**/.git": true,
		"**/.svn": true,
		"**/.hg": true,
		"**/.DS_Store": true,
		"**/yarn.lock": true,
		"**/bower_components": true,
		"**/node_modules": true,
		"**/typings": true,
		"**/tmp": true
	}
}

#9

Use Visual Studio Code and use the integrated terminal to do your builds.

Tim


#10

I have a solution to suggest. I found a program which syncs files and their data between specified folders. Suppose you already understood the idea.

  1. Created a folder anywhere outside Visual Studio solution and copied into all content from Ember app.
  2. Setup sync app to copy changed files from “dist” folder into VS Ember app “dist” folder.

d:\[some_outside_folder]\dist ==> d:\[VS folder]\…\[ember app]\dist

3 In VS I setup sync app to sync all changed files except those in “dist” folder

d:\[VS folder]\…\[ember app] ==> d:\[some_outside_folder] (excluding dist folder)

4 In the outside folder I run command “ember build -w”

5 In VS make changes in Ember app as usually

Works very nice. I do not want to advertise the sync app, but if anybody asks I’ll write the name. It is not hard to find and there are couple with identical functionality.