Archived

This forum has been archived. Please start a new discussion on GitHub.

ice file in MSVS

Hi All

I was in the middle of working on eclipse and slice2cpp. I suddenly got some strange compile errors from an working MSVS project. Now MSVS trys to compile all .ice files. This does not happened before.

I look at the property of those .ice files, their build action is "none". Why MSVS still compiles them?

Before, it was that Slice MSVS add-on generates .cs files from .ice files, and then MSVS will only compile those .cs files. All .ice files were ignored by MSVS. What happened here?

Thanks

Chang

Comments

  • xdm
    xdm La Coruña, Spain
    Hi Chang,

    If you enabled the Slice builder for a C++ project, slice2cpp is used to generated .cpp/.h files from .ice files in project.

    The generated files are automatically added to the project. The add-in will also add property library and include paths to your project configurations.

    The Visual Studio Add-in is documented here

    What are these strange compile errors you see? What Visual Studio and Ice versions are you using?
  • MSVS compile *.ice file

    Hi XDM

    Thanks for the reply.

    In my project there is a slice file my.ice. I include this file in the project. Before MSVS compiles the project, Ice add-on will create my.cs file first, then MSVS will continue to compile whole project, including my.cs. MSVS should ignore my.ice, (not try to compile it). But suddenly starting yesterday afternoon, my MSVS will compile my.ice file and generated a lot of error since my.ice is not a cs file. Even the property of my.ice has the property:
    Build action ="None"
    MSVS still compiles it. Very strange.

    Today I manually put this in its project file (I have multiple slice files so I use wild card.)
    <Compile Include="my.cs" Exclude="*.ice" />
    Now all the errors are gone.

    But this should not be in this way! I do not know what happened. Yesterday morning it worked as before but afternoon it started to have this behavior. All I did yesterday afternoon was to install eclipse, download cygwin, MinGW and put them in the system variables like path.
    Thanks
    CS
  • xdm
    xdm La Coruña, Spain
    Hi Chang.

    That sounds really weird, if you open the project file in a text editor, what references do you see to my.ice, there should be just one similar to:
    <None Include="my.ice" />
    

    Is there any difference when you disable Slice builder?

    Does the same errors occurs with a newly created project?

    Have you installed other Visual Studio add-ins that could cause this, you can see loaded add-ins from "Tools > Add-in Manager", try to disable others add-in if any.