Monday, February 18, 2008 4:44 PM codeblock

Visual Studio 2008: Suspected bug in Javascript references

I've just published an issue on Microsoft Product Feedback Center about a strange behavior I've found in the last two days. I'm working with Visual Studio 2008, developing an AJAX Enabled application that use massive javascript code. I take advantage of new Visual Studio 2008 intellisense for Javaxript that applies to files using <reference> tags but I saw that using an embedded resource javascript library cause Visual Studio 2008 to lock exclusively the resource assembly and fail during compilation with this error:

Unable to copy file "obj\Debug\ClassLibrary.dll" to "bin\Debug\ClassLibrary.dll". The process cannot access the file 'bin\Debug\ClassLibrary.dll' because it is being used by another process.

I've include a reference to a test project I've prepared to reproduce the issue, so you may download and test the example and possibly convalidate yourself the issue in the .

Steps to reproduce without my test project is:

1) create a solution containing a classlibrary and a webapplication
2) create a embeddedresource.js file in the ClassLibrary and set it to Embedded Resource
3) add the WebResourceAttribute
4) create a referencing.js file in the WebApplication
5) insert a reference to the embeddedresource.js file like this: /// <reference name="ClassLibrary.embeddedjscript.js" assembly="ClassLibrary" />
6) save and close all files
7) open both javascript files
8) run the compilation with CTRL+SHIFT+B (rebuild all)
9) the error happen

Please take a moment to check my sample and please vote it on the feedback center if you get the same behavior.

Test Project: http://blog.boschin.it/download/referencebugtest.zip

Feedback page:

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=328999

Filed under: , ,

Comments

No Comments

Leave a Comment

(required) 
(required) 
(optional)
(required)