locked
Custom Build Configuration RRS feed

  • Question

  • Hi!

    Could someone answer my question, please?

    I have converted Visual Studio 2008 project to Visual Studio 2012 Express.

    Custom rules have been imported incorectly.

      <ItemDefinitionGroup>
        <XML>
          <ConstsDest>0</ConstsDest>
          <CommandLineTemplate>"$(SolutionDir)Bin\Encrypt.exe" "%(FullPath)" "$(SolutionDir)Res\[ConstsDest]\%(Filename).monad-db" nop</CommandLineTemplate>
          <Outputs>$(SolutionDir)Res\[ConstsDest]\%(Filename).monad-db</Outputs>
        </XML>
      </ItemDefinitionGroup>
    

    The ConstDest is a parameter (the list of values), which decides where to place the output file.

    New Visual Studio sometimes does not interpret it as a parameter, but as a raw string.

    What could be done for correcting it?

    Thank you very much


    Włodzimierz O. Kubera

    Saturday, April 6, 2013 8:30 PM

Answers

  • I don't think [ConstsDest] is the valid parameter in msbuild.

    In MSBuild, you can define the property using Property tag and use it later by reference the property name.

    e.g.

    <PropertyGroup>
        <ConstsDest>YourValue</ConstsDest>
    </PropertyGroup>

    You can use it as

    <Outputs>$(SolutionDir)Res\$(ConstsDest)\%(Filename).monad-db</Outputs>
    Yi

    MSC on Computer Science (Parallel algorithm)

    • Marked as answer by Kubera-Info Sunday, April 7, 2013 10:55 AM
    Sunday, April 7, 2013 9:11 AM

All replies

  • I don't think [ConstsDest] is the valid parameter in msbuild.

    In MSBuild, you can define the property using Property tag and use it later by reference the property name.

    e.g.

    <PropertyGroup>
        <ConstsDest>YourValue</ConstsDest>
    </PropertyGroup>

    You can use it as

    <Outputs>$(SolutionDir)Res\$(ConstsDest)\%(Filename).monad-db</Outputs>
    Yi

    MSC on Computer Science (Parallel algorithm)

    • Marked as answer by Kubera-Info Sunday, April 7, 2013 10:55 AM
    Sunday, April 7, 2013 9:11 AM
  • Thank you for the answer.

    I must learn it.

    The problem is, that the upgraded VS project stopped working.


    Włodzimierz O. Kubera

    Sunday, April 7, 2013 10:57 AM