You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by jhennessey September 20, 2021
I'm trying to make use of the new ProjectReference SetPlatform Negotiation feature. After performing all of the documented steps to enable the feature, I could not get a simplistic two project (non-SDK style) build to work correctly. In this case, NetFx.Library2 (x86/x64) referenced NetFx.Library1 (AnyCPU). When attempting to build, it would result with the following error:
(_CheckForInvalidConfigurationAndPlatform target) -> c:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(820 ,5): error : The BaseOutputPath/OutputPath property is not set for project 'NetFx.Library1.csproj'. Please check to ma ke sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='x64'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.
After exploring the logs and associated code changes for the feature, I could see that PlatformTarget was being passed to the referenced project here. That doesn't appease the referenced project because it uses Platform for its defined configurations. However, if I change the referenced code to pass Platform (along with PlatformTarget) my build works as expected.
Is there any reason why Platform can't also be passed to the referenced projects?
The long and the short of it: We should be passing Platform= instead of PlatformTarget=. There also needs to be an investigation as to whether or not we need to remove the use of PlatformTarget within the feature.
The text was updated successfully, but these errors were encountered:
Discussed in #6871
Originally posted by jhennessey September 20, 2021
I'm trying to make use of the new ProjectReference SetPlatform Negotiation feature. After performing all of the documented steps to enable the feature, I could not get a simplistic two project (non-SDK style) build to work correctly. In this case, NetFx.Library2 (x86/x64) referenced NetFx.Library1 (AnyCPU). When attempting to build, it would result with the following error:
(_CheckForInvalidConfigurationAndPlatform target) -> c:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(820 ,5): error : The BaseOutputPath/OutputPath property is not set for project 'NetFx.Library1.csproj'. Please check to ma ke sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='x64'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.
After exploring the logs and associated code changes for the feature, I could see that
PlatformTarget
was being passed to the referenced project here. That doesn't appease the referenced project because it usesPlatform
for its defined configurations. However, if I change the referenced code to passPlatform
(along withPlatformTarget
) my build works as expected.Is there any reason why
Platform
can't also be passed to the referenced projects?#5338
#6655
Logs:
error.log
success.log
Summarized
The long and the short of it: We should be passing
Platform=
instead ofPlatformTarget=
. There also needs to be an investigation as to whether or not we need to remove the use ofPlatformTarget
within the feature.The text was updated successfully, but these errors were encountered: