Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripty custom tool holds onto dll file locks #72

Closed
TylerBrinkley opened this issue Feb 8, 2017 · 15 comments
Closed

Scripty custom tool holds onto dll file locks #72

TylerBrinkley opened this issue Feb 8, 2017 · 15 comments
Labels

Comments

@TylerBrinkley
Copy link
Contributor

Currently, after running the Scripty custom tool I'm not able to rebuild the solution as Scripty holds onto the references to the .dll files it loads in the csx. I must therefore close Visual Studio and reopen it in order to rebuild the solution.

@daveaglick
Copy link
Owner

How are you loading the assemblies in your script? I'm assuming with the #r directive but want to be sure.

@TylerBrinkley
Copy link
Contributor Author

Correct, I'm loading it with the #r directive.

@TylerBrinkley
Copy link
Contributor Author

When trying to build I get the following VS error.

Unable to copy file "C:\TFS\SB\Dev\Stifel.Bank.Encompass.SmartClient\Stifel.Bank\bin\Stifel.Bank.dll" to "bin\Stifel.Bank.dll". The process cannot access the file 'bin\Stifel.Bank.dll' because it is being used by another process.

@daveaglick daveaglick added the Bug label Feb 8, 2017
@daveaglick
Copy link
Owner

Is this assembly also referenced by your containing project (or is it actually the containing project)?

@TylerBrinkley
Copy link
Contributor Author

TylerBrinkley commented Feb 8, 2017

The assembly referenced is located in a separate project.

I've attached a minimal reproduction solution.

ScriptyBug.zip

@TylerBrinkley
Copy link
Contributor Author

Just build the solution, run the Content.csx script, then try building the solution again.

@StingyJack
Copy link
Contributor

Was this with 0.5.0 or 0.6.0?

@TylerBrinkley
Copy link
Contributor Author

This was with 0.5.0 but I don't think it was fixed for 0.6.0.

@StingyJack
Copy link
Contributor

I see it in 0.6.0 also, i think it's VS that's holding the lock. Running the script with the target project unloaded still causes the error until VS is restarted. Killing MSBuild or the VBCSCompiler doesn't release it.

Did you try with scripty.exe to see if it locks the file?

@StingyJack
Copy link
Contributor

I ran this through the changes I have for PR #75 and its not locking the file. I don't see anything obvious that would cause the reference locking though.

@daveaglick
Copy link
Owner

Now that 0.7.0 is (finally) released, I'll take a look at #75 and we can see if it resolves this issue.

@daveaglick
Copy link
Owner

@TylerBrinkley I know you're currently blocked by #84, and I'm hoping to get an update out for that today. Once it's out can you see if it also resolved this file locking issue? I addition to all the updates to Roslyn, we're also using a new version of the VS extensibility libraries. Perhaps those are better about releasing locks...

@TylerBrinkley
Copy link
Contributor Author

This is still an issue with 0.7.0 of the custom tool which still works with .NET Framework projects. #84 only relates to the Scripty.MSBuild NuGet package.

@daveaglick
Copy link
Owner

Okay, thanks - 0.7.0 has the new VSIX stuff so that's a no-go for this issue then.

@ghost
Copy link

ghost commented Jun 8, 2017

Is it possible this is another symptom of the same problem that's causing #52 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants