Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

try-convert crashes with "Could not load file or assembly 'System.Runtime" #439

Open
MattBussing opened this issue May 11, 2022 · 8 comments

Comments

@MattBussing
Copy link

When running try-convert I get these weird issues.

try-convert.exe --no-backup -m /c/Program\ Files/dotnet/sdk/6.0.300/ --keep-current-tfms -p normalProject.csproj
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at MSBuild.Abstractions.MSBuildConversionWorkspaceLoader.LoadWorkspace(String path, Boolean noBackup, String tfm, Boolean keepCurrentTFMs, Boolean forceWeb)
   at MSBuild.Conversion.Program.Run(String project, String workspace, String msbuildPath, String tfm, Boolean forceWebConversion, Boolean preview, Boolean diffOnly, Boolean noBackup, Boolean keepCurrentTfms, Boolean update, Boolean mauiConversion) in /_/src/try-convert/Program.cs:line 133
 try-convert.exe --no-backup -m /c/Program\ Files/dotnet/sdk/6.0.101/ --keep-current-tfms -p normalProject.csproj
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at MSBuild.Abstractions.MSBuildConversionWorkspaceLoader.LoadWorkspace(String path, Boolean noBackup, String tfm, Boolean keepCurrentTFMs, Boolean forceWeb)
   at MSBuild.Conversion.Program.Run(String project, String workspace, String msbuildPath, String tfm, Boolean forceWebConversion, Boolean preview, Boolean diffOnly, Boolean noBackup, Boolean keepCurrentTfms, Boolean update, Boolean mauiConversion) in /_/src/try-convert/Program.cs:line 133
dotnet tool update -g try-convert
Tool 'try-convert' was reinstalled with the latest stable version (version '0.9.232202')
@MattBussing
Copy link
Author

It works if I build the latest of try-convert. Please update the NuGet package.

@DingpingZhang
Copy link

Me too, it doesn't seem to have a stable version.

@luizfernandonb
Copy link

Me too

1 similar comment
@ShoshanaTzi
Copy link

Me too

@behroozbc
Copy link

I caught the same error too.

@tomShoutTheSecond
Copy link

tomShoutTheSecond commented Jan 26, 2023

I am seeing the same issue

try-convert -m "C:\Program Files\dotnet\sdk\7.0.101"
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at MSBuild.Abstractions.MSBuildConversionWorkspaceLoader.LoadWorkspace(String path, Boolean noBackup, String tfm, Boolean keepCurrentTFMs, Boolean forceWeb)
   at MSBuild.Conversion.Program.Run(String project, String workspace, String msbuildPath, String tfm, Boolean forceWebConversion, Boolean preview, Boolean diffOnly, Boolean noBackup, Boolean keepCurrentTfms, Boolean update, Boolean mauiConversion) in /_/src/try-convert/Program.cs:line 133

@markbearden
Copy link

markbearden commented Feb 23, 2023

and, me too (with multiple SDK 6 versions installed)

Looks like this utility is essentially abandoned. Would be nice if this page
https://learn.microsoft.com/en-us/dotnet/core/porting/
stopped pointing people at it?

Same error reported many more times at issues below (duplicates of this ticket).
#463
#445

Perhaps this is the replacement? https://learn.microsoft.com/en-us/dotnet/core/porting/upgrade-assistant-overview

@SOULHUZAIFA
Copy link

Any update with the new tool AKA the replacement?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants