Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6844995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:26:45+00:00 2026-05-27T00:26:45+00:00

We have a project where the .js and .css files gets compressed with YUI

  • 0

We have a project where the .js and .css files gets compressed with YUI Compressor. A very good tool. We also use TFS 2010 as a build server with nightly builds that also deploys to our dev web site.

The problem we’re having is that the file YUI generates causes a “Access denied”-problem. This is because there already is such a file generated from before, and that it’s a part of the project, making it read-only. We can however remove it from the project and it should create fine. The problem then is that the generated file doesnt get included in the actual deploy package.

Locally i have no problem because i have a pre build event command script, which deletes the existing files. This apparently doesnt work on the build server. Maybe the tfs context user lacks permission, i dont know.

Is there anyone who might have had similiar problems?

Update 21/11:
The question may be abit vague. To simplify, lets just say i want this to work as it does locally:

IF NOT $(ConfigurationName) == DEBUG DEL "$(ProjectDir)Styles\styles.min.css
IF NOT $(ConfigurationName) == DEBUG DEL "$(ProjectDir)JavaScript\script.min.js

This is defined in the pre-build command event line, under Project properties -> Build events.

The script removes the files before the YUI-file generation, and thus there is no file to overwrite. Could it be that simple that the user context that executes the TFS-build have insufficent modify rights?

SOLUTION:

We ended up with the following code in the pre-build event:

attrib -r "$(ProjectDir)Styles\styles.min.css"
attrib -r "$(ProjectDir)JavaScript\script.min.js"
IF NOT $(ConfigurationName) == Debug $(MSBuildBinPath)\msbuild.exe "$(ProjectDir)Config\MSBuild\BuildSettings.xml"

/Mattias

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:26:45+00:00Added an answer on May 27, 2026 at 12:26 am

    If the files are part of your project and downloaded from the TFS repository, first always remove te read-only flag if your need to do any processing on them, for example deletion. So in your script, first do:

    attrib -r *.js
    attrib -r *.css
    

    Should be able to delete them fine after that. It is probably not a permission issue, since the account that is used to download the files is also the account used to delete them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project with several CSS files, each with many different settings. Every
A question about performance. I have a web project with different CSS files at
In my project I have put all my css classes in the style sheets.
In my project i have a lot of css styles. Some of them are
I have created a CSS stylesheet for my project. Is there any way I
I have a CSS stylesheet defined in the Master Page of my project. On
I have recently been assigned a CSS & design project that's in a CakePHP
I'm creating a website/codeigniter-project that uses views which link to external CSS files. Everywhere
I'm using jammit to package the js and css files for a rails project.
If I run a 2010 visual studio C# web project using the Use Visual

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.