-
Notifications
You must be signed in to change notification settings - Fork 651
[Bug] FileNotFoundException: The file or assembly "System.Runtime, Version = 5.0.0.0" or a dependency on it was not found. #2518
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
Comments
That's just the location of the source from the build machine that built the used GitVersion release - what we see here is GitVersion failing in its implementation of the MSBuild task from its dll that was loaded into MSBuild. I've been getting this same issue repeatedly now. It's sometimes gone completely, other times you can just build again and it will fix itself. In my case I have multiple Xamarin projects (which use the old non-SDK-style project system), as well as a .NET 5.0 project all in the same solution. All projects use GitVersion, via the MSBuild package. It seems like it's due to concurrent project builds, which explains why I can get it to work by repeatedly building: I only build a single project when I got hit by the bug, one after the other. Here's a workaround: I wonder if we're looking at a case of the MSBuild nodes getting reused and not liking the idea to load multiple different versions of the dependency dlls of the GitVersion tasks into memory... That could explain why building non-concurrently works perhaps. Now I'm wondering if this and #2502 basically mean we have to ensure only one set of MSBuild task dlls is used by GitVersion. |
Ah, okay.
For me, it would mean to use only Net5, I guess :D Framework 4.8 won't compile my projects either way. I will try that.
Quite difficult to find if that is the issue :) |
This is all only used in MSBuild! So at compile-time only the MSBuild tooling will
So if your dev/build machine has .NET Framework 4.8 installed this will all work. There's no relationship to what your projects use. But you're right there... As folks will want a cross-platform solution we should aim for .NET Core or 5.0+ 😄 I've added a suggestion to the linked issue. Let me know if the workaround works for you (using .NET 5 in your case)! |
Oh, of course. My mistake :D
I have now tried to run it with netframework 4.8 inside Visual Studio and can confirm that it works. :) On our build server, things will get a bit more difficult as it runs a docker image based on |
Describe the bug
When building my project with the latest GitVersion.MsBuild and after the workaround described in #2502 (I have added the following snippet as fallback for the
C:\Users\Nutzer\.nuget\packages\gitversion.msbuild\5.6.1\tools\GitVersion.MsBuild.props
file):In the command line, the build runs properly when using
dotnet build
.Expected Behavior
The build in Visual Studio should just work normally.
Actual Behavior
Build fails with error message:
Fun fact: I have no idea why it wants to access the folder
D:\a\GitVersion\
(D
is my secondary drive which is used for nothing at all at the moment and the folder calleda
doesn't even exist).Possible Fix
No idea.
Steps to Reproduce
I have upgraded my projects from
netcoreapp3.1
tonet5.0
and switched fromGitVersionTask
toGitVersion.MsBuild
. The project is an ASP.Net Blazor server side project (If this is relevant).Context
Regular / daily work.
Your Environment
The text was updated successfully, but these errors were encountered: