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

MyScript.$temp$.cs files created next to source (at least when installed from chocolatey) #114

Open
rconde01 opened this issue May 17, 2018 · 6 comments

Comments

@rconde01
Copy link

This is a new behavior from my perspective. This might not be tied to chocolately at all...but it's how i installed cs-script so it might be relevant. I'm getting these tmp files next to the source now which is not so nice in terms of source control. I could add a rule to the .gitignore, but I wanted to run it down with you before I went that route.

@oleg-shilo
Copy link
Owner

You are right this behavior has nothing to do with CS-Script being installed. In fact it is not even caused by CS-Script itself.

This temp file is created by CS-Script extension for VSCode or Notepad++:

The temp file is create to allow Intellisense operations for unsaved C# files. The file is destroyed immediately after the Intellisense request is completed.

If it is consistently not the case please log an issue at https://github.com/oleg-shilo/cs-script.vscode. Or at https://github.com/oleg-shilo/cs-script.npp correspondingly.

If it can be reproduced then it can (and should) be fixed.

@oleg-shilo
Copy link
Owner

BTW you are also right this is a relatively new behavior as it the support for intellisense for unsaved content has only been introduced in the latest releases of the VSCode and Npp plugins.

@rconde01
Copy link
Author

So the context is VSCode. I need to look at it more closely...but i think it's maybe because I installed the cs-script extension, but I didn't install mono...VSCode has been yelling at me about that.

@oleg-shilo
Copy link
Owner

...but i think it's maybe because I installed the cs-script extension...

Yes, it is cs-script VSCode extension. It is exactly what I meant.


I changed this issue to "enhancement".
I think there is a possibility for working with a temp copy of the script file placed in some hidden location. Though it's tricky as it it would require the script engine changes.

@rconde01
Copy link
Author

Why not %TEMP%/Guid.cs ?

@oleg-shilo
Copy link
Owner

No, it does not matter what this dir is. What matters is that if you have a script c:\dev\script.cs and it imports script utils.cs from the same folder, then trying to have intellisense support for the %TEMP%/Guid.cs (having c:\dev\utils.cs unsaved content) will fail.

This is because the import statement //css_include utils.cs will trigger the attempt to find it in the %TEMP% dir instead of c:\dev.

This is what I meant "it's tricky".

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

No branches or pull requests

2 participants