Empty property $(OutDir)

Issue #14 resolved
Denis Kuzmin repo owner created an issue

reported in Issue #11 (comment-12156250)

$(OutDir) may be is empty for some solutions

Comments (9)

  1. Denis Kuzmin reporter
    • changed status to open
    + [157] "OutDir"="" ["$(OutputPath)"] Microsoft.Build.Evaluation.ProjectProperty {Microsoft.Build.Evaluation.ProjectProperty.ProjectPropertyXmlBacked}
    

    problem can be with $(OutputPath) before evaluating the OutDir

    / similar: comment-11696239

    In ProjectNode of part Microsoft.VisualStudio.Project:

    string outputPath = this.GetOutputPath(this.currentConfig);
    if (!String.IsNullOrEmpty(outputPath))
    {
        // absolutize relative to project folder location
        outputPath = Path.Combine(this.ProjectFolder, outputPath);
    }
    
    ...
    
    public virtual void PrepareBuild(string config, bool cleanBuild)
    {
        ...
        string outputPath = Path.GetDirectoryName(options.OutputAssembly);
        ...
    }
    
  2. Denis Kuzmin reporter

    yes, problem with OutputPath

    but I don't know, why is so о_О vsSBE provide only wrapper.. problems with initialize objects of Microsoft.Build.Evaluation

    i.e. i can fix this, however...

  3. Denis Kuzmin reporter

    found the probable cause

    e.g. for AnyCPU platform:

    in .csproj we have the next condition for PropertyGroup (where problem is reproduced):

      <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
        <DebugSymbols>true</DebugSymbols>
        <DebugType>full</DebugType>
        <Optimize>false</Optimize>
        <OutputPath>bin\Debug\</OutputPath>
        <DefineConstants>DEBUG;TRACE</DefineConstants>
        <ErrorReport>prompt</ErrorReport>
        <WarningLevel>4</WarningLevel>
        <PlatformTarget>AnyCPU</PlatformTarget>
      </PropertyGroup>
    

    and.. that is:

    dteProject.ConfigurationManager.ActiveConfiguration.PlatformName
    

    contains Platform as a 'Any CPU' from EnvDTE !

    MS Connect Issue #503935 - MSBuild inconsistent platform for "Any CPU" between solution and project:

    holy hedgehogs -_-' fix is coming soon

  4. Log in to comment