Author Topic: Visual Studio 2017 workspace  (Read 4761 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Visual Studio 2017 workspace
« on: September 28, 2019, 12:34:50 AM »
I've got a VS2017 solution open, it has a couple of C# projects.

When I create a new file ("barfy") with "Add to project" checked, Slick created "MyProject.bak" next to "MyProject.csproj"

It adds
<None Include="barfy" />

It also adds a bunch of blank lines.

#1: It should not create a *.BAK file.
I have file history configured to "Backup history on Save".
When I look at File->History for the CSProj file, it seems to be there as expected.

#2: It should not keep adding a bunch of blank lines into the CSProj file.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6975
  • Hero Points: 532
Re: Visual Studio 2017 workspace
« Reply #1 on: September 28, 2019, 01:17:43 AM »
Can you post a sample solution and csproj file (not a real one). I'm having trouble reproducing this. I suspect I need a csproj file which looks more like yours.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6975
  • Hero Points: 532
Re: Visual Studio 2017 workspace
« Reply #2 on: September 28, 2019, 01:23:34 AM »
The bak thing is intentional. Just in case SlickEdit messes up your file. Since this isn't a save operation, I don't think we can support backup history. We could add an option to turn this off though.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6975
  • Hero Points: 532
Re: Visual Studio 2017 workspace
« Reply #3 on: September 28, 2019, 09:34:16 PM »
I found one problem (macro is trying to sort the nodes-- can't do that here). I'd still like a small sample solution and project so I make sure I've fixed what you're seeing.

To remove the sorting, comment out line 2364 of makefile.e. This should fix the blank line problem.

   //_xmlcfg_sort_on_attribute(handle,itemGroupNode,'Include','F');

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: Visual Studio 2017 workspace
« Reply #4 on: September 30, 2019, 05:38:04 PM »
The change you suggested fixes the problem with blank lines!

Better repro (just FYI)
Try this project: RestSharp.sln
https://github.com/restsharp/RestSharp.git


Then make "RestSharp.csproj" the active project.
Create 3 new files with AddToProject.
I get 6 new blank lines added.



Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6975
  • Hero Points: 532
Re: Visual Studio 2017 workspace
« Reply #5 on: September 30, 2019, 08:52:16 PM »
Thanks for the git sample.

Seems like SlickEdit needs more information in order to support other types of files or ambiguous files. Right now, only the following file type extensions are supported:

.cs,.vb,.fs,.jsl,.java   --> Compile
.resx,.rdlc,.txt  -->EmbeddedResource
.jpg,.jpeg,.gif,.bmp,.png,.htm,.html,.dll,.exe,.wav,.avi,.mdb,.mdf,.vbs,.wsf,.css -->Content

If a file doesn't have one of the above mappings, then it is mapped to the XML element "None".

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6975
  • Hero Points: 532
Re: Visual Studio 2017 workspace
« Reply #6 on: October 01, 2019, 01:03:45 AM »
I noticed that some .csproj automatically include all source files at or beneath the project automatically. We will add support for this in a hot fix.