Skip to content
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

Msbuild not defining TargetGroup property for uap when building for uap or uap-aot #21795

Closed
davidsh opened this issue May 18, 2017 · 5 comments
Milestone

Comments

@davidsh
Copy link
Contributor

davidsh commented May 18, 2017

I'm trying to do this in a CSPROJ file:

<DefineConstants Condition="'$(TargetGroup)' == 'uap'">$(DefineConstants);uap</DefineConstants>

But when I build either:

msbuild /t:rebuildandtest /p:TargetGroup=uap

or

msbuild /t:rebuildandtest /p:TargetGroup=uapaot

The TargetGroup property is not defined either 'uap' or 'uapaot'.

I would expect it to be defined as 'uap' whether it is 'uap' or 'uapaot' TargetGroup. Instead, it is not being defined properly.

@davidsh
Copy link
Contributor Author

davidsh commented May 18, 2017

cc: @danmosemsft @AlexGhiondea @ViktorHofer @weshaggard

@davidsh
Copy link
Contributor Author

davidsh commented May 18, 2017

I noticed that TargetGroup is being defined as 'netstandard' even though I am defining it as 'uap' or 'uap-aot'

@danmoseley
Copy link
Member

danmoseley commented May 18, 2017

Which library is this? If there is no uap/uapaot configuration explicitly in Configuration.props, perhaps the TargetGroup becomes netstandard.

@davidsh
Copy link
Contributor Author

davidsh commented May 18, 2017

I observed it in src/System.Net.Http/tests/UnitTests when building those tests. The Configuration.props doesn't have any 'uap' or 'uap-aot' configurations. So, maybe that is the problem.

I do see that in src/System.Net.Http/src there is a Configuration.props that has this defined:

uap-Windows_NT;

I will investigate and close this issue is that is the problem with Http unit tests project. Thx.

@davidsh
Copy link
Contributor Author

davidsh commented May 18, 2017

Yes, that is the problem. We need to add "uap-Windows_NT;" to the configuration file.

@davidsh davidsh closed this as completed May 18, 2017
@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 2.1.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants