c# - Content-files with NuGet are very very slow -


I have a common ASP.NET web application that is shared by multiple sites. I used NuGet to package this general web application and to distribute it on many sites. After this idea:.

By doing so, I end up with some issues when updating for a newer version, NuGet actually slows down because of it's cause of 800 content-files Somehow NuGet has to take about 1 ~ 2 seconds for each content-file that needs to be uninstalled, approximately 25 minutes and 5 minutes install to uninstall to do. Especially with TFS-binding. Looking at the source code of NuGet, I thought that the API of Visual Studio is talking to Newgate, it is a hindrance. The whole process 100% CPU-use of Visual Studio

So I thought that Visual Studio slow, so maybe I my disappointment can do without it, NuGet are Commands (which runs without visual Studio) only download a package and it opens it will not update the project file because of the fact that some power Script dte ob In terms of connect ... (although not me).

Now I am thinking: What is my choice?

  1. To add content-items, do some XML-magic on project-files? What are the drawbacks of doing so? Is there a device for this already?
  2. Is making some magic with construction scripts?
  3. Throw content-files out of the package and use bower or some other device? How can it be integrated into the project? Because eventually I want to see content-files.
  4. Nougat is absolutely nothing else ...? OpenWrap? Horn? (No longer active) or maybe there is no package manager at all?

Please help me find the best solution :)

Another thing that disappoints me is that when a NuGet is updated, it uninstalls after installation, if the change between versions can be minimal?

One option is to add 800 content files instead, instead of adding resources to your shared library Can embed them in the form.

Then use something like EmbeddedResourceVirtualPathProvider to serve them

.

This way the NuGet bus is changing instead of .dll instead of 800 files. There are so many articles online about how to use

VirtualPathProvider .

EDIT : Questions about performance

The solution looks relatively simple, so I'll just try it and see if the display is acceptable. The good thing is that you do not have to do anything special with the paths of your web app.

You need to do these steps:

  1. Set up the library of resources in your resource, embedded on the resource you have in the text editor .csproj By opening the file and & lt; Content with & lt; Opening the embedded resources can do it quickly.
  2. Add the references to your resource library to your web application.
  3. EmbeddedResourceVirtualPathProvider NuGet package add to your web app
  4. Register the virtual path provider's AppInitialize () stored in An example to register using is the App_Code folder.
  namespace TestWebProject.App_Code {public class RegisterVirtualPathProvider {public static void AppInitialize () {HostingEnvironment.RegisterVirtualPathProvider (New EmbeddedResourceVirtualPathProvider.Vpp () {{Typeof (marker) .Assembly, @ ".. \ TestResourceLibrary"},}); }}}  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -