DPack 3.6.1 problem when in a linked file

Post general DPack questions or problem reports here.

Moderator: Sergey

DPack 3.6.1 problem when in a linked file

Postby Imi » May 2nd, 2013, 10:47 am

- create a new project
- add a file from a different location as link (Add Existing, then click on the [v] in the open dialog and choose "Add as link").
- alternatively, add the file to the csproj's item group like this:
Code: Select all
  <ItemGroup>
    <Compile Include="..\someotherdirectory\somefile.cs">
      <Link>somefile.cs</Link>
    </Compile>
  </ItemGroup>

- Open this file in Visual Studio
- Try to access the DPack code browser

For me, this results in the following error popup:

---------------------------
Microsoft Visual Studio
---------------------------
DPack 3.6.1

Code Browser request cannot be processed.



Please make sure you have a code file open that belongs to the current solution.
---------------------------
OK
---------------------------
Imi
Junior Member
 
Posts: 9
Joined: April 30th, 2013, 4:10 pm

Re: DPack 3.6.1 problem when in a linked file

Postby Imi » May 2nd, 2013, 10:49 am

Aaaaaaand now it works mysteriously. :(
Imi
Junior Member
 
Posts: 9
Joined: April 30th, 2013, 4:10 pm

Re: DPack 3.6.1 problem when in a linked file

Postby Sergey » May 5th, 2013, 8:48 pm

No problem. Seem to work fine here as well. Feel free to bring it up if you ever run into that again. Thanks.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: DPack 3.6.1 problem when in a linked file

Postby Imi » May 25th, 2013, 3:59 pm

The problem wasn't the link. It was the fact that the linked file is set to "None" as build action instead of "Compile".

And it has nothing with linking. Well... almost nothing.

So the problem is: We got a lot of files linked in other projects (Via "Add as Link") and then set to "None", because they are used for custom build tasks. When opening a file via File Browser, dpack seem to prefer the linked file to the original (that is, the file opened is the linked one).

This means, we either can't use the File Browser of dpack or we can't use the Code Browser (because it doesn't work with "None" build tasks). :(


(Said that, we'll probably change the structure anyway, since its a hazard to have these double-linked things in the project file for other issues here..)
Imi
Junior Member
 
Posts: 9
Joined: April 30th, 2013, 4:10 pm

Re: DPack 3.6.1 problem when in a linked file

Postby Sergey » June 2nd, 2013, 11:20 pm

Just posted new Beta 5 with a few linked file improvements for you. File Browser is gonna consider Build Action when and if showing code files. If file's Build Action is set to anything other than Compile it won't show up in the file list at all. That way trying to open it in File Browser will actually go against the file *with* code model, making Code Browser work fine as well.

If you switch to show all files then linked or any files for that matter will show up in File Browser again regardless of their Build Action. The way File Browser is setup is that it's gonna open linked file with whichever project happens to reference it first (I think that's the issue you ran into originally). To have a bit more control over that, and while still in "all files" mode, uncheck an existing Tools|Options -> DPack|Browsers|File Browser -> "Group linked/shared files" option. That will force linked files to be shown 1 per project allowing you to select the right one, ie one set to Compile.

Let me know how it all works for you in the new beta. Thanks.

http://www.usysware.com/files/DPack2010-3.7.1.Beta5-Setup.exe for VS 2010
http://www.usysware.com/files/DPack2012-3.7.1.Beta5-Setup.exe for VS 2012
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA

Re: DPack 3.6.1 problem when in a linked file

Postby Sergey » June 3rd, 2013, 11:39 pm

Made a few adjustments to the latest beta here. Limited my workaround to non-web C# and VB projects only. Those are the only type of projects that seem to expose build action property. Otherwise it cause some (minor) performance issues. Thought I'd mention it.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 590
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA


Return to DPack Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron