Prevent VS 2005 from trying to parse media files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert Dunlop

    Prevent VS 2005 from trying to parse media files

    I am using Microsoft Visual Studio 2005 for development of an ASP.NET site,
    and I have a problem that greatly effects my workflow at times. It seems
    that after I upload new files anywhere within the directory structure of the
    site that is visible to VS, the next time I perform a build VS takes extra
    time, apparently downloading the new files (though the time required seems
    much longer than a one-time download should take). During this time VS
    appears to be hung, the only way to cancel the build is to close VS through
    task manager. As the site includes some rather large media files, this can
    sometimes mean I have to walk away for several hours while I let VS do its
    thing.

    What causes this, and is there a way to prevent it? Usually I am uploading
    the media files through FTP, maybe I should upload them through the IDE so
    VS doesn't feel it needs to examine these new files? I don't find them
    anywhere in the local cache for the project, so it doesn't seem that they
    are downloaded to update the local copy of the project. The files involved
    are media files with extensions unrelated to a build, so if not for caching
    why is it reading these files?

    I find an option for excluding a file from the project, but this renames the
    file with a .exclude extension, which I don't find to be an acceptable
    option. Is there maybe an element that I could include in a web.config file
    to configure a directory to be ignored by the compiler? Or something buried
    in the VS settings?


    Presently, I've been waiting over an hour to compile a 2 line change to a
    ..cs file, arrgggh! Help!


    --
    Robert Dunlop
    ----------------------


    Microsoft DirectX MVP 1998-2006


  • John Saunders

    #2
    Re: Prevent VS 2005 from trying to parse media files

    "bruce barker" <brucebarker@di scussions.micro soft.comwrote in message
    news:69937852-A41C-47E9-851B-4AEF57EB0BB9@mi crosoft.com...
    it has nothing to do with being a web site. when a build is done, asp.net
    is
    called to do a compile (with an application proj, the code behinds are
    compiled first, then the asp.net compiler called to compile evertyhing
    else).
    if you remove a build step in a web application, then the asp.net compiler
    is
    used instead. the only way to exclude a file is to make the extension
    .exclude
    >
    with vs, instead of building in place, all files in the website are copied
    to a temp folder except those that vs compiel (then its just the output
    dll's), and then the asp.net compiler is called. the asp.net compiler
    actually has its own temp folder that the compiler output goes to. the dev
    webserver reads from this temp area.
    >
    in your case the one approach is not not use the dev web server. use iis
    instead. then compiles can happen in place, so media will not be copied.
    you
    may need to set vs to not build before running and you can still debug.
    >
    another approach is to move the media to another vdir so its does not
    effect
    the build.
    Bruce, it seems there are several questions here; perhaps you can help the
    OP understand. Also, other developers on my team are experiencing much
    longer build times today, after our servers were moved to another state.
    This may be related to their problem as well.

    One question for the OP: what is the file extension of the media files being
    built?
    Bruce, given that answer, I hope you will be able to help identify which
    "builder" is building those particular files.

    In my case, we all use Web Application Projects, and I had never noticed
    this behavior before. Were you talking about something that happens during
    the use of the Build command (as the OP seems to have been asking), or are
    you referring to the build that happens at run-time, once the web
    application has been deployed? I've never noticed an IDE or MSBUILD build
    doing anything with media files other than copy them if their build type is
    set to "Content". Can you say which task or target is used for this step?
    That would help me find it in the rather large Detailed MSBUILD log I have.
    I just searched it for "aspnet_", and don't see it there.
    --
    John Saunders | MVP - Connected System Developer

    Comment

    • Robert Dunlop

      #3
      Re: Prevent VS 2005 from trying to parse media files

      "John Saunders" <no@dont.do.tha t.comwrote in message
      news:uY0AUI6MJH A.4456@TK2MSFTN GP02.phx.gbl...
      "bruce barker" <brucebarker@di scussions.micro soft.comwrote in message
      news:69937852-A41C-47E9-851B-4AEF57EB0BB9@mi crosoft.com...
      >it has nothing to do with being a web site. when a build is done,
      >asp.net is
      >called to do a compile (with an application proj, the code behinds are
      >compiled first, then the asp.net compiler called to compile evertyhing
      >else).
      >if you remove a build step in a web application, then the asp.net
      >compiler is
      >used instead. the only way to exclude a file is to make the extension
      >.exclude
      >>
      >with vs, instead of building in place, all files in the website are
      >copied
      >to a temp folder except those that vs compiel (then its just the output
      >dll's), and then the asp.net compiler is called. the asp.net compiler
      >actually has its own temp folder that the compiler output goes to. the
      >dev
      >webserver reads from this temp area.
      >>
      >in your case the one approach is not not use the dev web server. use iis
      >instead. then compiles can happen in place, so media will not be copied.
      >you
      >may need to set vs to not build before running and you can still debug.
      >>
      >another approach is to move the media to another vdir so its does not
      >effect
      >the build.
      >
      Bruce, it seems there are several questions here; perhaps you can help the
      OP understand. Also, other developers on my team are experiencing much
      longer build times today, after our servers were moved to another state.
      This may be related to their problem as well.
      >
      One question for the OP: what is the file extension of the media files
      being built?
      Bruce, given that answer, I hope you will be able to help identify which
      "builder" is building those particular files.
      There are a number of different file formats that have triggered this
      behavior:

      ..flv (Flash video)
      ..swf (compiled Shockwave Flash application)
      ..mp3 (MPEG layer 3 audio)
      ..pdf (Adobe PDF documents)

      It seems to me that any files added are triggering this behavior, I noticed
      those simply because they are big and have a major impact at build time.
      And as I noted before, this is a one time thing, once I let it work through
      the long build it doesn't occur again until I add or modify a media file
      (which is pretty often right now). Then VS reads the whole web site the
      next time I select "Build" -"Build Solution", or any other build type for
      that matter. If I haven't made any changes to media files since the last
      build, the build process is nice and quick.
      In my case, we all use Web Application Projects, and I had never noticed
      this behavior before. Were you talking about something that happens during
      the use of the Build command (as the OP seems to have been asking), or are
      you referring to the build that happens at run-time, once the web
      application has been deployed? I've never noticed an IDE or MSBUILD build
      doing anything with media files other than copy them if their build type
      is set to "Content". Can you say which task or target is used for this
      step? That would help me find it in the rather large Detailed MSBUILD log
      I have. I just searched it for "aspnet_", and don't see it there.
      I increased the output options in settings to detailed, and it seems this is
      occurring in some initial step labeled "Validating Files" or some such (I'll
      post back with the exact message next time I build), which is where the time
      is spent. Once that is complete I get messages from the actual build
      process, which in itself takes little time. So I don't think it is really
      trying to compile these files, rather it is something to do with a cache
      refresh or some such... yet these files never make it to any locally cached
      copy that I can find (aside from temporary internet file folder, while this
      "validation " is happening). The only files locally cached are those which
      actually should be used in the compile (.cs, .aspx, .dll, etc). Which leads
      me to wonder how it knows not to read these files on subsequent builds....
      Maybe there is some way I could trick it into not reading them, if I knew
      where such information was held?

      One final note, the site is co-hosted at GoDaddy, so I don't have much in
      the way of options when it comes to making adjustments to IIS, creating
      vdirs, etc.

      Another thought that I have had is that maybe this is a VS2005 quirk that I
      am saddled with. I do have VS 2008 Express installed, should I consider
      trying that out, if so are there any migration issues I should be ready for?

      Thanks Bruce and John for your attention to this issue, I've been dealing
      with this issue for a while but it's finally reached a critical point where
      it is effecting my ability to perform... hopefully there is a solution out
      there...


      --
      Robert Dunlop
      ----------------------


      Microsoft DirectX MVP 1998-2006


      Comment

      • John Saunders

        #4
        Re: Prevent VS 2005 from trying to parse media files

        "Robert Dunlop" <rdunlop@mvps.o rgwrote in message
        news:u4JzuK8MJH A.5648@TK2MSFTN GP05.phx.gbl...
        I increased the output options in settings to detailed, and it seems this
        is occurring in some initial step labeled "Validating Files" or some such
        (I'll post back with the exact message next time I build), which is where
        the time is spent. Once that is complete I get messages from the actual
        build process, which in itself takes little time. So I don't think it is
        really trying to compile these files, rather it is something to do with a
        cache refresh or some such
        ....
        Another thought that I have had is that maybe this is a VS2005 quirk that
        I am saddled with. I do have VS 2008 Express installed, should I consider
        trying that out, if so are there any migration issues I should be ready
        for?
        I don't know of any migration issues. If you were using Web Application
        Projects (or any project, for that matter), then there's a trivial "upgrade"
        required to the project files, to specify that the V3.5 tools should be
        used. That's the kind of upgrade I've taken care of with the "Replace in
        Files" command.

        Are you running VS2005 SP1? If not, then I might try that first, just to see
        if this is a bug they fixed.

        Also, see this blog post:
        http://weblogs.asp.net/scottgu/archi...h-VS-2005.aspx. I
        found it during the following search:
        http://social.msdn.microsoft.com/Sea...eb%20site&ac=8.

        I didn't have time to go through the 150,000 hits, but there were some
        interesting ones in the first few pages. Take a look and see if one helps.

        --
        John Saunders | MVP - Connected System Developer

        Comment

        Working...