Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Open custom file in same IsolatedShell instance.

$
0
0

Hi,

I do have a 2012 IsolatedShell application and I try to set up a file association that opens my custom files with the application. Like http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/509211c7-ff29-4346-ac38-77737d337da1 I do have the problem, that .my files are not opened with the existing instance, but a new one is opened. I tried to add the /Edit option to the command, but that's where it gets really crazy:

  • If I have an instance open without a .my file open and open a new file with the /Edit command, a new application instance is opened, and the first instance switches to an empty solution.
  • If I have 1.my open in an instance and open 2.my a second instance is opened, but the first instance shows 1.my and 2.my in the Project Explorer as Miscellaneous Files.
  • If I have 1.my open in an instance and open 1.my again, the first instance asks, if I want to close the file and opens a second instance (independent of the answer).

My files are not associated with any project type, since they only have to be opened (read-only).

The commands I tried are:

  • "MyApplication.exe" /Edit "%1"
  • "MyApplication.exe" "%1"

If I try to do the same thing with .txt files, everything works fine, so i guess there is something wrong with my editor. The editor is registered as:

[ProvideEditorExtension(typeof(MyEditorFactory), ".my", 50, NameResourceID = 500)]
[ProvideEditorFactory(typeof(MyEditorFactory), 500, CommonPhysicalViewAttributes = (int)__VSPHYSICALVIEWATTRIBUTES.PVA_SupportsPreview, TrustLevel = __VSEDITORTRUSTLEVEL.ETL_AlwaysTrusted)]

I also tried to add "ProjectGuid = VSConstants.CLSID.MiscellaneousFilesProject_string, EditorFactoryNotify = true" without effect.

What am I doing wrong?


A programmer ia a tool to convert coffein to code.




Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>