AS7 LinkTo path fail

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is this the right place for AS bugs?

 

 

Updated to AS7 recently.

 

It seems to have this new bug:  The "LinkTo" on a new c/h file, that is outside the project path.... the resulting path that is placed in the .cproj file, is not valid.

 

Make a project,

In solution explorer, right click src and select Add...Add Existing.

Navigate to some c/h files outside the project path, and then "Add as Link" them (click the down arrow on the Add button).

Add all the proper includes, path includes in settings to project and compile.

 

save,

Now Unload the project (right click in the solution explorer, Unload project), and reload.

 

The AS7 has now rearranged the file layout on the solution explorer,  putting the extra files into its own root folder.  Try to add /rename these - it fails.  

 

Now Unload the project, and reload again.

 

The AS7 has embedded several levels of (non existent) paths.  

 

AS 7 will no longer allow new subfolders in the external files, and keep putting everything back into a flat single folder.

 

 

 

 

It fails because in the .cproj file, the <Link> path is invalid

 

  <ItemGroup>
    <Compile Include="..\..\..\common\parts\part-123.c">
      <SubType>compile</SubType>
      <Link>bad_LinkTo\src\part-123.c</Link>
    </Compile>
    <Compile Include="..\..\..\common\parts\part-123.h">
      <SubType>compile</SubType>
      <Link>bad_LinkTo\src\part-123.h</Link>
    </Compile>

 

 

******************

 

The correct entry is:

 

The <Link> path should be the path within the Solution explorer, that the user set :      <Link>src\part-123.h</Link>

 

 

That is how it worked (properly) before in AS 6.2 and before.    If we hand edit the .cproj, it works proper too.

 

 

 

 

Simple sample project included   All those nested New folders were cooked up by AS.

 

 

Attachment(s): 

Last Edited: Wed. Jul 26, 2017 - 09:16 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use the LinkTo all the time, but have never tried either to put them in their own Solution Explorer folder or to rename them. If I want to rename, I remove the file from the solution, rename using the OS, the add with LinkTo, again. Never have had any link problems doing this.

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Jim,

 

I think I did not explain the rename part fully.    Its not the file rename at issue - I'm trying to rename, move, nest, the pseudo folder names that AS7 creates around the external "linked To" files.   The problem is there....  Plus the AS7  changes the user set folder structure to something broken.    Are you "unloading" the project from within the solution and reloading it - that's when it all blows up.

 

example

 

Start with a new bare project  contains;

 

proj_name::src::main,etc

 

Added new folder under src;

 

proj_name::src::newfolder

 

Then into newfolder "add existing"  and "LinkTo" from outside the project with

Link To:  outside_path/common/parts/part123.h + c files 

 

So now we have in the project

 

proj_name::src::newfolder::part123.h  Linked to ..\..\outside_path/common/parts/part123.h

 

Add to project Directories setting the new path  ..\..\outside_path/common/parts/part123.h

 

Compile.....So far, so good.

 

***********

 

Now do this - Unload the project from within the solution (right click in solution explorer).  Now reload project.  And... The paths above are all screwed up, and it will no longer compile.

 

AS7 have converted the paths into this mess:

 

The  proj_name::src::newfolder  has gone to the root of the project and become per;

 

newfolder::

proj_name::src::

 

Now try to move newfolder back to where you wanted it - nested under src.  Or try to add a 2nd folder into newfolder, or move or nest or rename anything to do with new folder or the ones you attempt to add.   Unload and reload.....   in turns into a bigger and useless mess.

 

 

***************

 

When the project gets reloaded, the defective <Link> value in .cproj, generates a different project folder structure from what was designed.   That fault is it keeps injecting the home folder into the link path.  Older AS6 always made the <Link> value relative to project root, while new AS7 makes it one level higher, and keeps inject that home folder each time an edit is tried.

 

The <Link> should remain as  "src\newfolder\part123.h"

 

But AS7 makes it  "myproject\newfolder\part123.h",  (the project root) but then any attempt to move, name, add, fix the paths in the solution explorer, will quickly make that link path become something invalid like:  "myproject\myproject\myproject\newfolder\part123.h"

 

 

How do we get this fixed please?

 

Hope that helps.

Last Edited: Tue. Aug 1, 2017 - 04:58 AM