-
Notifications
You must be signed in to change notification settings - Fork 5
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
System.IO.FileLoadException: Could not load file or assembly NuGet.Frameworks, Version=6.2.0.146 #170
Comments
#29) - I seem to be encountering an issue with newer .NET 6 SDKs (likely the runtime actually) related to the use of MSBuild.ProjectCreation (jeffkl/MSBuildProjectCreator#170) which is preventing me from being able to build. This serves as a workaround for now. - This change removes .NET 5 from the test platforms since it is now [End of Support](https://dotnet.microsoft.com/download/dotnet) as of May 10, 2022.
- Applying a transitive update for NuGet.Frameworks to workaround jeffkl/MSBuildProjectCreator#170.
A workaround appears to be to apply a transitive update for NuGet.Frameworks to update to the latest version. |
* Update dependencies * Apply transitive update for NuGet.Frameworks - Applying a transitive update for NuGet.Frameworks to workaround jeffkl/MSBuildProjectCreator#170. * Re-enable latest .NET 6.x SDK for builds
Yes you've discovered the problem with NuGet.Frameworks being referenced by This causes your unit test to need that particular version in the output directory and causes collisions. Specifically, the error includes Could not find or load a specific file. This is because MSBuild is loading NuGet assemblies that ship with .NET SDK/Visual Studio which can be different than the version than are in the package dependency graph of your app. I try to keep |
Well, for the record, it looks like you already have a more recent update (6.2.0) to that dependency checked in, but haven't shipped an updated release. 8.0.0 currently depends on 6.1.0. The latest is 6.2.1. I'm happy to submit a PR to update to 6.2.1. We'd just need an updated release following that update. |
To be honest, i'm surprised Dependabot isn't helping out here. |
I was getting bombarded with emails from dependabot every single day so I changed the frequency to monthly 😄 My curse for having so many repos. I can try changing it to weekly so you don't have to send a PR. |
Haha, i completely understand. I think i can manage the one character PR 😉. |
Looks like Dependabot beat me to it. |
Fixed by #175 and available in https://github.com/jeffkl/MSBuildProjectCreator/releases/tag/v8.2.1 |
MSBuild.ProjectCreation: 8.0.0
Hello. I came across this library at the MSBuildSdks and started using it in an experimental project. Everything was working great until recently when my tests began to fail to build my generated projects when executing tests for the .NET 5 and .NET 6 target platforms (the test project targets those platforms). As far as I can tell, the issue comes up as soon as I install the more recent .NET 6 6.0.300 SDK on the machine. Seeing it on Windows, Linux, and MacOS. I currently target .NET Core 3.1, .NET 5, and .NET 6 in my test projects. The tests behave as expected for .NET Core 3.1, but fail with the following for .NET 5 and .NET 6 with the following output:
full output.txt
I don't think my tests are doing anything overly complicated, but I've been wrong before. I haven't been able to workaround it on my dev machine. Even forcing it to use the 6.0.2xx version using the
global.json
didn't work. But, I was able to specifically install the 6.0.2xx SDKs on the build agents as a workaround for now and that did work, so i'm fairly certain it is the newer SDK.Have you seen anything similar on your end? Any suggestions?
The text was updated successfully, but these errors were encountered: