Open bording opened 5 years ago
Does that property group that sets the property come from a NuGet package? //cc @tmeschter
Does that property group that sets the property come from a NuGet package?
Yes, it does come from the GitVersionTask package.
@bording And these projects use packages.config style of NuGet, as opposed to project.json/PackageReference?
@tmeschter Yes, all of the projects where I've seen this sort of behavior are using packages.config.
@bording And just to confirm, you never had this issue with VS2017?
While I can't say for 100% sure, I don't believe it's anything I ever experienced with VS 2017, only since I switched to VS 2019.
I don't have VS 2017 installed anymore, but I'll verify with a coworker who has both installed and has also seen the behavior on VS 2019.
@bording Thanks; much appreciated.
@panopticoncentral We may have introduced another evaluation issue into 16.0 or 16.1.
Regarding the involvement of a NuGet package: since this uses packages.config-style NuGet and the project system is largely blind to that style, I don't think it is relevant to the bug.
@tmeschter I was able to check with some coworkers, and it looks like this is a problem in VS 2017 as well, which is not what I originally understood when I opened the issue.
How does the fact this it repros in VS 2017 as well alter your assessment of the problem?
Visual Studio Version: VS 2019 16.1.1
Summary: Since starting to use VS 2019, I've been seeing a problem when building solutions that use the legacy project system. The solutions fail to build with various different errors, but they all have a common problem. It appears that there are
<PropertyGroup>
items that aren't being properly evaluated, so various targets aren't being run.Using the specific project I've listed in this issue as an example, the main project fails to build an assembly with a strong name.
The other thing I've noticed is that when the build fails, the
GetVersion
target (which comes from the GitVersionTask package) does not run because of:But if you look at the
GitVersionTask.targets
file,$(GetVersion)
is defined asSo the condition shouldn't be false.
Steps to Reproduce:
support-7.2
branchExpected Behavior: The solution should always successfully build.
Actual Behavior: The solution fails with the following errors:
I was able to repro this with the referenced solution very consistently, but when I started writing this issue and went to go back and get the error details, it started being somewhat inconsistent, with Step 4 sometimes succeeding instead of always failing. Because of this, it seems likely a race condition is involved!
User Impact: The impact varies, but it seems like it can be large. In this case, the problem causes incorrect build output (unsigned assembly despite the project being configured to sign it) that doesn't cause a build failure in the main project. The solution failures are from the test projects that reference the main project, so if those weren't there, this problem might go unnoticed.
NOTE: I know this repo is for the new project system and not the legacy system, but I wasn't sure if there was another public repo that would actually be relevant or not.