Fix MSB4019 error in ConPTY nupkg#20029
Merged
DHowett merged 1 commit intomicrosoft:mainfrom Mar 30, 2026
Merged
Conversation
lhecker
approved these changes
Mar 30, 2026
Member
lhecker
left a comment
There was a problem hiding this comment.
Curiously, we're not the only ones using MSBuildThisProjectDirectory but it indeed doesn't seem documented.
Member
|
Ugh. Good catch, thanks. Dunno how it worked before ;P |
Member
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
DHowett
pushed a commit
that referenced
this pull request
Mar 30, 2026
This commit fixes the following error that occurs when attempting to use the
`Microsoft.Windows.Console.ConPTY` nupkg in a Visual C++ project:
MSB4019: The imported project "C:\Microsoft.Windows.Console.ConPTY.props" was not found.
Based on the list of reserved and well-known properties, the property
`MSBuildThisProjectDirectory` does not appear to exist. This PR
replaces it with the correct property, `MSBuildThisFileDirectory`.
(cherry picked from commit be5dcf8)
Service-Card-Id: PVTI_lADOAF3p4s4BBcTlzgotQIo
Service-Version: 1.24
DHowett
pushed a commit
that referenced
this pull request
Mar 30, 2026
This commit fixes the following error that occurs when attempting to use the
`Microsoft.Windows.Console.ConPTY` nupkg in a Visual C++ project:
MSB4019: The imported project "C:\Microsoft.Windows.Console.ConPTY.props" was not found.
Based on the list of reserved and well-known properties, the property
`MSBuildThisProjectDirectory` does not appear to exist. This PR
replaces it with the correct property, `MSBuildThisFileDirectory`.
(cherry picked from commit be5dcf8)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgotQIk
Service-Version: 1.25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
This PR fixes the following error that occurs when attempting to use the
Microsoft.Windows.Console.ConPTYnupkg in a Visual C++ project:References and Relevant Issues
(None)
Detailed Description of the Pull Request / Additional comments
Based on the list of reserved and well-known properties, the property
MSBuildThisProjectDirectorydoes not appear to exist. This PR replaces it with the correct property,MSBuildThisFileDirectory.Validation Steps Performed
Verified that after applying this fix and packaging, the MSB4019 error no longer occurs. (Note: A different error now appears, but I will file a separate issue for that shortly.)
PR Checklist