Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEaling with Properties in .??proj when the original definition is in a nested .props file... #39

Closed
DynConcepts opened this issue Jan 2, 2021 · 2 comments
Labels

Comments

@DynConcepts
Copy link

My goes is (still) to identify settings, be able to report on them, then be able to standardize them.... Hereis an example along with the error i am getting...

image

Also, many properties that are defined in a nested .props fail I have been unsuccessful in finding...

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ImportGroup Label="PropertySheets" />
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup />
  <ItemDefinitionGroup>
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
    </ClCompile>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup>
    <Midl>
      <HeaderFileName>%(Filename).h</HeaderFileName>
      <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
      <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
    </Midl>
  </ItemDefinitionGroup>
  <ItemGroup />
</Project>

Then in the vcxProj...

  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Typelib|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    <Import Project="..\..\..\..\Bldtools\PropertySheets\CustomLevel1.Typelib.Win32.props" />
    <Import Project="..\..\..\..\Bldtools\PropertySheets\CustomLEeel2.Typelib.Win32.props" />
  </ImportGroup>

@DynConcepts
Copy link
Author

PRogress of a sort... For now I have been able to "override" the property (when it is found) by adding it to the .vcxProj.... This will "Get me through the night (darn, it is almost morning), and even through the (holiday) weekend....

But this is a poor solution as desired value not occurs in each relevant .vcxproj (literally 4000+) rather that in one single .props file...

@3F
Copy link
Owner

3F commented Jan 2, 2021

Because you're really trying to work with different nodes. Process of the evaluation is recursive as I was sayng earlier. And historically you need to process this separately if you want to modify something deep below other nodes (different parent).

MvsSln provides even this

/// True if the property originates from an imported file
/// and not from an environment variable, a global property, or a reserved property.
/// </summary>
public bool isImported;

And this

/// <param name="localScope">If true, will return default value for any special and imported properties type.</param>

Try to use some cheat sheet from this projects:

@3F 3F added the question label Jan 2, 2021
@3F 3F closed this as completed Feb 15, 2021
Repository owner locked and limited conversation to collaborators Feb 15, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

2 participants