Closed mslukebo closed 1 month ago
I have a solution where two csproj files share the same directory.
I'm gonna stop you right there (literally... I haven't read any more than that in your description) because that's a terrible idea. By default MSBuild writes to bin and obj directories under the project directory, assuming that they have an isolated location for outputs. For example package restore writes to obj\project.assets.json, and if you have two projects in the same directory, they'll stomp on each other's file, wreaking havoc on your build.
So I'm not really interested in improving how NB.GV works in an environment that is so fundamentally broken that many other problems are likely to happen as well.
I have a solution where two
csproj
files share the same directory. I have discovered that sometimes executables created during adotnet build
are sometimes not correctly versioned.I narrowed this down to the below minimal reproduction:
nbgv.test.a
nbgv.test.b
Update the
csproj
for the two created projects with the following:Now, repeatedly build these projects. Sometimes the version is set correctly, but randomly it'll fail to have the correct version. The file with the incorrect version is not deterministic.
Here is a small powershell script I wrote to test this:
Note that this script is building the entire solution, but the problem repros when building individual csproj files as well.
Is there a workaround to this problem?