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

Building a project between two different SDKs fails hard if you reuse nodes #2161

Closed
davkean opened this issue Apr 19, 2018 · 10 comments
Closed
Milestone

Comments

@davkean
Copy link
Member

davkean commented Apr 19, 2018

Steps to reproduce

  1. Build a project via msbuild with 2.1.300-preview2-008324
  2. Before msbuild nodes shutdown, build a project via msbuild with 2.1.300-preview2-008533

Expected behavior

No errors

Actual behavior

Actual:

C:\Program Files\dotnet\sdk\2.1.300-preview2-008533\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInfer
ence.targets(134,5): error MSB4062: The "ShowPreviewMessage" task could not be loaded from the assembly C:\Program File
s\dotnet\sdk\2.1.300-preview2-008533\Sdks\Microsoft.NET.Sdk\targets\..\tools\net46/Microsoft.NET.Build.Tasks.dll.  Conf
irm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the
 task contains a public class that implements Microsoft.Build.Framework.ITask. [E:\project-system2\src\Microsoft.Visual
Studio.ProjectSystem.VisualBasic.UnitTests\Microsoft.VisualStudio.ProjectSystem.VisualBasic.UnitTests.csproj]

Environment data

dotnet --info output:

@davkean
Copy link
Member Author

davkean commented Apr 19, 2018

Elsewhere we version tasks dlls every build to avoid this.

@livarcocc
Copy link
Contributor

@nguerrera and I were just talking about this. We used to version assemblies out of the SDK for every build. It seems like we regressed with the infra-changes we did moving to repotoolset.

@tannergooding can you investigate this. I will mark this for 2.1.3xx and will consider taking it to shiproom.

@livarcocc livarcocc added this to the 2.1.3xx milestone Apr 19, 2018
@nguerrera
Copy link
Contributor

Yes, this is a regression. Task dlls should get a unique assembly version with every build.

@nguerrera
Copy link
Contributor

Original issue: #488, original fix #815

@tannergooding
Copy link
Member

PR is here: #2163

@davkean
Copy link
Member Author

davkean commented Apr 19, 2018

Awesome, thanks!

@nguerrera
Copy link
Contributor

I think this regressed again with a repo toolset update :(

@davkean
Copy link
Member Author

davkean commented Aug 1, 2018

Ugh, how do we prevent this?

@nguerrera nguerrera reopened this Aug 1, 2018
@nguerrera
Copy link
Contributor

I'll add a test that AssemblyVersion == FileVersion and neither have a fourth part of 0. I think it will only ever fail in official builds due to how we go to 42.42.42.42 otherwise in repo toolset, but that's a lot better than nothing.

Interestingly, though, the reason I even checked was an issue on .net core msbuild and the conflict was between different minor versions. It appears that core might not allow different versions. I will double check and file an issue on msbuild. I think we never noticed this because core didn't have node reuse until recently.

@nguerrera nguerrera modified the milestones: 2.1.3xx, 2.1.4xx Aug 1, 2018
@nguerrera nguerrera assigned nguerrera and unassigned tannergooding Aug 1, 2018
@nguerrera
Copy link
Contributor

dotnet/msbuild#3572

@nguerrera nguerrera modified the milestones: 2.1.4xx, 2.2.1xx Aug 15, 2018
@nguerrera nguerrera removed their assignment Aug 15, 2018
@livarcocc livarcocc modified the milestones: 2.2.1xx, 3.0.1xx Jun 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants